1
Understand Process Management
: Process Control Blocks
HOME PREVIOUS TOPIC NEXT
PREVIOUS QUESTION PAPERS FOR OS
CPP TUTORIALS
2
Recap
In the last class, you have learnt
•Process, Process State Diagram
•Sequential Process
3
Objectives
On completion of this period, you would be able to
know
•Understand the Structure of Process Control Block
Process Control Block
•Each process is represented in the operating
system by a Process control block ( PCB )
•PCB is also called a Task Control Block
•PCB contains specific information associated to
a process
•PCB consisting of various information is shown
in next slide
4
5
Process Control Block ( PCB )
6
Process Control Block ( PCB )
Process control block consists of following information:
• Pointer
• Process state
• Process number
• Program counter
• CPU Register
• CPU-Scheduling Information
• Memory-Management Information
• Accounting Information
• I/O status Information
7
Pointer
• It contains the address of another process which is
present in the ready queue
Process State
•It contains information about the state of the process i.e.,
•New
•Ready
•Running
•Waiting
•Halted
Process Control Block ( PCB )
8
Program counter
•The address of the next instruction to be executed
CPU Registers
•The registers vary in no. and type depending on the
type of computer architecture, they include:
•Accumulators, index registers, stack pointers and general
purpose registers
Process Control Block ( PCB )
Process Control Block ( PCB )
CPU scheduling information
•This information includes
–Process priority
–Pointer to scheduling queues
–Other scheduling parameters
Memory management information
•This information includes
–Value of base and limit registers
–Page tables
–Segment tables
9
10
Process Control Block ( PCB )
Accounting information:
•This information includes
•Amount of CPU and real time used
•Time limits
•Account numbers
•Job or Process no.s etc.
I/O status information
•This information includes
•List of I/O devices allocated to the process
•List of open files, etc
11
CPU Switch from Process to Process
Save state into PCB
0
Reload state from PCB
1
Save state into PCB
1
Reload state from PCB
0
Interrupt or system call
idle
executing
executing
executing
idle
idle
Process 0 Process 1
12
Summary
In this class, you have learnt
•The structure of a Process Control Block
•Various pieces of information associated with a specific
process
•The sequence of activities that occur when CPU
switches from process to process
13
Quiz
1.PCB stands for process control board
a) True
b) False
2.Process control block does not contain any
information about process state .
a) True
b) False
3.The information stored in a PCB varies from
process to process.
a) True
b) False
14
Frequently Asked Questions
1.Explain the structure of a process control
block with the help of a diagram.
Other subject materials
•Web designing
•Micro processors
•C++ tutorials
•java
home