SlideShare ist ein Scribd-Unternehmen logo
1 von 4
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 Scheduling and Interprocess Communication
Process Scheduling and Interprocess Communication
Process Scheduling and Interprocess Communication

Weitere ähnliche Inhalte

Was ist angesagt?

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 processNabin Dahal
 
12 process control blocks
12 process control blocks12 process control blocks
12 process control blocksmyrajendra
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process ConceptsMukesh Chinta
 
Process management
Process managementProcess management
Process managementBirju Tank
 
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 cycleGunjan Kumar
 
Schudling os presentaion
Schudling os presentaionSchudling os presentaion
Schudling os presentaioninayat khan
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesPeter Tröger
 
Operating system 28 fundamental of scheduling
Operating system 28 fundamental of schedulingOperating system 28 fundamental of scheduling
Operating system 28 fundamental of schedulingVaibhav Khanna
 
Unix Process management
Unix Process managementUnix Process management
Unix Process managementWave Digitech
 

Was ist angesagt? (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
 

Ähnlich wie Process Scheduling and Interprocess Communication

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.pptMohammad Almuiet
 
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationLM9 - OPERATIONS, SCHEDULING, Inter process xommuncation
LM9 - OPERATIONS, SCHEDULING, Inter process xommuncationMani Deepak Choudhry
 
L-5 BCEProcess management.ppt
L-5 BCEProcess management.pptL-5 BCEProcess management.ppt
L-5 BCEProcess management.pptKirti Verma
 
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 ProcessShipra Swati
 
Operating System Process Management.pptx
Operating System Process Management.pptxOperating System Process Management.pptx
Operating System Process Management.pptxminaltmv
 
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 terminationVaibhav Khanna
 
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.pptxGokhul2
 
Process Management.pdf
Process Management.pdfProcess Management.pdf
Process Management.pdfYashjangid9
 
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 - EngineeringYogesh Santhan
 
CSI-503 - 3. Process Scheduling
CSI-503 - 3. Process SchedulingCSI-503 - 3. Process Scheduling
CSI-503 - 3. Process Schedulingghayour 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.pptKAnurag2
 

Ähnlich wie Process Scheduling and Interprocess Communication (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 - 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
 
Processes
ProcessesProcesses
Processes
 

Kürzlich hochgeladen

ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 

Kürzlich hochgeladen (20)

ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 

Process Scheduling and Interprocess Communication

  • 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 />