The Full Wiki

More info on Process control block

Process control block: Wikis

  

Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.

Encyclopedia

From Wikipedia, the free encyclopedia

A Process Control Block (PCB, also called Task Control Block or Task Struct) is a data structure in the operating system kernel containing the information needed to manage a particular process. The PCB is "the manifestation of a process in an operating system".[1]

Included information

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 and stack pointer values for the process.
  • The address space for the process
  • Priority (in which higher priority process gets first preference. eg., nice value on Unix operating systems)
  • Process accounting information, such as when the process was last run, how much CPU time it has accumulated, etc.
  • Pointer to the next PCB i.e. pointer to the PCB of the next process to run
  • I/O Information (i.e. I/O devices allocated to this process, list of opened files, etc)

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 from the PCB of the new process.

Location of the PCB

Since the PCB contains the critical information for the process, it must be kept in an area of memory protected from normal user access. 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. [2]

Notes

  1. ^ Deitel, Harvey M. (1984) [1982]. An introduction to operating systems (revisited first edition ed.). Addison-Wesley. pp. 673. ISBN 0-201-14502-2. http://portal.acm.org/citation.cfm?id=79046&dl=GUIDE&coll=GUIDE.   pages 57-58
  2. ^ Yong, Zhang, "Breaking through the Maximum Process Number", Linux Journal, 1 Jan 2004, [1].

Study guide

Up to date as of January 14, 2010

From Wikiversity

A Process Control Block (PCB, also called Task Control Block or Task Struct) is a data structure in the operating system kernel containing the information needed to manage a particular process. The PCB is "the manifestation of a process in an operating system".[1]

Included information 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 priority A list of open files & sockets Process accounting information, such as when the process was last run, how much CPU time it has accumulated, etc. Pointer to the next PCB i.e. pointer to the PCB of the next process to run 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 from the PCB of the new process.

Location of the PCB

Since the PCB contains the critical information for the process, it must be kept in an area of memory protected from normal user access. 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. [2]








Got something to say? Make a comment.
Your name
Your email address
Message