Skip to main content
Engineering LibreTexts

8.6: Process Control

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)

    Process Table and Process Control Block (PCB)

    While creating a process the operating system performs several operations. To identify the processes, it assigns a process identification number (PID) to each process. As the operating system supports multi-programming, it needs to keep track of all the processes. For this task, the process control block (PCB) is used to track the process’s execution status. Each block of memory contains information about the process state, program counter, stack pointer, status of opened files, scheduling algorithms, etc. All these information is required and must be saved when the process is switched from one state to another. When the process makes a transition from one state to another, the operating system must update information in the process’s PCB.

    A process control block (PCB) contains information about the process, i.e. registers, quantum, priority, etc. The process table is an array of PCB’s, that means logically contains a PCB for all of the current processes in the system.


    Figure \(\PageIndex{1}\): Process Control Block. ("Process Control Block" by magbeneGeeks for Geeks is licensed under CC BY-SA 4.0)

    • Process scheduling state –The state of the process in terms of "ready", "suspended", etc., and other scheduling information as well, such as priority value, the amount of time elapsed since the process gained control of the CPU or since it was suspended. Also, in case of a suspended process, event identification data must be recorded for the event the process is waiting for.
    • Process structuring information – the process's children id's, or the id's of other processes related to the current one in some functional way, which may be represented as a queue, a ring or other data structures
    • 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.
    • 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 Management Information This field contains the information about memory management system used by operating system. This may include the page tables, segment tables etc.
    • Open files list – This information includes the list of files opened for a process.
    • Interprocess communication information – flags, signals and messages associated with the communication among independent processes
    • Process Privileges – allowed/disallowed access to system resources
    • Process State – new, ready, running, waiting, dead
    • Process Number (PID) – unique identification number for each process (also known as Process ID)
    • Program Counter (PC) – A pointer to the address of the next instruction to be executed for this process
    • CPU Scheduling Information – information scheduling CPU time
    • Accounting Information – amount of CPU used for process execution, time limits, execution ID etc.
    • I/O Status Information – list of I/O devices allocated to the process.
    Figure \(\PageIndex{1}\): Process Table and Process Control Block. ("Process Table and Process Control Block" by magbeneGeeks for Geeks is licensed under CC BY-SA 4.0)

    Adapted from:
    "Process Table and Process Control Block (PCB)" by magbeneGeeks for Geeks is licensed under CC BY-SA 4.0
    "Process control block" by ultiple ContributorsWikipedia is licensed under CC BY-SA 3.0

    8.6: Process Control is shared under a CC BY-SA license and was authored, remixed, and/or curated by Patrick McClanahan.

    • Was this article helpful?