SlideShare a Scribd company logo
PROCESS CONTROL BLOCK
Introduction :
• It is a data structure in the OS kernel containing the information
needed to manage the scheduling of a particular process.
• Other names:
Task Controlling Block, Entry of the Process Table, Task Struct, or Switchframe.
• The PCB is "the manifestation of a process in an operating system."
Role :
• The role of the PCBs is central in process management:
• Accessed and/or modified by most OS utilities, including those involved with
scheduling, memory and I/O resource access and performance monitoring.
• 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.).
Structure :
• In modern multitasking systems,
• PCB stores :
1. Process identification data
2. Process state data
3. Process control data
• Process identification :
• data always include a unique identifier for the process
• 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 is
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.
• Process state :
• data define the status of a process when it is suspended, allowing the OS to restart it
later and still execute correctly.
• 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:
1. The process scheduling state: The state of the process in terms of "ready",
"suspended", etc., and other scheduling information as well, like 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.
2. Process structuring information: 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.
3. Interprocess communication information: various flags, signals and messages
associated with the communication among independent processes may be
stored in the PCB.
4. Process Privileges in terms of allowed/disallowed access to system resources.
PCB :
• Process State: State may enter into new, ready, running, waiting, dead depending
on CPU scheduling.
• Process Number (PID): A unique identification number for each process in the
operating system (also known as Process ID).
• Program Counter (PC): A pointer to the address of the next instruction to be
executed for this process.
• CPU Registers: Indicates various register set of CPU where process need to be
stored for execution for running state.
• CPU Scheduling Information: indicates the information of a process with which it
uses the CPU time through scheduling.
• Memory Management Information: includes the information of page table,
memory limits, Segment table depending on memory used by the operating
system.
• Accounting Information: Includes the amount of CPU used for process execution,
time limits, execution ID etc.
• I/O Status Information: Includes a list of I/O devices allocated to the process.
Location :
• Since 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 as it is a convenient protected location
• Kernel stack
Thank You

More Related Content

What's hot

Os Threads
Os ThreadsOs Threads
Os Threads
Salman Memon
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
Mukesh Chinta
 
Deadlock Avoidance - OS
Deadlock Avoidance - OSDeadlock Avoidance - OS
Deadlock Avoidance - OS
MsAnita2
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
Chetan Mahawar
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
Dhaval Sakhiya
 
File concept and access method
File concept and access methodFile concept and access method
File concept and access method
rajshreemuthiah
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
Janki Shah
 
Memory management
Memory managementMemory management
Memory management
Vishal Singh
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
usmankiyani1
 
Dbms 14: Relational Calculus
Dbms 14: Relational CalculusDbms 14: Relational Calculus
Dbms 14: Relational Calculus
Amiya9439793168
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
Kamal Acharya
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structures
Mukesh Chinta
 
Cache memory
Cache memoryCache memory
Cache memoryAnuj Modi
 
Elmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 pptElmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 ppt
AbhinavPandey274499
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
rprajat007
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
hashim102
 
Disk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemDisk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating System
Meghaj Mallick
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
madhav bansal
 

What's hot (20)

Os Threads
Os ThreadsOs Threads
Os Threads
 
Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
Deadlock Avoidance - OS
Deadlock Avoidance - OSDeadlock Avoidance - OS
Deadlock Avoidance - OS
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
 
File concept and access method
File concept and access methodFile concept and access method
File concept and access method
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
 
Memory management
Memory managementMemory management
Memory management
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
 
Dbms 14: Relational Calculus
Dbms 14: Relational CalculusDbms 14: Relational Calculus
Dbms 14: Relational Calculus
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structures
 
Cache memory
Cache memoryCache memory
Cache memory
 
Elmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 pptElmasri Navathe DBMS Unit-1 ppt
Elmasri Navathe DBMS Unit-1 ppt
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
 
Disk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemDisk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating System
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 

Similar to Process control block(PCB)

Process Control Block.pptx
Process Control Block.pptxProcess Control Block.pptx
Process Control Block.pptx
SayedAbdullah31
 
Unit 2 part 1(Process)
Unit 2 part 1(Process)Unit 2 part 1(Process)
Unit 2 part 1(Process)
WajeehaBaig
 
Chapter03
Chapter03Chapter03
Chapter03
kamran zamanifar
 
Chap3.ppt
Chap3.pptChap3.ppt
Chap3.ppt
amerdawood2
 
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of Process
Shipra Swati
 
Lecture5
Lecture5Lecture5
Lecture5
Ali Shah
 
Process management1
Process management1Process management1
Process management1
muhammad Juman Dahar
 
The process states
The process statesThe process states
The process states
Ajay Singh Rana
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process management
Arnav Chowdhury
 
process control block
process control blockprocess control block
process control block
Vikas SHRIVASTAVA
 
Lecture 2- Processes.pdf
Lecture 2- Processes.pdfLecture 2- Processes.pdf
Lecture 2- Processes.pdf
Amanuelmergia
 
Operating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxOperating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptx
Amanuelmergia
 
Operating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxOperating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptx
Amanuelmergia
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
AyushSharma651966
 
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
morganjohn3
 
Basic concept of process
Basic concept of processBasic concept of process
Basic concept of process
Nabin Dahal
 
Lesson 7 Process Control Block
Lesson 7 Process Control BlockLesson 7 Process Control Block
Lesson 7 Process Control Block
Laguna State Polytechnic University
 
Process
ProcessProcess

Similar to Process control block(PCB) (20)

Process Control Block.pptx
Process Control Block.pptxProcess Control Block.pptx
Process Control Block.pptx
 
Pcb
PcbPcb
Pcb
 
Unit 2 part 1(Process)
Unit 2 part 1(Process)Unit 2 part 1(Process)
Unit 2 part 1(Process)
 
Chapter03
Chapter03Chapter03
Chapter03
 
Chap3.ppt
Chap3.pptChap3.ppt
Chap3.ppt
 
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of Process
 
Lecture5
Lecture5Lecture5
Lecture5
 
Process management1
Process management1Process management1
Process management1
 
The process states
The process statesThe process states
The process states
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process management
 
process control block
process control blockprocess control block
process control block
 
Lecture 2- Processes.pdf
Lecture 2- Processes.pdfLecture 2- Processes.pdf
Lecture 2- Processes.pdf
 
Operating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxOperating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptx
 
Operating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptxOperating Systems chap 2_updated2 (1).pptx
Operating Systems chap 2_updated2 (1).pptx
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
 
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
Module 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModule 2 - PPT.pdfModul...
 
Basic concept of process
Basic concept of processBasic concept of process
Basic concept of process
 
Process part 1
Process   part 1Process   part 1
Process part 1
 
Lesson 7 Process Control Block
Lesson 7 Process Control BlockLesson 7 Process Control Block
Lesson 7 Process Control Block
 
Process
ProcessProcess
Process
 

Recently uploaded

AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
The Role of Electrical and Electronics Engineers in IOT Technology.pdf
The Role of Electrical and Electronics Engineers in IOT Technology.pdfThe Role of Electrical and Electronics Engineers in IOT Technology.pdf
The Role of Electrical and Electronics Engineers in IOT Technology.pdf
Nettur Technical Training Foundation
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 

Recently uploaded (20)

AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
The Role of Electrical and Electronics Engineers in IOT Technology.pdf
The Role of Electrical and Electronics Engineers in IOT Technology.pdfThe Role of Electrical and Electronics Engineers in IOT Technology.pdf
The Role of Electrical and Electronics Engineers in IOT Technology.pdf
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 

Process control block(PCB)

  • 2. Introduction : • It is a data structure in the OS kernel containing the information needed to manage the scheduling of a particular process. • Other names: Task Controlling Block, Entry of the Process Table, Task Struct, or Switchframe. • The PCB is "the manifestation of a process in an operating system."
  • 3. Role : • The role of the PCBs is central in process management: • Accessed and/or modified by most OS utilities, including those involved with scheduling, memory and I/O resource access and performance monitoring. • 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.).
  • 4. Structure : • In modern multitasking systems, • PCB stores : 1. Process identification data 2. Process state data 3. Process control data
  • 5. • Process identification : • data always include a unique identifier for the process • 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 is 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. • Process state : • data define the status of a process when it is suspended, allowing the OS to restart it later and still execute correctly. • 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.
  • 6. • Process control information : • Is used by the OS to manage the process itself. • This includes: 1. The process scheduling state: The state of the process in terms of "ready", "suspended", etc., and other scheduling information as well, like 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. 2. Process structuring information: 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. 3. Interprocess communication information: various flags, signals and messages associated with the communication among independent processes may be stored in the PCB. 4. Process Privileges in terms of allowed/disallowed access to system resources.
  • 8. • Process State: State may enter into new, ready, running, waiting, dead depending on CPU scheduling. • Process Number (PID): A unique identification number for each process in the operating system (also known as Process ID). • Program Counter (PC): A pointer to the address of the next instruction to be executed for this process. • CPU Registers: Indicates various register set of CPU where process need to be stored for execution for running state. • CPU Scheduling Information: indicates the information of a process with which it uses the CPU time through scheduling. • Memory Management Information: includes the information of page table, memory limits, Segment table depending on memory used by the operating system. • Accounting Information: Includes the amount of CPU used for process execution, time limits, execution ID etc. • I/O Status Information: Includes a list of I/O devices allocated to the process.
  • 9. Location : • Since 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 as it is a convenient protected location • Kernel stack