Process Control Block
By : Jose Lorenzo Faelman
I. Process State
It stores the respective state of the process.
1. Start - This is the initial state when a
process is first started/created.
2. Ready - The process is waiting to be
assigned to a processor.
3. Running - Once the process has been
assigned to a processor by the OS
scheduler, the process state is set to
running and the processor executes its
instructions.
4. Waiting - Process moves into the
waiting state if it needs to wait for a
resource.
5. Terminated/Exit - Once the process
finishes its execution, or it is terminated
by the operating system, it is moved to
the terminated state where it waits to
be removed from main memory.
Process Number
Every process is assigned
with a unique id known as
process ID or PID which
stores the process
identifier.
Program Counter
It stores the counter which
contains the address of the
next instruction that is to be
executed for the process.
Register
These are the CPU registers
which includes: accumulator,
base, registers and general
purpose registers.
Memory Limits
This includes the information
of page table, memory limits,
and segment table,
depending on the memory
used by the operating
system.
Open Files List
This information includes the
list of files opened for a
process.
Pointer
It is a stack pointer which is
required to be saved when
the process is switched from
one state to another to retain
the current position of the
process.
CPU Scheduling
Information
Process priority and other
scheduling information which
is required to schedule the
process.
Accounting
Information:
This includes the amount of
CPU used for process
execution, time limits,
execution ID, and so on.
IO Status
Information
This includes a list of I/O
devices allocated to the
process.