PROCESS STATES

COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION

To understand the operation of the short-term scheduler, we
need to consider the concept of a process state. During the lifetime of a process,
its status will change a number of times. Its status at any point in time is referred to
as a state. The term state is used because it connotes that certain information exists
that defines the status at that point. At minimum, there are five defined states for a
process (Figure 8.7):

? New: A program is admitted by the high-level scheduler but is not yet ready
to execute. The OS will initialize the process, moving it to the ready state.
? Ready: The process is ready to execute and is awaiting access to the processor.
? Running: The process is being executed by the processor.
? Waiting: The process is suspended from execution waiting for some system
resource, such as I/O.
? Halted: The process has terminated and will be destroyed by the OS.

For each process in the system, the OS must maintain information indicat-
ing the state of the process and other information necessary for process execution.
For this purpose, each process is represented in the OS by a process control block
(Figure 8.8), which typically contains

? Identifier: Each current process has a unique identifier.
? State: The current state of the process (new, ready, and so on).
? Priority: Relative priority level.
? Program counter: The address of the next instruction in the program to be
executed.
? Memory pointers: The starting and ending locations of the process in memory.
? Context data: These are data that are present in registers in the processor
while the process is executing, and they will be discussed in Part Three. For
now, it is enough to say that these data represent the “context” of the process.
The context data plus the program counter are saved when the process leaves
the running state. They are retrieved by the processor when it resumes execu-
tion of the process.

? I/O status information: Includes outstanding I/O requests, I/O devices (e.g., tape
drives) assigned to this process, a list of files assigned to the process, and so on.
? Accounting information: May include the amount of processor time and clock
time used, time limits, account numbers, and so on.

When the scheduler accepts a new job or user request for execution, it creates
a blank process control block and places the associated process in the new state.
After the system has properly filled in the process control block, the process is
transferred to the ready state.

时间: 2024-10-31 14:24:50

PROCESS STATES的相关文章

The Concept of a Process

COMPPUTER SCIENCE AN OVERVIEW 11th Edition One of the most fundamental concepts of modern operating systems is the distinction between a program and the activity of executing a program. The former is a static set of directions, whereas the latter is

OSTEP Chapter 4. The Abstraction: The Process

4. The Abstraction: The Process process: it is a running program. HOW TO PROVIDE THE ILLUSION OF MANY CPUS? by virtualizing the CPU. By running one process, then stopping it and running another, and so forth. mechanisms: low-level methods or protocol

ART运行时Foreground GC和Background GC切换过程分析

通过前面一系列文章的学习,我们知道了ART运行时既支持Mark-Sweep GC,又支持Compacting GC.其中,Mark-Sweep GC执行效率更高,但是存在内存碎片问题:而Compacting GC执行效率较低,但是不存在内存碎片问题.ART运行时通过引入Foreground GC和Background GC的概念来对这两种GC进行扬长避短.本文就详细分析它们的执行过程以及切换过程. 老罗的新浪微博:http://weibo.com/shengyangluo,欢迎关注! 在前面AR

Nagios-NRPE Documentation(译文)

1. INTRODUCTION(介绍) a) Purpose(目的) The NRPE addon(插件) is designed to allow you to execute(履行,执行) Nagios plugins on remote Linux/Unix machines. (NRPE插件设计的目的是允许你来运行存在于远程linux/Unix主机上的Nagios plugins) The main reason for doing this is to allow Nagios to

HMM系列之四:Forward-Backward Algorithm and Summary

Forward-Backward Algorithm 与HMM相关的有用的问题,往往是 Evaluation 和 Decoding,taeny可以评测一个模型的相对可用性,或者估计某个模型实际上在做什么.这两种做法都依赖于 HMM 参数的先验知识—— the state transition matrix, the observation matrix, 以及 the π vector. 在很多情况下这些确实难以获得的,这就是 learning problem. Forward-backward

Investigating Your RAM Usage

转载自:http://developer.android.com/intl/zh-cn/tools/debugging/debugging-memory.html Because Android is designed for mobile devices, you should always be careful about how much random-access memory (RAM) your app uses. Although Dalvik and ART perform ro

Monitoring and Managing Linux Processes

Overview Goal To evaluate and control processes running on a Lunix system Objectives List and interpret basic information about processes running on the system Control processes in the shell? session using bash job control Terminate and control porce

thread safe

computer science J. Glenn Brookshear with contributions from David T. SmithIndiana University of Pennsylvania Dennis Brylow Marquette University 11th Edition https://en.wikipedia.org/wiki/Thread_safety https://en.wikipedia.org/wiki/Process_(computing

Uniform synchronization between multiple kernels running on single computer systems

The present invention allocates resources in a multi-operating system computing system, thereby avoiding bottlenecks and other degradations that result from competition for limited resources. In one embodiment, a computer system includes resources an