SlideShare a Scribd company logo
Amrita
School
of
Engineering,
Bangalore
Ms. Harika Pudugosula
Teaching Assistant
Department of Electronics & Communication Engineering
2
 Chapter Introduction
 Process Concept
 The Process
 Process State
 Process Control Block (PCB)
 Threads
3
 Process Scheduling
 Scheduling Queues
 Schedulers
 Context Switch
4
Process Scheduling
• Single-processor system - not more than one running process
• Objective of multiprogramming - to maximize CPU utilization
• Objective of timesharing - to switch the CPU among processes, provide
user interaction
• Process Scheduler - selects an available process (possibly from a set of
several available processes) for program execution on the CPU
–Maintains scheduling queues of processes
5
• Job queue – set of all processes in the system
• Ready queue – set of all processes residing in main memory, ready
and waiting to execute, and stored as linked list
• Device queues – set of processes waiting for an I/O device
• Suppose the process makes an I/O request to a shared device,
such as a disk.
• Processes migrate among the various queues
5
6
7
• Representation of process scheduling is a Queueing diagram
• Rectangle represents- queue
• Circle represents –resources
• Arrow represents –flow
• Two types of queues (in fig. Queueing-diagram representation of
process scheduling)
• the ready queue and
• a set of device queues
• A new process is initially put in the ready queue, waits there until it is
selected for execution, or dispatched
7
8
• Once the process is allocated the CPU and is executing, one of several
events could occur:
• The process could issue an I/O request and then be placed in an
I/O queue
• The process could create a new child process and wait for the
child’s termination.
• The process could be removed forcibly from the CPU, as a result
of an interrupt, and be put back in the ready queue
8
Switching
happens
9
10
• Processes migrate among the various scheduling queues
• The selection process of scheduling purposes, processes from the
queues carried out by Scheduler
• Long-term scheduler (or) job scheduler
• selects which processes should be brought into the ready queue
• invoked infrequently (seconds, minutes)  (may be slow)
• controls the degree of multiprogramming (the number of
processes in memory) needs to be stable
• strives for good process mix
10
11
• Short-term scheduler (or) CPU scheduler
• selects processes that are ready to execute and allocates CPU to
one of them
• invoked frequently (milliseconds)  (must be fast)
• short time between executions - executes at least once every
few milliseconds
• Processes can be described as either:
• I/O-bound process – spends more time doing I/O than
computations, many short CPU bursts
• CPU-bound process – spends more time doing computations;
few very long CPU bursts
11
12
• What happens if all the processess are I/O bound?
• What happens if all the processess are CPU bound?
• Systems with best performance will have a combination of CPU-
bound and I/O-bound processes
12
13
• Time-sharing systems introduces an additional, intermediate level
of scheduling - Medium-term scheduler
• Key idea is to reduce the degree of multiprogramming
• Remove process from memory, store on disk, bring back in from
disk to continue execution - Swapping
• to improve the process mix
13
14
15
 Multitasking in mobile systems
• Some mobile systems (e.g., early version of iOS) allow only one
process to run, others suspended
• Due to screen real estate, user interface limits iOS provides for a
• Single foreground process- controlled via user interface
• Multiple background processes– in memory, running, but not on the display,
and with limits
• Limits include single, short task, receiving notification of events, specific
long-running tasks like audio playback
• Android runs foreground and background, with fewer limits
• Background process uses a service to perform tasks
• Service can keep running even if background process is suspended
• Service has no user interface, small memory use
15
16
 Context Switch
• 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 via a context switch
• Context of a process represented in the PCB
• Context-switch time is overhead; the system does no useful work
while switching
• The more complex the OS and the PCB  the longer the context
switch
• Time dependent on hardware support
• Some hardware provides multiple sets of registers per CPU 
multiple contexts loaded at once
16
17
References
1. Silberscatnz and Galvin, “Operating System Concepts,” Ninth Edition,
John Wiley and Sons, 2012.
18
Thank you

More Related Content

Similar to Lecture- 2_Process Management.pdf

Insider operating system
Insider   operating systemInsider   operating system
Insider operating system
Aditi Saxena
 
PROCESS.pptx
PROCESS.pptxPROCESS.pptx
PROCESS.pptx
DivyaKS18
 
Unit 2_OS process management
Unit 2_OS process management Unit 2_OS process management
Unit 2_OS process management
JayeshGadhave1
 
Evolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptxEvolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptx
ssuser000e54
 
Os concepts 4 functions of os
Os concepts 4 functions of osOs concepts 4 functions of os
Os concepts 4 functions of os
Vaibhav Khanna
 
Operating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - SchedulingOperating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - Scheduling
Peter Tröger
 
ch_scheduling (1).ppt
ch_scheduling (1).pptch_scheduling (1).ppt
ch_scheduling (1).ppt
Farhanahmad540205
 
Operating system 17 process management
Operating system 17 process managementOperating system 17 process management
Operating system 17 process management
Vaibhav Khanna
 
Process Management.pdf
Process Management.pdfProcess Management.pdf
Process Management.pdf
Yashjangid9
 
Operating System
Operating SystemOperating System
Operating System
Hitesh Mohapatra
 
CPU Scheduling Part-I.pdf
CPU Scheduling Part-I.pdfCPU Scheduling Part-I.pdf
CPU Scheduling Part-I.pdf
Harika Pudugosula
 
Operating system 05 functions of os
Operating system 05 functions of osOperating system 05 functions of os
Operating system 05 functions of os
Vaibhav Khanna
 
Lecture 4 process cpu scheduling
Lecture 4   process cpu schedulingLecture 4   process cpu scheduling
Lecture 4 process cpu scheduling
Kumbirai Junior Muzavazi
 
Chapter -2 operating system presentation
Chapter -2 operating system presentationChapter -2 operating system presentation
Chapter -2 operating system presentation
chnrketan
 
introduction to operating system
introduction to operating systemintroduction to operating system
introduction to operating system
HAMZA AHMED
 
CSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptxCSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptx
akhilagajjala
 
Process management1
Process management1Process management1
Process management1
muhammad Juman Dahar
 
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
 
UNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptxUNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptx
ansariparveen06
 

Similar to Lecture- 2_Process Management.pdf (20)

Insider operating system
Insider   operating systemInsider   operating system
Insider operating system
 
PROCESS.pptx
PROCESS.pptxPROCESS.pptx
PROCESS.pptx
 
Unit 2_OS process management
Unit 2_OS process management Unit 2_OS process management
Unit 2_OS process management
 
Evolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptxEvolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptx
 
Os concepts 4 functions of os
Os concepts 4 functions of osOs concepts 4 functions of os
Os concepts 4 functions of os
 
Operating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - SchedulingOperating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - Scheduling
 
ch_scheduling (1).ppt
ch_scheduling (1).pptch_scheduling (1).ppt
ch_scheduling (1).ppt
 
Operating system 17 process management
Operating system 17 process managementOperating system 17 process management
Operating system 17 process management
 
Process Management.pdf
Process Management.pdfProcess Management.pdf
Process Management.pdf
 
Operating System
Operating SystemOperating System
Operating System
 
CPU Scheduling Part-I.pdf
CPU Scheduling Part-I.pdfCPU Scheduling Part-I.pdf
CPU Scheduling Part-I.pdf
 
Operating system 05 functions of os
Operating system 05 functions of osOperating system 05 functions of os
Operating system 05 functions of os
 
Lecture 4 process cpu scheduling
Lecture 4   process cpu schedulingLecture 4   process cpu scheduling
Lecture 4 process cpu scheduling
 
Process Management
Process ManagementProcess Management
Process Management
 
Chapter -2 operating system presentation
Chapter -2 operating system presentationChapter -2 operating system presentation
Chapter -2 operating system presentation
 
introduction to operating system
introduction to operating systemintroduction to operating system
introduction to operating system
 
CSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptxCSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptx
 
Process management1
Process management1Process management1
Process management1
 
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
 
UNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptxUNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptx
 

More from Harika Pudugosula

Artificial Neural Networks_Part-2.pptx
Artificial Neural Networks_Part-2.pptxArtificial Neural Networks_Part-2.pptx
Artificial Neural Networks_Part-2.pptx
Harika Pudugosula
 
Artificial Neural Networks_Part-1.pptx
Artificial Neural Networks_Part-1.pptxArtificial Neural Networks_Part-1.pptx
Artificial Neural Networks_Part-1.pptx
Harika Pudugosula
 
Introduction.pptx
Introduction.pptxIntroduction.pptx
Introduction.pptx
Harika Pudugosula
 
CPU Scheduling Part-III.pdf
CPU Scheduling Part-III.pdfCPU Scheduling Part-III.pdf
CPU Scheduling Part-III.pdf
Harika Pudugosula
 
CPU Scheduling Part-II.pdf
CPU Scheduling Part-II.pdfCPU Scheduling Part-II.pdf
CPU Scheduling Part-II.pdf
Harika Pudugosula
 
Multithreaded Programming Part- III.pdf
Multithreaded Programming Part- III.pdfMultithreaded Programming Part- III.pdf
Multithreaded Programming Part- III.pdf
Harika Pudugosula
 
Multithreaded Programming Part- II.pdf
Multithreaded Programming Part- II.pdfMultithreaded Programming Part- II.pdf
Multithreaded Programming Part- II.pdf
Harika Pudugosula
 
Multithreaded Programming Part- I.pdf
Multithreaded Programming Part- I.pdfMultithreaded Programming Part- I.pdf
Multithreaded Programming Part- I.pdf
Harika Pudugosula
 
Deadlocks Part- III.pdf
Deadlocks Part- III.pdfDeadlocks Part- III.pdf
Deadlocks Part- III.pdf
Harika Pudugosula
 
Deadlocks Part- II.pdf
Deadlocks Part- II.pdfDeadlocks Part- II.pdf
Deadlocks Part- II.pdf
Harika Pudugosula
 
Deadlocks Part- I.pdf
Deadlocks Part- I.pdfDeadlocks Part- I.pdf
Deadlocks Part- I.pdf
Harika Pudugosula
 
Memory Management Strategies - IV.pdf
Memory Management Strategies - IV.pdfMemory Management Strategies - IV.pdf
Memory Management Strategies - IV.pdf
Harika Pudugosula
 
Memory Management Strategies - III.pdf
Memory Management Strategies - III.pdfMemory Management Strategies - III.pdf
Memory Management Strategies - III.pdf
Harika Pudugosula
 
Memory Management Strategies - II.pdf
Memory Management Strategies - II.pdfMemory Management Strategies - II.pdf
Memory Management Strategies - II.pdf
Harika Pudugosula
 
Memory Management Strategies - I.pdf
Memory Management Strategies - I.pdfMemory Management Strategies - I.pdf
Memory Management Strategies - I.pdf
Harika Pudugosula
 
Virtual Memory Management Part - II.pdf
Virtual Memory Management Part - II.pdfVirtual Memory Management Part - II.pdf
Virtual Memory Management Part - II.pdf
Harika Pudugosula
 
Virtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdfVirtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdf
Harika Pudugosula
 
Operating System Structure Part-II.pdf
Operating System Structure Part-II.pdfOperating System Structure Part-II.pdf
Operating System Structure Part-II.pdf
Harika Pudugosula
 
Operating System Structure Part-I.pdf
Operating System Structure Part-I.pdfOperating System Structure Part-I.pdf
Operating System Structure Part-I.pdf
Harika Pudugosula
 
Lecture-4_Process Management.pdf
Lecture-4_Process Management.pdfLecture-4_Process Management.pdf
Lecture-4_Process Management.pdf
Harika Pudugosula
 

More from Harika Pudugosula (20)

Artificial Neural Networks_Part-2.pptx
Artificial Neural Networks_Part-2.pptxArtificial Neural Networks_Part-2.pptx
Artificial Neural Networks_Part-2.pptx
 
Artificial Neural Networks_Part-1.pptx
Artificial Neural Networks_Part-1.pptxArtificial Neural Networks_Part-1.pptx
Artificial Neural Networks_Part-1.pptx
 
Introduction.pptx
Introduction.pptxIntroduction.pptx
Introduction.pptx
 
CPU Scheduling Part-III.pdf
CPU Scheduling Part-III.pdfCPU Scheduling Part-III.pdf
CPU Scheduling Part-III.pdf
 
CPU Scheduling Part-II.pdf
CPU Scheduling Part-II.pdfCPU Scheduling Part-II.pdf
CPU Scheduling Part-II.pdf
 
Multithreaded Programming Part- III.pdf
Multithreaded Programming Part- III.pdfMultithreaded Programming Part- III.pdf
Multithreaded Programming Part- III.pdf
 
Multithreaded Programming Part- II.pdf
Multithreaded Programming Part- II.pdfMultithreaded Programming Part- II.pdf
Multithreaded Programming Part- II.pdf
 
Multithreaded Programming Part- I.pdf
Multithreaded Programming Part- I.pdfMultithreaded Programming Part- I.pdf
Multithreaded Programming Part- I.pdf
 
Deadlocks Part- III.pdf
Deadlocks Part- III.pdfDeadlocks Part- III.pdf
Deadlocks Part- III.pdf
 
Deadlocks Part- II.pdf
Deadlocks Part- II.pdfDeadlocks Part- II.pdf
Deadlocks Part- II.pdf
 
Deadlocks Part- I.pdf
Deadlocks Part- I.pdfDeadlocks Part- I.pdf
Deadlocks Part- I.pdf
 
Memory Management Strategies - IV.pdf
Memory Management Strategies - IV.pdfMemory Management Strategies - IV.pdf
Memory Management Strategies - IV.pdf
 
Memory Management Strategies - III.pdf
Memory Management Strategies - III.pdfMemory Management Strategies - III.pdf
Memory Management Strategies - III.pdf
 
Memory Management Strategies - II.pdf
Memory Management Strategies - II.pdfMemory Management Strategies - II.pdf
Memory Management Strategies - II.pdf
 
Memory Management Strategies - I.pdf
Memory Management Strategies - I.pdfMemory Management Strategies - I.pdf
Memory Management Strategies - I.pdf
 
Virtual Memory Management Part - II.pdf
Virtual Memory Management Part - II.pdfVirtual Memory Management Part - II.pdf
Virtual Memory Management Part - II.pdf
 
Virtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdfVirtual Memory Management Part - I.pdf
Virtual Memory Management Part - I.pdf
 
Operating System Structure Part-II.pdf
Operating System Structure Part-II.pdfOperating System Structure Part-II.pdf
Operating System Structure Part-II.pdf
 
Operating System Structure Part-I.pdf
Operating System Structure Part-I.pdfOperating System Structure Part-I.pdf
Operating System Structure Part-I.pdf
 
Lecture-4_Process Management.pdf
Lecture-4_Process Management.pdfLecture-4_Process Management.pdf
Lecture-4_Process Management.pdf
 

Recently uploaded

DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 
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
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
dxobcob
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
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
 
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
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
An Approach to Detecting Writing Styles Based on Clustering Techniques
An Approach to Detecting Writing Styles Based on Clustering TechniquesAn Approach to Detecting Writing Styles Based on Clustering Techniques
An Approach to Detecting Writing Styles Based on Clustering Techniques
ambekarshweta25
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
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
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
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
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
yokeleetan1
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 
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
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
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
 
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...
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
An Approach to Detecting Writing Styles Based on Clustering Techniques
An Approach to Detecting Writing Styles Based on Clustering TechniquesAn Approach to Detecting Writing Styles Based on Clustering Techniques
An Approach to Detecting Writing Styles Based on Clustering Techniques
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
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
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
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
 
Swimming pool mechanical components design.pptx
Swimming pool  mechanical components design.pptxSwimming pool  mechanical components design.pptx
Swimming pool mechanical components design.pptx
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 

Lecture- 2_Process Management.pdf

  • 1. Amrita School of Engineering, Bangalore Ms. Harika Pudugosula Teaching Assistant Department of Electronics & Communication Engineering
  • 2. 2  Chapter Introduction  Process Concept  The Process  Process State  Process Control Block (PCB)  Threads
  • 3. 3  Process Scheduling  Scheduling Queues  Schedulers  Context Switch
  • 4. 4 Process Scheduling • Single-processor system - not more than one running process • Objective of multiprogramming - to maximize CPU utilization • Objective of timesharing - to switch the CPU among processes, provide user interaction • Process Scheduler - selects an available process (possibly from a set of several available processes) for program execution on the CPU –Maintains scheduling queues of processes
  • 5. 5 • Job queue – set of all processes in the system • Ready queue – set of all processes residing in main memory, ready and waiting to execute, and stored as linked list • Device queues – set of processes waiting for an I/O device • Suppose the process makes an I/O request to a shared device, such as a disk. • Processes migrate among the various queues 5
  • 6. 6
  • 7. 7 • Representation of process scheduling is a Queueing diagram • Rectangle represents- queue • Circle represents –resources • Arrow represents –flow • Two types of queues (in fig. Queueing-diagram representation of process scheduling) • the ready queue and • a set of device queues • A new process is initially put in the ready queue, waits there until it is selected for execution, or dispatched 7
  • 8. 8 • Once the process is allocated the CPU and is executing, one of several events could occur: • The process could issue an I/O request and then be placed in an I/O queue • The process could create a new child process and wait for the child’s termination. • The process could be removed forcibly from the CPU, as a result of an interrupt, and be put back in the ready queue 8 Switching happens
  • 9. 9
  • 10. 10 • Processes migrate among the various scheduling queues • The selection process of scheduling purposes, processes from the queues carried out by Scheduler • Long-term scheduler (or) job scheduler • selects which processes should be brought into the ready queue • invoked infrequently (seconds, minutes)  (may be slow) • controls the degree of multiprogramming (the number of processes in memory) needs to be stable • strives for good process mix 10
  • 11. 11 • Short-term scheduler (or) CPU scheduler • selects processes that are ready to execute and allocates CPU to one of them • invoked frequently (milliseconds)  (must be fast) • short time between executions - executes at least once every few milliseconds • Processes can be described as either: • I/O-bound process – spends more time doing I/O than computations, many short CPU bursts • CPU-bound process – spends more time doing computations; few very long CPU bursts 11
  • 12. 12 • What happens if all the processess are I/O bound? • What happens if all the processess are CPU bound? • Systems with best performance will have a combination of CPU- bound and I/O-bound processes 12
  • 13. 13 • Time-sharing systems introduces an additional, intermediate level of scheduling - Medium-term scheduler • Key idea is to reduce the degree of multiprogramming • Remove process from memory, store on disk, bring back in from disk to continue execution - Swapping • to improve the process mix 13
  • 14. 14
  • 15. 15  Multitasking in mobile systems • Some mobile systems (e.g., early version of iOS) allow only one process to run, others suspended • Due to screen real estate, user interface limits iOS provides for a • Single foreground process- controlled via user interface • Multiple background processes– in memory, running, but not on the display, and with limits • Limits include single, short task, receiving notification of events, specific long-running tasks like audio playback • Android runs foreground and background, with fewer limits • Background process uses a service to perform tasks • Service can keep running even if background process is suspended • Service has no user interface, small memory use 15
  • 16. 16  Context Switch • 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 via a context switch • Context of a process represented in the PCB • Context-switch time is overhead; the system does no useful work while switching • The more complex the OS and the PCB  the longer the context switch • Time dependent on hardware support • Some hardware provides multiple sets of registers per CPU  multiple contexts loaded at once 16
  • 17. 17 References 1. Silberscatnz and Galvin, “Operating System Concepts,” Ninth Edition, John Wiley and Sons, 2012.