(This is the older material - click here - for current specification content)

3. Process state

Every process has a small data area allocated to it called the 'process control block' (PCB). This is located in the data segment of the operating system's kernel.

This block provides the CPU and scheduler with the details needed to manage that process.

A typical process control block (PCB) for a process in the READY queue is shown below

Process ID 22334
Owner ID
C Jones
Current priority
19
Status READY
Registers Content of the CPU when last run
Units of processing time used 297
Awaiting resource NONE
Link to other PCB Next PCB in READY queue

 

A typical process control block for a process in the WAITING / BLOCKED queue

Process ID 1234
Owner ID
D Smith
Current priority
20
Status WAITING
Registers Content of the CPU when last run
Units of processing time used 50
Awaiting resource Keyboard Input
Link to other PCB Next PCB in WAITING queue

Going through each line item:

The Owner ID identifies who is running the process. If there is a problem, or the process needs to be paid for once it is finished (on a mainframe / supercomputer), this item identifies the user.

Current Priority: This is a number indicating the relative importance of that process, used by the scheduler to decide which is the next process to be allowed to run. The scheduler can initially set the priority based on what is currently happening in the system. Users with the right permissions on certain operating systems e.g Unix, can also change the priority of their processes.

Status: Indicates if the process is Running, Waiting (Blocked), or Ready

Registers: A copy of all the CPU registers when the process last ran in the CPU. These will be re-loaded into the CPU when the process is ready to run

Units of processing time: Lets the scheduler know how much time the process has had to run so far.

Awaiting resource: If the process is in the WAITING / BLOCKED state, it identifies which resource the process is waiting for. In this case the process is waiting for a keyboard input.

Link to other PCB: A queue is a kind of list data structure. Lists are easily handled if each item in the list can point to the next one.

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Process States

 

 

 

Copyright © www.teach-ict.com