process control block (pcb, also called task controlling block, task struct, or switchframe) 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". pages 57-58 ==role== the role of the pcbs is central in process management: they are accessed and/or modified by most os utilities, including those involved with scheduling, memory and i/o resource access and performance monitoring. it can be said that the set of the pcbs defines the current state of the operating system. data structuring for processes is often done in terms of pcbs. for example, pointers to other pcbs inside a pcb allow the creation of those queues of processes in various scheduling states ("ready", "blocked", etc.) that we previously mentioned. ==structure== in modern sophisticated multitasking systems, the pcb stores many different items of data, all needed for correct and efficient process management. though the details of these structures are obviously system-dependent, we can identify some very common parts, and classify them in three main categories: * process identification data * processor state data * process control data process identification data always include a unique identifier for the process (almost invariably an integer number) and, in a multiuser-multitasking system, data like the identifier of the parent process, user identifier, user group identifier, etc. the process id is particularly relevant, since it's often used to cross-reference the os tables defined above, e.g. allowing to identify which process is using which i/o devices, or memory areas. processor state data are those pieces of information that define the status of a process when it's suspended, allowing the os to restart it later and still execute correctly. this always includes the content of the cpu general-purpose registers, the cpu process status word, stack and frame pointers etc. during 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. process control information is used by the os to manage the process itself. this includes: * the process scheduling state, e.g. i
Process_(computing)