SlideShare a Scribd company logo
Process Concept<br />Process Scheduling<br />Operations on Processes<br />Cooperating Processes<br />Interprocess Communication<br />Communication in Client-Server Systems<br />Process Concept<br />An operating system executes a variety of programs:<br />Batch system – jobs<br />Time-shared systems – user programs or tasks<br />Textbook uses the terms job and process almost interchangeably<br />Process – a program in execution; process execution must progress in sequential fashion<br />A process includes:<br />program counter <br />stack<br />data section<br />Process State<br />As a process executes, it changes state <br />new:  The process is being created<br />running:  Instructions are being executed<br />waiting:  The process is waiting for some event to occur<br />ready:  The process is waiting to be assigned to a process<br />314325262255terminated:  The process has finished execution<br />Process Control Block (PCB)<br />Information associated with each process<br />Process state<br />Program counter<br />CPU registers<br />CPU scheduling information<br />Memory-management information<br />Accounting information<br />I/O status informationCPU Switch From Process to Process<br />16192540005227647640005<br />Process Scheduling Queues<br />Job queue – set of all processes in the system<br />Ready queue – set of all processes residing in main memory, ready and waiting to execute<br />Device queues – set of processes waiting for an I/O device<br />Process migration between the various queues<br />Ready Queue And Various I/O Device Queues<br />Representation of Process Scheduling<br />Schedulers<br />Long-term scheduler (or job scheduler) – selects which processes should be brought into the ready queue<br />Short-term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU<br />Addition of Medium Term Scheduling<br />371475-114300<br />Schedulers (Cont.)<br />Short-term scheduler is invoked very frequently (milliseconds)  (must be fast)<br />Long-term scheduler is invoked very infrequently (seconds, minutes)  (may be slow)<br />The long-term scheduler controls the degree of multiprogramming<br />Processes can be described as either:<br />I/O-bound process – spends more time doing I/O than computations, many short CPU bursts<br />CPU-bound process – spends more time doing computations; few very long CPU bursts<br />Context Switch<br />When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process<br />Context-switch time is overhead; the system does no useful work while switching<br />Time dependent on hardware support<br />Process Creation<br />Parent process create children processes, which, in turn create other processes, forming a tree of processes<br />Resource sharing<br />Parent and children share all resources<br />Children share subset of parent’s resources<br />Parent and child share no resources<br />Execution<br />Parent and children execute concurrently<br />Parent waits until children terminate<br />Process Creation (Cont.)<br />Address space<br />Child duplicate of parent<br />Child has a program loaded into it<br />UNIX examples<br />fork system call creates new process<br />exec system call used after a fork to replace the process’ memory space with a new program<br />
Process concept
Process concept
Process concept

More Related Content

What's hot

Process management in os
Process management in osProcess management in os
Process management in osSumant Diwakar
 
Basic concept of process
Basic concept of processBasic concept of process
Basic concept of process
Nabin Dahal
 
12 process control blocks
12 process control blocks12 process control blocks
12 process control blocksmyrajendra
 
水晶礦脈
水晶礦脈水晶礦脈
水晶礦脈
guest2571e4
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
Mukesh Chinta
 
Process
ProcessProcess
Process management
Process managementProcess management
Process management
Birju Tank
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
Khushboo Jain
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
Deepika Balichwal
 
process control block
process control blockprocess control block
process control block
Vikas SHRIVASTAVA
 
process control blockPcb
process control blockPcbprocess control blockPcb
process control blockPcbParul Shree
 
Processes description and process control.
Processes description and process control.Processes description and process control.
Processes description and process control.
Ahsan Rahim
 
Process life cycle
Process life cycleProcess life cycle
Process life cycle
Gunjan Kumar
 
Process management1
Process management1Process management1
Process management1
muhammad Juman Dahar
 
Schudling os presentaion
Schudling os presentaionSchudling os presentaion
Schudling os presentaion
inayat khan
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - Processes
Peter Tröger
 
Operating system 28 fundamental of scheduling
Operating system 28 fundamental of schedulingOperating system 28 fundamental of scheduling
Operating system 28 fundamental of scheduling
Vaibhav Khanna
 
Unix Process management
Unix Process managementUnix Process management
Unix Process management
Wave Digitech
 

What's hot (19)

Process management in os
Process management in osProcess management in os
Process management in os
 
Basic concept of process
Basic concept of processBasic concept of process
Basic concept of process
 
12 process control blocks
12 process control blocks12 process control blocks
12 process control blocks
 
水晶礦脈
水晶礦脈水晶礦脈
水晶礦脈
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
Process
ProcessProcess
Process
 
OS Chapter03
OS Chapter03OS Chapter03
OS Chapter03
 
Process management
Process managementProcess management
Process management
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
process control block
process control blockprocess control block
process control block
 
process control blockPcb
process control blockPcbprocess control blockPcb
process control blockPcb
 
Processes description and process control.
Processes description and process control.Processes description and process control.
Processes description and process control.
 
Process life cycle
Process life cycleProcess life cycle
Process life cycle
 
Process management1
Process management1Process management1
Process management1
 
Schudling os presentaion
Schudling os presentaionSchudling os presentaion
Schudling os presentaion
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - Processes
 
Operating system 28 fundamental of scheduling
Operating system 28 fundamental of schedulingOperating system 28 fundamental of scheduling
Operating system 28 fundamental of scheduling
 
Unix Process management
Unix Process managementUnix Process management
Unix Process management
 

Similar to Process concept

Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
MeghaSharma474761
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
AyushSharma651966
 
Ch2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.pptCh2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.ppt
Mohammad Almuiet
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
Mani Deepak Choudhry
 
L-5 BCEProcess management.ppt
L-5 BCEProcess management.pptL-5 BCEProcess management.ppt
L-5 BCEProcess management.ppt
Kirti Verma
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
HikaTariku
 
23565104 process-management(2)
23565104 process-management(2)23565104 process-management(2)
23565104 process-management(2)Anuj Malhotra
 
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of Process
Shipra Swati
 
unit-2.pdf
unit-2.pdfunit-2.pdf
unit-2.pdf
071ROHETHSIT
 
Operating System Process Management.pptx
Operating System Process Management.pptxOperating System Process Management.pptx
Operating System Process Management.pptx
minaltmv
 
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
Vaibhav Khanna
 
OS_Unit_II_Ch3 Process and CPU Scheduling
OS_Unit_II_Ch3 Process and CPU SchedulingOS_Unit_II_Ch3 Process and CPU Scheduling
OS_Unit_II_Ch3 Process and CPU Scheduling
SDivya19
 
OS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptxOS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptx
Gokhul2
 
Process Management.pdf
Process Management.pdfProcess Management.pdf
Process Management.pdf
Yashjangid9
 
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
 
Cs8493 unit 2
Cs8493 unit 2Cs8493 unit 2
Cs8493 unit 2
Kathirvel Ayyaswamy
 
CSI-503 - 3. Process Scheduling
CSI-503 - 3. Process SchedulingCSI-503 - 3. Process Scheduling
CSI-503 - 3. Process Scheduling
ghayour abbas
 
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.pptModule-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
KAnurag2
 
Processes
ProcessesProcesses
Processes
vampugani
 
Ch3 processes
Ch3   processesCh3   processes
Ch3 processes
Welly Dian Astika
 

Similar to Process concept (20)

Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
 
UNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdfUNIT - 3 PPT(Part- 1)_.pdf
UNIT - 3 PPT(Part- 1)_.pdf
 
Ch2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.pptCh2_Processes_and_process_management_1.ppt
Ch2_Processes_and_process_management_1.ppt
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
 
L-5 BCEProcess management.ppt
L-5 BCEProcess management.pptL-5 BCEProcess management.ppt
L-5 BCEProcess management.ppt
 
Chapter 3.pdf
Chapter 3.pdfChapter 3.pdf
Chapter 3.pdf
 
23565104 process-management(2)
23565104 process-management(2)23565104 process-management(2)
23565104 process-management(2)
 
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of Process
 
unit-2.pdf
unit-2.pdfunit-2.pdf
unit-2.pdf
 
Operating System Process Management.pptx
Operating System Process Management.pptxOperating System Process Management.pptx
Operating System Process Management.pptx
 
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
 
OS_Unit_II_Ch3 Process and CPU Scheduling
OS_Unit_II_Ch3 Process and CPU SchedulingOS_Unit_II_Ch3 Process and CPU Scheduling
OS_Unit_II_Ch3 Process and CPU Scheduling
 
OS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptxOS_Unit II - Process Management_CATI.pptx
OS_Unit II - Process Management_CATI.pptx
 
Process Management.pdf
Process Management.pdfProcess Management.pdf
Process Management.pdf
 
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
 
Cs8493 unit 2
Cs8493 unit 2Cs8493 unit 2
Cs8493 unit 2
 
CSI-503 - 3. Process Scheduling
CSI-503 - 3. Process SchedulingCSI-503 - 3. Process Scheduling
CSI-503 - 3. Process Scheduling
 
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.pptModule-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
Module-6 process managedf;jsovj;ksdv;sdkvnksdnvldknvlkdfsment.ppt
 
Processes
ProcessesProcesses
Processes
 
Ch3 processes
Ch3   processesCh3   processes
Ch3 processes
 

Recently uploaded

CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 

Recently uploaded (20)

CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 

Process concept

  • 1. Process Concept<br />Process Scheduling<br />Operations on Processes<br />Cooperating Processes<br />Interprocess Communication<br />Communication in Client-Server Systems<br />Process Concept<br />An operating system executes a variety of programs:<br />Batch system – jobs<br />Time-shared systems – user programs or tasks<br />Textbook uses the terms job and process almost interchangeably<br />Process – a program in execution; process execution must progress in sequential fashion<br />A process includes:<br />program counter <br />stack<br />data section<br />Process State<br />As a process executes, it changes state <br />new: The process is being created<br />running: Instructions are being executed<br />waiting: The process is waiting for some event to occur<br />ready: The process is waiting to be assigned to a process<br />314325262255terminated: The process has finished execution<br />Process Control Block (PCB)<br />Information associated with each process<br />Process state<br />Program counter<br />CPU registers<br />CPU scheduling information<br />Memory-management information<br />Accounting information<br />I/O status informationCPU Switch From Process to Process<br />16192540005227647640005<br />Process Scheduling Queues<br />Job queue – set of all processes in the system<br />Ready queue – set of all processes residing in main memory, ready and waiting to execute<br />Device queues – set of processes waiting for an I/O device<br />Process migration between the various queues<br />Ready Queue And Various I/O Device Queues<br />Representation of Process Scheduling<br />Schedulers<br />Long-term scheduler (or job scheduler) – selects which processes should be brought into the ready queue<br />Short-term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU<br />Addition of Medium Term Scheduling<br />371475-114300<br />Schedulers (Cont.)<br />Short-term scheduler is invoked very frequently (milliseconds) (must be fast)<br />Long-term scheduler is invoked very infrequently (seconds, minutes) (may be slow)<br />The long-term scheduler controls the degree of multiprogramming<br />Processes can be described as either:<br />I/O-bound process – spends more time doing I/O than computations, many short CPU bursts<br />CPU-bound process – spends more time doing computations; few very long CPU bursts<br />Context Switch<br />When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process<br />Context-switch time is overhead; the system does no useful work while switching<br />Time dependent on hardware support<br />Process Creation<br />Parent process create children processes, which, in turn create other processes, forming a tree of processes<br />Resource sharing<br />Parent and children share all resources<br />Children share subset of parent’s resources<br />Parent and child share no resources<br />Execution<br />Parent and children execute concurrently<br />Parent waits until children terminate<br />Process Creation (Cont.)<br />Address space<br />Child duplicate of parent<br />Child has a program loaded into it<br />UNIX examples<br />fork system call creates new process<br />exec system call used after a fork to replace the process’ memory space with a new program<br />