SlideShare a Scribd company logo
Process Management
S.R INAMDARDept. of CSE BLDEA'S SSM POLYTECHNIC 1
UNIT 2: Processes
 Process Concept
 Process Scheduling
 Operations on Processes
 Cooperating Processes
 Inter process Communication
 Process Scheduling: Basic concepts
 Scheduling criteria
 Scheduling algorithms.
Dept. of CSE BLDEA'S SSM POLYTECHNIC 2
Process Concept
 A Program in execution is called as a process.
 A process is more than a program.
 A process includes
 program counter
 stack
 data section
Dept. of CSE BLDEA'S SSM POLYTECHNIC 3
Process State Diagram
Dept. of CSE BLDEA'S SSM POLYTECHNIC 4
Process State Diagram (cont..)
 As a process executes, it changes state
 new: The process is being created.
 running: Instructions are being executed.
 waiting: The process is waiting for some event to occur.
 ready: The process is waiting to be assigned to a process.
 terminated: The process has finished execution.
Dept. of CSE BLDEA'S SSM POLYTECHNIC 5
Process Control Block (PCB)
Information associated with each process.
 Process state: ready ,new ,running etc.
 Program counter: address of next instruction to execute.
 CPU registers : PC, working registers, stack pointer.
 CPU scheduling information : scheduling order and priority.
 Memory-management information : page table/ segment table
pointers.
 Accounting information : amount CPU time used.
 I/O status information : list of I/O devices allocated to this
process and files (open).
Dept. of CSE BLDEA'S SSM POLYTECHNIC 6
Process Control Block (PCB)
Dept. of CSE BLDEA'S SSM POLYTECHNIC 7
Process Scheduling Queues
 Job queue – set of all processes in the system.
 Ready queue – set of all processes residing in main
memory, ready and waiting to execute.
 Device queues – set of processes waiting for an I/O
device.
 Process migration between the various queues.
Dept. of CSE BLDEA'S SSM POLYTECHNIC 8
Schedulers
 Long-term scheduler (or job scheduler) – selects
which processes should be brought into the ready
queue.
 Short-term scheduler (or CPU scheduler) – selects
which process should be executed next and allocates
CPU.
Dept. of CSE BLDEA'S SSM POLYTECHNIC 9
Schedulers (Cont.)
 Short-term scheduler is invoked very frequently (milliseconds) 
(must be fast).
 Long-term scheduler is invoked very infrequently (seconds, minutes)
 (may be slow).
 The long-term scheduler controls the degree of multiprogramming.
 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.
Dept. of CSE BLDEA'S SSM POLYTECHNIC 10
Medium Term Scheduling
Dept. of CSE BLDEA'S SSM POLYTECHNIC 11
Process Creation
 Parent process create children processes, which, in turn create
other processes, forming a tree of processes.
 Resource sharing
 Parent and children share all resources.
 Children share subset of parent’s resources.
 Parent and child share no resources.
 Execution
 Parent and children execute concurrently.
 Parent waits until children terminate.
Dept. of CSE BLDEA'S SSM POLYTECHNIC 12
Process Creation (Cont.)
 Address space
 Child duplicate of parent.
 Child has a program loaded into it.
 UNIX examples
 fork system call creates new process
 exec system call used after a fork to replace the process’
memory space with a new program.
Dept. of CSE BLDEA'S SSM POLYTECHNIC 13
Process Termination
 Process executes last statement and asks the operating system to decide
it (exit).
 Output data from child to parent (via wait).
 Process’ resources are de allocated by operating system.
 Parent may terminate execution of children processes (abort).
 Child has exceeded allocated resources.
 Task assigned to child is no longer required.
 Parent is exiting.
 Operating system does not allow child to continue if its parent
terminates.
 Cascading termination.
Dept. of CSE BLDEA'S SSM POLYTECHNIC 14
Cooperating Processes
 Independent process cannot affect or be affected by the execution
of another process.
 Cooperating process can affect or be affected by the execution of
another process
 Advantages of process cooperation
 Information sharing
 Computation speed-up
 Modularity
 Convenience
Dept. of CSE BLDEA'S SSM POLYTECHNIC 15
Interprocess Communication (IPC)
 Mechanism for processes to communicate and to
synchronize their actions.
 Message system – processes communicate with each
other without resorting to shared variables.
 IPC facility provides two operations:
 send(message) – message size fixed or variable
 receive(message)
 If P and Q wish to communicate, they need to:
 establish a communication link between them
 exchange messages via send/receive
 Implementation of communication link
 physical (e.g., shared memory, hardware bus)
 logical (e.g., logical properties)
Dept. of CSE BLDEA'S SSM POLYTECHNIC 16
Interprocess Communication (IPC)
(contd..)
Communication may take place using either
message passing or shared memory.
Dept. of CSE BLDEA'S SSM POLYTECHNIC 17
Process scheduling:Basic Concepts
 Maximum CPU utilization obtained with
multiprogramming
 CPU–I/O Burst Cycle – Process execution consists of a
cycle of CPU execution and I/O wait.
 CPU burst distribution
Dept. of CSE BLDEA'S SSM POLYTECHNIC 18
Alternating Sequence of CPU
And I/O Bursts
Dept. of CSE BLDEA'S SSM POLYTECHNIC 19
Scheduling Criteria
 CPU utilization – keep the CPU as busy as possible
 Throughput – # of processes that complete their
execution per time unit
 Turnaround time – amount of time to execute a
particular process
 Waiting time – amount of time a process has been
waiting in the ready queue
 Response time – amount of time it takes from when a
request was submitted until the first response is
produced, not output (for time-sharing environment)
Dept. of CSE BLDEA'S SSM POLYTECHNIC 20
Dept. of CSE BLDEA'S SSM POLYTECHNIC 21
PROBLEM:
Consider the following set of process with the length of the
CPU & Burst time given in millisecond.
PROCESS BURST TIME PRIORITY
P1 10 3
P2 01 1
P3 02 3
P4 01 4
P5 05 2
With Gantt chart , calculate the Average Waiting Time &
Average Turn Around Time for FCFS , SJF, Priority & RR
Scheduling. The processes are assumed to arrive in the order
p1, p2, p3, p4,p5.
Dept. of CSE BLDEA'S SSM POLYTECHNIC 22
FCFS(FIRST COME FIRST SERVE)
Gantt Chart:
P1
0 10
P2 P3 P4 P5
11 13 14 19
Waiting Time
P1  0
P2  10
P3  11
P4  13
P5  14
Average Waiting Time
AWT=Sum of all the Waiting Times/No. Process
AWT=p1+p2+P3+P4+P5/5
AWT=(0+10+11+13+14)/5
AWT=48/5
AWT=9.6 msDept. of CSE BLDEA'S SSM POLYTECHNIC 23
Turn Around Time
TAT=Waiting time + Burst Time
P1  0+10  10
P2  10+1  11
P3  11+2  13
P4  13+1  14
P5  14+5  19
Average Turn Around Time
ATAT=p1+p2+p3+p4+p5/5
ATAT=10+11+13+14+19/5
ATAT=67/5
ATAT=13.4ms
Dept. of CSE BLDEA'S SSM POLYTECHNIC 24
SJF(SHORTEST JOB FIRST)
Gantt Chart:
P2
0 1
P4 P3 P5 P1
2 4 9 19
Waiting Time
P1  9
P2  0
P3  2
P4  1
P5  4
Average Waiting Time
AWT=Sum of all the Waiting Times/No. Process
AWT=p1+p2+P3+P4+P5/5
AWT=(9+0+2+1+4)/5
AWT=16/5
AWT=3.2 msDept. of CSE BLDEA'S SSM POLYTECHNIC 25
Turn Around Time
TAT=Waiting time + Burst Time
P1  9+10  19
P2  0+1  1
P3  2+2  4
P4  1+1  2
P5  4+5  9
Average Turn Around Time
ATAT=p1+p2+p3+p4+p5/5
ATAT=19+1+4+2+9/5
ATAT=35/5
ATAT=7 ms
Dept. of CSE BLDEA'S SSM POLYTECHNIC 26
PRIORITY SCHEDULING
Gantt Chart:
P2
0 1
P5 P1 P3 P1
6 16 18 19
Waiting Time
P1  6
P2  0
P3  16
P4  18
P5  1
Average Waiting Time
AWT=Sum of all the Waiting Times/No. Process
AWT=p1+p2+P3+P4+P5/5
AWT=(6+0+16+18+1)/5
AWT=41/5
AWT=8.2 msDept. of CSE BLDEA'S SSM POLYTECHNIC 27
Turn Around Time
TAT=Waiting time + Burst Time
P1  6+10  16
P2  0+1  1
P3  16+2  18
P4  18+1  19
P5  1+5  6
Average Turn Around Time
ATAT=p1+p2+p3+p4+p5/5
ATAT=16+1+18+19+6/5
ATAT=70/5
ATAT=14 ms
Dept. of CSE BLDEA'S SSM POLYTECHNIC 28
RR(ROUND ROBIN)
Gantt Chart:
P1
0
P2 P3 P4 P1P5P1P5 P1P1P5
2 3 65 108 12 1514 1917
Waiting Time
P1  (8-2)+(12-10)+(15-14)  9
P2  2
P3  3
P4  5
P5  6+(10-8)+(14-12)  10
P1  19-10 =9
P2  3-1=2
P3  5-2=3
P4  6-1=5
P5  15-5=10
Dept. of CSE BLDEA'S SSM POLYTECHNIC 29
Average Waiting Time
AWT=Sum of all the Waiting Times/No. Process
AWT=p1+p2+P3+P4+P5/5
AWT=(9+2+3+5+10)/5
AWT=29/5
AWT=5.8 ms
Dept. of CSE BLDEA'S SSM POLYTECHNIC 30
Turn Around Time
TAT=Waiting time + Burst Time
P1  9+10  19
P2  2+1  3
P3  3+2  5
P4  5+1  6
P5  10+5  15
Average Turn Around Time
ATAT=p1+p2+p3+p4+p5/5
ATAT=19+3+5+6+15/5
ATAT=48/5
ATAT=9.6 ms
Dept. of CSE BLDEA'S SSM POLYTECHNIC 31
THANK
YOU
Dept. of CSE BLDEA'S SSM POLYTECHNIC 32

More Related Content

What's hot

Os structure
Os structureOs structure
Os structureMohd Arif
 
Operating Systems
Operating SystemsOperating Systems
Operating Systemsvampugani
 
Introduction to Operating System
Introduction to Operating SystemIntroduction to Operating System
Introduction to Operating SystemImtiaz Ahmed
 
Introduction to Operating system
Introduction to Operating system Introduction to Operating system
Introduction to Operating system Bilal Bhatti
 
OS - Ch1
OS - Ch1OS - Ch1
OS - Ch1sphs
 
Operating system structures
Operating system structuresOperating system structures
Operating system structuresMohd Arif
 
Operating system and its functions
Operating system and its functionsOperating system and its functions
Operating system and its functionsNamarta Chawla
 
30326851 -operating-system-unit-1-ppt
30326851 -operating-system-unit-1-ppt30326851 -operating-system-unit-1-ppt
30326851 -operating-system-unit-1-pptraj732723
 
Introduction to Operating System and its Types
Introduction to Operating System and its TypesIntroduction to Operating System and its Types
Introduction to Operating System and its Typessundas Shabbir
 
Silberschatz / OS Concepts
Silberschatz /  OS Concepts Silberschatz /  OS Concepts
Silberschatz / OS Concepts Alanisca Alanis
 
Introduction to operating syatem
Introduction to operating syatemIntroduction to operating syatem
Introduction to operating syatemRafi Dar
 
Operating systems
Operating systemsOperating systems
Operating systemsJoshuaIgo
 
Operating system services 9
Operating system services 9Operating system services 9
Operating system services 9myrajendra
 
OS Components and Structure
OS Components and StructureOS Components and Structure
OS Components and Structuresathish sak
 
Chapter 2: Operating System Structures
Chapter 2: Operating System StructuresChapter 2: Operating System Structures
Chapter 2: Operating System StructuresShafaan Khaliq Bhatti
 
1 introduction
1 introduction1 introduction
1 introductionMohd Arif
 

What's hot (20)

Unit 1 introduction to operating system
Unit 1 introduction to operating systemUnit 1 introduction to operating system
Unit 1 introduction to operating system
 
Os structure
Os structureOs structure
Os structure
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Introduction to Operating System
Introduction to Operating SystemIntroduction to Operating System
Introduction to Operating System
 
Introduction to Operating system
Introduction to Operating system Introduction to Operating system
Introduction to Operating system
 
OS - Ch1
OS - Ch1OS - Ch1
OS - Ch1
 
Operating system structures
Operating system structuresOperating system structures
Operating system structures
 
Presentation1 cc
Presentation1 ccPresentation1 cc
Presentation1 cc
 
Operating system and its functions
Operating system and its functionsOperating system and its functions
Operating system and its functions
 
30326851 -operating-system-unit-1-ppt
30326851 -operating-system-unit-1-ppt30326851 -operating-system-unit-1-ppt
30326851 -operating-system-unit-1-ppt
 
Introduction to Operating System and its Types
Introduction to Operating System and its TypesIntroduction to Operating System and its Types
Introduction to Operating System and its Types
 
Silberschatz / OS Concepts
Silberschatz /  OS Concepts Silberschatz /  OS Concepts
Silberschatz / OS Concepts
 
Chapter01
Chapter01Chapter01
Chapter01
 
Introduction to operating syatem
Introduction to operating syatemIntroduction to operating syatem
Introduction to operating syatem
 
Chapter02 new
Chapter02 newChapter02 new
Chapter02 new
 
Operating systems
Operating systemsOperating systems
Operating systems
 
Operating system services 9
Operating system services 9Operating system services 9
Operating system services 9
 
OS Components and Structure
OS Components and StructureOS Components and Structure
OS Components and Structure
 
Chapter 2: Operating System Structures
Chapter 2: Operating System StructuresChapter 2: Operating System Structures
Chapter 2: Operating System Structures
 
1 introduction
1 introduction1 introduction
1 introduction
 

Similar to Unit 2 process Management

Operating System Scheduling
Operating System SchedulingOperating System Scheduling
Operating System SchedulingVishnu Prasad
 
CPU scheduling
CPU schedulingCPU scheduling
CPU schedulingAmir Khan
 
SCHEDULING.ppt
SCHEDULING.pptSCHEDULING.ppt
SCHEDULING.pptAkashJ55
 
ch5_EN_CPUSched_2022.pdf
ch5_EN_CPUSched_2022.pdfch5_EN_CPUSched_2022.pdf
ch5_EN_CPUSched_2022.pdfCuracaoJTR
 
Unit iios process scheduling and synchronization
Unit iios process scheduling and synchronizationUnit iios process scheduling and synchronization
Unit iios process scheduling and synchronizationdonny101
 
OS-CPU-Scheduling-chap5.pptx
OS-CPU-Scheduling-chap5.pptxOS-CPU-Scheduling-chap5.pptx
OS-CPU-Scheduling-chap5.pptxDrAmarNathDhebla
 
Operating systems chapter 5 silberschatz
Operating systems chapter 5 silberschatzOperating systems chapter 5 silberschatz
Operating systems chapter 5 silberschatzGiulianoRanauro
 
Operating System - CPU Scheduling Introduction
Operating System - CPU Scheduling IntroductionOperating System - CPU Scheduling Introduction
Operating System - CPU Scheduling IntroductionJimmyWilson26
 
CPU scheduling in Operating System Explanation
CPU scheduling in Operating System ExplanationCPU scheduling in Operating System Explanation
CPU scheduling in Operating System ExplanationAnitaSofiaKeyser
 
Scheduling and Scheduler's Process and Premptive
Scheduling and Scheduler's Process and PremptiveScheduling and Scheduler's Process and Premptive
Scheduling and Scheduler's Process and Premptivechoudharyxdevansh
 
Process Scheduling in OS
Process Scheduling in OSProcess Scheduling in OS
Process Scheduling in OSRashmi Bhat
 

Similar to Unit 2 process Management (20)

Operating System Scheduling
Operating System SchedulingOperating System Scheduling
Operating System Scheduling
 
CPU scheduling
CPU schedulingCPU scheduling
CPU scheduling
 
SCHEDULING.ppt
SCHEDULING.pptSCHEDULING.ppt
SCHEDULING.ppt
 
ch5_EN_CPUSched_2022.pdf
ch5_EN_CPUSched_2022.pdfch5_EN_CPUSched_2022.pdf
ch5_EN_CPUSched_2022.pdf
 
Unit iios process scheduling and synchronization
Unit iios process scheduling and synchronizationUnit iios process scheduling and synchronization
Unit iios process scheduling and synchronization
 
OS-CPU-Scheduling-chap5.pptx
OS-CPU-Scheduling-chap5.pptxOS-CPU-Scheduling-chap5.pptx
OS-CPU-Scheduling-chap5.pptx
 
Operating systems chapter 5 silberschatz
Operating systems chapter 5 silberschatzOperating systems chapter 5 silberschatz
Operating systems chapter 5 silberschatz
 
ERTS UNIT 5.pptx
ERTS UNIT 5.pptxERTS UNIT 5.pptx
ERTS UNIT 5.pptx
 
ch6.ppt
ch6.pptch6.ppt
ch6.ppt
 
Operating System - CPU Scheduling Introduction
Operating System - CPU Scheduling IntroductionOperating System - CPU Scheduling Introduction
Operating System - CPU Scheduling Introduction
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
CPU scheduling in Operating System Explanation
CPU scheduling in Operating System ExplanationCPU scheduling in Operating System Explanation
CPU scheduling in Operating System Explanation
 
Process concept
Process conceptProcess concept
Process concept
 
Scheduling
SchedulingScheduling
Scheduling
 
Scheduling
SchedulingScheduling
Scheduling
 
Scheduling
SchedulingScheduling
Scheduling
 
Scheduling and Scheduler's Process and Premptive
Scheduling and Scheduler's Process and PremptiveScheduling and Scheduler's Process and Premptive
Scheduling and Scheduler's Process and Premptive
 
Process Scheduling in OS
Process Scheduling in OSProcess Scheduling in OS
Process Scheduling in OS
 
Cpu Scheduling Galvin
Cpu Scheduling GalvinCpu Scheduling Galvin
Cpu Scheduling Galvin
 
ch6.ppt
ch6.pptch6.ppt
ch6.ppt
 

More from zahid7578

Computer_Network_Chapter_2.pptx
Computer_Network_Chapter_2.pptxComputer_Network_Chapter_2.pptx
Computer_Network_Chapter_2.pptxzahid7578
 
Computer_Network_Chapter_1.pptx
Computer_Network_Chapter_1.pptxComputer_Network_Chapter_1.pptx
Computer_Network_Chapter_1.pptxzahid7578
 
Operating System Concepts_1.pptx
Operating System Concepts_1.pptxOperating System Concepts_1.pptx
Operating System Concepts_1.pptxzahid7578
 
Unit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascriptUnit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascriptzahid7578
 
Unit 1 introduction to web programming
Unit 1 introduction to web programmingUnit 1 introduction to web programming
Unit 1 introduction to web programmingzahid7578
 
Testing level
Testing levelTesting level
Testing levelzahid7578
 

More from zahid7578 (6)

Computer_Network_Chapter_2.pptx
Computer_Network_Chapter_2.pptxComputer_Network_Chapter_2.pptx
Computer_Network_Chapter_2.pptx
 
Computer_Network_Chapter_1.pptx
Computer_Network_Chapter_1.pptxComputer_Network_Chapter_1.pptx
Computer_Network_Chapter_1.pptx
 
Operating System Concepts_1.pptx
Operating System Concepts_1.pptxOperating System Concepts_1.pptx
Operating System Concepts_1.pptx
 
Unit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascriptUnit ii java script and xhtml documents and dynamic documents with javascript
Unit ii java script and xhtml documents and dynamic documents with javascript
 
Unit 1 introduction to web programming
Unit 1 introduction to web programmingUnit 1 introduction to web programming
Unit 1 introduction to web programming
 
Testing level
Testing levelTesting level
Testing level
 

Recently uploaded

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...Sri Ambati
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backElena Simperl
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsVlad Stirbu
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
 

Recently uploaded (20)

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 

Unit 2 process Management

  • 1. Process Management S.R INAMDARDept. of CSE BLDEA'S SSM POLYTECHNIC 1
  • 2. UNIT 2: Processes  Process Concept  Process Scheduling  Operations on Processes  Cooperating Processes  Inter process Communication  Process Scheduling: Basic concepts  Scheduling criteria  Scheduling algorithms. Dept. of CSE BLDEA'S SSM POLYTECHNIC 2
  • 3. Process Concept  A Program in execution is called as a process.  A process is more than a program.  A process includes  program counter  stack  data section Dept. of CSE BLDEA'S SSM POLYTECHNIC 3
  • 4. Process State Diagram Dept. of CSE BLDEA'S SSM POLYTECHNIC 4
  • 5. Process State Diagram (cont..)  As a process executes, it changes state  new: The process is being created.  running: Instructions are being executed.  waiting: The process is waiting for some event to occur.  ready: The process is waiting to be assigned to a process.  terminated: The process has finished execution. Dept. of CSE BLDEA'S SSM POLYTECHNIC 5
  • 6. Process Control Block (PCB) Information associated with each process.  Process state: ready ,new ,running etc.  Program counter: address of next instruction to execute.  CPU registers : PC, working registers, stack pointer.  CPU scheduling information : scheduling order and priority.  Memory-management information : page table/ segment table pointers.  Accounting information : amount CPU time used.  I/O status information : list of I/O devices allocated to this process and files (open). Dept. of CSE BLDEA'S SSM POLYTECHNIC 6
  • 7. Process Control Block (PCB) Dept. of CSE BLDEA'S SSM POLYTECHNIC 7
  • 8. Process Scheduling Queues  Job queue – set of all processes in the system.  Ready queue – set of all processes residing in main memory, ready and waiting to execute.  Device queues – set of processes waiting for an I/O device.  Process migration between the various queues. Dept. of CSE BLDEA'S SSM POLYTECHNIC 8
  • 9. Schedulers  Long-term scheduler (or job scheduler) – selects which processes should be brought into the ready queue.  Short-term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU. Dept. of CSE BLDEA'S SSM POLYTECHNIC 9
  • 10. Schedulers (Cont.)  Short-term scheduler is invoked very frequently (milliseconds)  (must be fast).  Long-term scheduler is invoked very infrequently (seconds, minutes)  (may be slow).  The long-term scheduler controls the degree of multiprogramming.  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. Dept. of CSE BLDEA'S SSM POLYTECHNIC 10
  • 11. Medium Term Scheduling Dept. of CSE BLDEA'S SSM POLYTECHNIC 11
  • 12. Process Creation  Parent process create children processes, which, in turn create other processes, forming a tree of processes.  Resource sharing  Parent and children share all resources.  Children share subset of parent’s resources.  Parent and child share no resources.  Execution  Parent and children execute concurrently.  Parent waits until children terminate. Dept. of CSE BLDEA'S SSM POLYTECHNIC 12
  • 13. Process Creation (Cont.)  Address space  Child duplicate of parent.  Child has a program loaded into it.  UNIX examples  fork system call creates new process  exec system call used after a fork to replace the process’ memory space with a new program. Dept. of CSE BLDEA'S SSM POLYTECHNIC 13
  • 14. Process Termination  Process executes last statement and asks the operating system to decide it (exit).  Output data from child to parent (via wait).  Process’ resources are de allocated by operating system.  Parent may terminate execution of children processes (abort).  Child has exceeded allocated resources.  Task assigned to child is no longer required.  Parent is exiting.  Operating system does not allow child to continue if its parent terminates.  Cascading termination. Dept. of CSE BLDEA'S SSM POLYTECHNIC 14
  • 15. Cooperating Processes  Independent process cannot affect or be affected by the execution of another process.  Cooperating process can affect or be affected by the execution of another process  Advantages of process cooperation  Information sharing  Computation speed-up  Modularity  Convenience Dept. of CSE BLDEA'S SSM POLYTECHNIC 15
  • 16. Interprocess Communication (IPC)  Mechanism for processes to communicate and to synchronize their actions.  Message system – processes communicate with each other without resorting to shared variables.  IPC facility provides two operations:  send(message) – message size fixed or variable  receive(message)  If P and Q wish to communicate, they need to:  establish a communication link between them  exchange messages via send/receive  Implementation of communication link  physical (e.g., shared memory, hardware bus)  logical (e.g., logical properties) Dept. of CSE BLDEA'S SSM POLYTECHNIC 16
  • 17. Interprocess Communication (IPC) (contd..) Communication may take place using either message passing or shared memory. Dept. of CSE BLDEA'S SSM POLYTECHNIC 17
  • 18. Process scheduling:Basic Concepts  Maximum CPU utilization obtained with multiprogramming  CPU–I/O Burst Cycle – Process execution consists of a cycle of CPU execution and I/O wait.  CPU burst distribution Dept. of CSE BLDEA'S SSM POLYTECHNIC 18
  • 19. Alternating Sequence of CPU And I/O Bursts Dept. of CSE BLDEA'S SSM POLYTECHNIC 19
  • 20. Scheduling Criteria  CPU utilization – keep the CPU as busy as possible  Throughput – # of processes that complete their execution per time unit  Turnaround time – amount of time to execute a particular process  Waiting time – amount of time a process has been waiting in the ready queue  Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment) Dept. of CSE BLDEA'S SSM POLYTECHNIC 20
  • 21. Dept. of CSE BLDEA'S SSM POLYTECHNIC 21
  • 22. PROBLEM: Consider the following set of process with the length of the CPU & Burst time given in millisecond. PROCESS BURST TIME PRIORITY P1 10 3 P2 01 1 P3 02 3 P4 01 4 P5 05 2 With Gantt chart , calculate the Average Waiting Time & Average Turn Around Time for FCFS , SJF, Priority & RR Scheduling. The processes are assumed to arrive in the order p1, p2, p3, p4,p5. Dept. of CSE BLDEA'S SSM POLYTECHNIC 22
  • 23. FCFS(FIRST COME FIRST SERVE) Gantt Chart: P1 0 10 P2 P3 P4 P5 11 13 14 19 Waiting Time P1  0 P2  10 P3  11 P4  13 P5  14 Average Waiting Time AWT=Sum of all the Waiting Times/No. Process AWT=p1+p2+P3+P4+P5/5 AWT=(0+10+11+13+14)/5 AWT=48/5 AWT=9.6 msDept. of CSE BLDEA'S SSM POLYTECHNIC 23
  • 24. Turn Around Time TAT=Waiting time + Burst Time P1  0+10  10 P2  10+1  11 P3  11+2  13 P4  13+1  14 P5  14+5  19 Average Turn Around Time ATAT=p1+p2+p3+p4+p5/5 ATAT=10+11+13+14+19/5 ATAT=67/5 ATAT=13.4ms Dept. of CSE BLDEA'S SSM POLYTECHNIC 24
  • 25. SJF(SHORTEST JOB FIRST) Gantt Chart: P2 0 1 P4 P3 P5 P1 2 4 9 19 Waiting Time P1  9 P2  0 P3  2 P4  1 P5  4 Average Waiting Time AWT=Sum of all the Waiting Times/No. Process AWT=p1+p2+P3+P4+P5/5 AWT=(9+0+2+1+4)/5 AWT=16/5 AWT=3.2 msDept. of CSE BLDEA'S SSM POLYTECHNIC 25
  • 26. Turn Around Time TAT=Waiting time + Burst Time P1  9+10  19 P2  0+1  1 P3  2+2  4 P4  1+1  2 P5  4+5  9 Average Turn Around Time ATAT=p1+p2+p3+p4+p5/5 ATAT=19+1+4+2+9/5 ATAT=35/5 ATAT=7 ms Dept. of CSE BLDEA'S SSM POLYTECHNIC 26
  • 27. PRIORITY SCHEDULING Gantt Chart: P2 0 1 P5 P1 P3 P1 6 16 18 19 Waiting Time P1  6 P2  0 P3  16 P4  18 P5  1 Average Waiting Time AWT=Sum of all the Waiting Times/No. Process AWT=p1+p2+P3+P4+P5/5 AWT=(6+0+16+18+1)/5 AWT=41/5 AWT=8.2 msDept. of CSE BLDEA'S SSM POLYTECHNIC 27
  • 28. Turn Around Time TAT=Waiting time + Burst Time P1  6+10  16 P2  0+1  1 P3  16+2  18 P4  18+1  19 P5  1+5  6 Average Turn Around Time ATAT=p1+p2+p3+p4+p5/5 ATAT=16+1+18+19+6/5 ATAT=70/5 ATAT=14 ms Dept. of CSE BLDEA'S SSM POLYTECHNIC 28
  • 29. RR(ROUND ROBIN) Gantt Chart: P1 0 P2 P3 P4 P1P5P1P5 P1P1P5 2 3 65 108 12 1514 1917 Waiting Time P1  (8-2)+(12-10)+(15-14)  9 P2  2 P3  3 P4  5 P5  6+(10-8)+(14-12)  10 P1  19-10 =9 P2  3-1=2 P3  5-2=3 P4  6-1=5 P5  15-5=10 Dept. of CSE BLDEA'S SSM POLYTECHNIC 29
  • 30. Average Waiting Time AWT=Sum of all the Waiting Times/No. Process AWT=p1+p2+P3+P4+P5/5 AWT=(9+2+3+5+10)/5 AWT=29/5 AWT=5.8 ms Dept. of CSE BLDEA'S SSM POLYTECHNIC 30
  • 31. Turn Around Time TAT=Waiting time + Burst Time P1  9+10  19 P2  2+1  3 P3  3+2  5 P4  5+1  6 P5  10+5  15 Average Turn Around Time ATAT=p1+p2+p3+p4+p5/5 ATAT=19+3+5+6+15/5 ATAT=48/5 ATAT=9.6 ms Dept. of CSE BLDEA'S SSM POLYTECHNIC 31
  • 32. THANK YOU Dept. of CSE BLDEA'S SSM POLYTECHNIC 32