Process control block

From Free net encyclopedia

(Difference between revisions)
Revision as of 20:20, 26 March 2006
TimBentley (Talk | contribs)
Corrected link to disambiguation page. (you can help!)
← Previous diff
Current revision
TimBentley (Talk | contribs)
Corrected link to disambiguation page. (you can help!)

Current revision

A Process Control Block (PCB, also called Task Control Block or Task Struct) is a data structure in the operating system kernel representing the state of a given process. In some operating systems the PCB is placed in the beginning of the kernel stack of the process since that is a convenient protected location.

Implementations differ, but in general a PCB will include, directly or indirectly:

  • The identifier of the process (a process identifier, or PID)
  • Register values for the process including, notably,
    the Program Counter value for the process
  • The address space for the process
  • A list of open files & sockets
  • Process accounting information, such as when the process was last run, how much CPU time it has accumulated, etcetera.

During a context switch, the running process is stopped and another process is given a chance to run. The kernel must stop the execution of the running process, copy out the values in hardware registers to its PCB, and update the hardware registers with the values of the new process.de:Prozesstabelle fr:Process Control Block it:Process control block zh:行程控制表