SlideShare una empresa de Scribd logo
1 de 2
MODULE IN ITE229 - OPERATING SYSTEMS 14
                              Prepared by: For-Ian V. Sandoval



                             LESSON 7
                      PROCESS CONTROL BLOCK


      All of the information needed to keep track of a process when
switching is kept in a data package called a process control block. 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".

       The process control block typically contains:

   •   An ID number that identifies the process (Process Identifier)
   •   Pointers to the locations in the program and its data where
       processing last occurred
   •   Register contents
   •   States of various flags and switches
   •   Pointers to the upper and lower bounds of the memory required for
       the process
   •   A list of files opened by the process
   •   The priority of the process
   •   The status of all I/O devices needed by the process

       Each process has a status associated with it. Many processes
consume no CPU time until they get some sort of input. For example, a
process might be waiting for a keystroke from the user. While it is waiting
for the keystroke, it uses no CPU time. While it's waiting, it is "suspended".
When the keystroke arrives, the OS changes its status. When the status of
the process changes, from pending to active, for example, or from
suspended to running, the information in the process control block must
be used like the data in any other program to direct execution of the task-
switching portion of the operating system.

       This process swapping happens without direct user interference,
and each process gets enough CPU cycles to accomplish its task in a
reasonable amount of time. Trouble can begin if the user tries to have too
many processes functioning at the same time. The operating system itself
requires some CPU cycles to perform the saving and swapping of all the
registers, queues and stacks of the application processes. If enough
processes are started, and if the operating system hasn't been carefully
designed, the system can begin to use the vast majority of its available
MODULE IN ITE229 - OPERATING SYSTEMS 15
                               Prepared by: For-Ian V. Sandoval

CPU cycles to swap between processes rather than run processes. When
this happens, it's called thrashing, and it usually requires some sort of direct
user intervention to stop processes and bring order back to the system.

       One way that operating-system designers reduce the chance of
thrashing is by reducing the need for new processes to perform various
tasks. Some operating systems allow for a "process-lite," called a thread,
that can deal with all the CPU-intensive work of a normal process, but
generally does not deal with the various types of I/O and does not
establish structures requiring the extensive process control block of a
regular process. A process may start many threads or other processes, but
a thread cannot start a process.

        So far, all the scheduling we've discussed has concerned a single
CPU. In a system with two or more CPUs, the operating system must divide
the workload among the CPUs, trying to balance the demands of the
required processes with the available cycles on the different CPUs.
Asymmetric operating systems use one CPU for their own needs and
divide application processes among the remaining CPUs. Symmetric
operating systems divide themselves among the various CPUs, balancing
demand versus CPU availability even when the operating system itself is all
that's running.

       If the operating system is the only software with execution needs,
the CPU is not the only resource to be scheduled. Memory management
is the next crucial step in making sure that all processes run smoothly.

Más contenido relacionado

La actualidad más candente

Process concept
Process conceptProcess concept
Process concept
jangezkhan
 
Processes Control Block (Operating System)
Processes Control Block (Operating System)Processes Control Block (Operating System)
Processes Control Block (Operating System)
Imdad Ullah
 
12 process control blocks
12 process control blocks12 process control blocks
12 process control blocks
myrajendra
 
Operating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringOperating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - Engineering
Yogesh Santhan
 

La actualidad más candente (18)

Process concept
Process conceptProcess concept
Process concept
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - Processes
 
Process of operating system
Process of operating systemProcess of operating system
Process of operating system
 
Processes Control Block (Operating System)
Processes Control Block (Operating System)Processes Control Block (Operating System)
Processes Control Block (Operating System)
 
OS Chapter03
OS Chapter03OS Chapter03
OS Chapter03
 
Basic concept of process
Basic concept of processBasic concept of process
Basic concept of process
 
Pcb
PcbPcb
Pcb
 
Process life cycle
Process life cycleProcess life cycle
Process life cycle
 
12 process control blocks
12 process control blocks12 process control blocks
12 process control blocks
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
 
Processes and operating systems
Processes and operating systemsProcesses and operating systems
Processes and operating systems
 
My ppt @ bec doms on process management
My ppt @ bec doms on process managementMy ppt @ bec doms on process management
My ppt @ bec doms on process management
 
Lecture 8 9 process_concept
Lecture 8 9 process_conceptLecture 8 9 process_concept
Lecture 8 9 process_concept
 
Unix Process management
Unix Process managementUnix Process management
Unix Process management
 
Operating system 18 process creation and termination
Operating system 18 process creation and terminationOperating system 18 process creation and termination
Operating system 18 process creation and termination
 
Operating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - EngineeringOperating Systems Unit Two - Fourth Semester - Engineering
Operating Systems Unit Two - Fourth Semester - Engineering
 

Similar a Lesson 7 Process Control Block

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
 
23565104 process-management(2)
23565104 process-management(2)23565104 process-management(2)
23565104 process-management(2)
Anuj Malhotra
 
Operating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxOperating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptx
Amanuelmergia
 

Similar a Lesson 7 Process Control Block (20)

Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of Process
 
Processing management
Processing managementProcessing management
Processing management
 
Unit 2 part 1(Process)
Unit 2 part 1(Process)Unit 2 part 1(Process)
Unit 2 part 1(Process)
 
Operating system
Operating systemOperating system
Operating system
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process management
 
OS ppt.pdf
OS ppt.pdfOS ppt.pdf
OS ppt.pdf
 
OS-Process.pdf
OS-Process.pdfOS-Process.pdf
OS-Process.pdf
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
 
Operating system - Process and its concepts
Operating system - Process and its conceptsOperating system - Process and its concepts
Operating system - Process and its concepts
 
Lesson 6 Processor Management
Lesson 6 Processor ManagementLesson 6 Processor Management
Lesson 6 Processor Management
 
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
 
Process
ProcessProcess
Process
 
OPERATING SYSTEM - SHORT NOTES
OPERATING SYSTEM - SHORT NOTESOPERATING SYSTEM - SHORT NOTES
OPERATING SYSTEM - SHORT NOTES
 
23565104 process-management(2)
23565104 process-management(2)23565104 process-management(2)
23565104 process-management(2)
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
 
Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
 
Operating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptxOperating Systems chap 2_updated2.pptx
Operating Systems chap 2_updated2.pptx
 
UNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdfUNIT-2-Process-Management.pdf
UNIT-2-Process-Management.pdf
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
 
Operating system || Chapter 3: Process
Operating system || Chapter 3: ProcessOperating system || Chapter 3: Process
Operating system || Chapter 3: Process
 

Más de Laguna State Polytechnic University

Más de Laguna State Polytechnic University (20)

Number Theory - Lesson 1 - Introduction to Number Theory
Number Theory - Lesson 1 - Introduction to Number TheoryNumber Theory - Lesson 1 - Introduction to Number Theory
Number Theory - Lesson 1 - Introduction to Number Theory
 
Formal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and QuantifiersFormal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and Quantifiers
 
Machine Learning Algorithms (Part 1)
Machine Learning Algorithms (Part 1)Machine Learning Algorithms (Part 1)
Machine Learning Algorithms (Part 1)
 
Artificial Intelligence Algorithms
Artificial Intelligence AlgorithmsArtificial Intelligence Algorithms
Artificial Intelligence Algorithms
 
Formal Logic - Lesson 7 - Rules of Inference
Formal Logic - Lesson 7 - Rules of InferenceFormal Logic - Lesson 7 - Rules of Inference
Formal Logic - Lesson 7 - Rules of Inference
 
Formal Logic - Lesson 6 - Switching Circuits
Formal Logic - Lesson 6 - Switching CircuitsFormal Logic - Lesson 6 - Switching Circuits
Formal Logic - Lesson 6 - Switching Circuits
 
Formal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical EquivalenceFormal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical Equivalence
 
Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and ContingencyFormal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
 
Formal Logic - Lesson 3 - Truth Tables
Formal Logic - Lesson 3 - Truth TablesFormal Logic - Lesson 3 - Truth Tables
Formal Logic - Lesson 3 - Truth Tables
 
Formal Logic - Lesson 2 - Logical Connectives
Formal Logic - Lesson 2 - Logical ConnectivesFormal Logic - Lesson 2 - Logical Connectives
Formal Logic - Lesson 2 - Logical Connectives
 
Formal Logic - Lesson 1 - Introduction to Logic
Formal Logic - Lesson 1 - Introduction to LogicFormal Logic - Lesson 1 - Introduction to Logic
Formal Logic - Lesson 1 - Introduction to Logic
 
Ethical Issues and Relevant Laws on Computing
Ethical Issues and Relevant Laws on ComputingEthical Issues and Relevant Laws on Computing
Ethical Issues and Relevant Laws on Computing
 
Number Systems Basic Concepts
Number Systems Basic ConceptsNumber Systems Basic Concepts
Number Systems Basic Concepts
 
Number Systems Basic Concepts
Number Systems Basic ConceptsNumber Systems Basic Concepts
Number Systems Basic Concepts
 
Exploring the Difference Between Information Technology and Information System
Exploring the Difference Between Information Technology and Information SystemExploring the Difference Between Information Technology and Information System
Exploring the Difference Between Information Technology and Information System
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Introduction to Computers
Introduction to ComputersIntroduction to Computers
Introduction to Computers
 
Introduction to Computing Logic Formulation
Introduction to Computing Logic FormulationIntroduction to Computing Logic Formulation
Introduction to Computing Logic Formulation
 
Oasis of Sparkling and Refreshing Truisms
Oasis of Sparkling and Refreshing TruismsOasis of Sparkling and Refreshing Truisms
Oasis of Sparkling and Refreshing Truisms
 
My Teacher Got IT v2.0 - Software Installation Track
My Teacher Got IT v2.0 - Software Installation TrackMy Teacher Got IT v2.0 - Software Installation Track
My Teacher Got IT v2.0 - Software Installation Track
 

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Último (20)

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 

Lesson 7 Process Control Block

  • 1. MODULE IN ITE229 - OPERATING SYSTEMS 14 Prepared by: For-Ian V. Sandoval LESSON 7 PROCESS CONTROL BLOCK All of the information needed to keep track of a process when switching is kept in a data package called a process control block. 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". The process control block typically contains: • An ID number that identifies the process (Process Identifier) • Pointers to the locations in the program and its data where processing last occurred • Register contents • States of various flags and switches • Pointers to the upper and lower bounds of the memory required for the process • A list of files opened by the process • The priority of the process • The status of all I/O devices needed by the process Each process has a status associated with it. Many processes consume no CPU time until they get some sort of input. For example, a process might be waiting for a keystroke from the user. While it is waiting for the keystroke, it uses no CPU time. While it's waiting, it is "suspended". When the keystroke arrives, the OS changes its status. When the status of the process changes, from pending to active, for example, or from suspended to running, the information in the process control block must be used like the data in any other program to direct execution of the task- switching portion of the operating system. This process swapping happens without direct user interference, and each process gets enough CPU cycles to accomplish its task in a reasonable amount of time. Trouble can begin if the user tries to have too many processes functioning at the same time. The operating system itself requires some CPU cycles to perform the saving and swapping of all the registers, queues and stacks of the application processes. If enough processes are started, and if the operating system hasn't been carefully designed, the system can begin to use the vast majority of its available
  • 2. MODULE IN ITE229 - OPERATING SYSTEMS 15 Prepared by: For-Ian V. Sandoval CPU cycles to swap between processes rather than run processes. When this happens, it's called thrashing, and it usually requires some sort of direct user intervention to stop processes and bring order back to the system. One way that operating-system designers reduce the chance of thrashing is by reducing the need for new processes to perform various tasks. Some operating systems allow for a "process-lite," called a thread, that can deal with all the CPU-intensive work of a normal process, but generally does not deal with the various types of I/O and does not establish structures requiring the extensive process control block of a regular process. A process may start many threads or other processes, but a thread cannot start a process. So far, all the scheduling we've discussed has concerned a single CPU. In a system with two or more CPUs, the operating system must divide the workload among the CPUs, trying to balance the demands of the required processes with the available cycles on the different CPUs. Asymmetric operating systems use one CPU for their own needs and divide application processes among the remaining CPUs. Symmetric operating systems divide themselves among the various CPUs, balancing demand versus CPU availability even when the operating system itself is all that's running. If the operating system is the only software with execution needs, the CPU is not the only resource to be scheduled. Memory management is the next crucial step in making sure that all processes run smoothly.