Process Control Block (PCB)
• Each process is represented in the operating system by a process control block
at e
G
(PCB) — also called a task control block.
e
• PCB simply serves as the repository for any information that may vary from
g
process to process. It contains many pieces of information associated with a
specific process, including these:
d
• Process state: The state may be new, ready, running, waiting, halted, and so
on.
l e
• Program counter: The counter indicates the address of the next instruction to
be executed for this process.
w
o
• CPU registers: The registers vary in number and type, depending on the
computer architecture. They include accumulators, index registers, stack
n
pointers, and general-purpose registers, plus any condition-code information.
Along with the program counter, this state information must be saved when
an interrupt occurs, to allow the process to be continued correctly afterward.
[Link]
• CPU-scheduling information: This information includes a
process priority, pointers to scheduling queues, and any
other scheduling parameters.
at e
e G
• Memory-management information: This information may
include such items as the value of the base and limit
g
registers and the page tables, or the segment tables,
d
depending on the memory system used by the operating
e
system.
w l
• Accounting information: This information includes the
amount of CPU and real time used, time limits, account
o
numbers, job or process numbers, and so on.
n
• I/O status information: This information includes the list
of I/O devices allocated to the process, a list of open files,
and so on.
[Link]