SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Priority Scheduling
 INDEX
Content Slide No.
1. Scheduling 3
2. Priority Scheduling 4
3. Non Pre-emptive Priority Scheduling 5
4. Pre-emptive Priority Scheduling 6
5. Advantages & Disadvantages 7
6. Bibliography 8
Scheduling
 Scheduling is the activity of picking a process from ready
state and allocating it to CPU.
 The short term schedular is responsible for this process.
 CPU utilization should be high
 Turnaround time should be low
 Response time should be low
 Waiting time should be low
 Throughput should be maximun
 Performance Criteria for Scheduling
Algorithm
Priority Scheduling
 This algorithm schedule a process based on the priority.
 Out all of the available processes highest priority process gets the CPU.
 If a tie occur then it follows FCFS, if again a tie occur then lowest id
process is selected.
 Generally the lower the priority number, the higher is the priority of the
process.
 Non Pre-emptive Priority Scheduling
 In the non pre-emptive version of priority scheduling once a process gets the
CUP it will execute until its completion.
 Example:
Process Priori
ty
AT BT CT TAT WT RT
P1 2 0 11 11 11 0 0
P2 0 5 28 39 34 6 6
P3 3 12 2 60 48 46 46
P4 1 2 10 49 47 37 37
P5 3 9 9 58 49 40 40
Total 217 189 129 129
Average 43.4 37.8 25.8 25.8
P1 P2 P4 P5 P3
0 11 39 49 58 60
 Pre-emptive Priority Scheduling
 In the pre-emptive version when a process arrive the ready state, then it is compared
with the other processes and with the process currently executing. Then the process
with highest priority is allocated the CPU.
 Example:
Process Priori
ty
AT BT CT TAT WT RT
P1 2 0 11 49 49 38 0
P2 0 5 28 33 28 0 0
P3 3 12 2 60 48 46 46
P4 1 2 10 40 38 28 0
P5 3 9 9 58 49 40 40
Total 240 212 152 86
Average 48 42.4 30.4 17.2
P1 P4 P2 P4 P1 P5 P3
0 2 5 33 40 49 58 60
Advantages
 Processes are executed based their priorities.
 Provides a good mechanism where relative importance of each
process may be precisely defined
 Disadvantages
 If high priority process takes a lot of time, lower priority process may
starve and be postponed indefinitely. This situation is called
starvation.
 Deciding which process will get which priority level.
Bibliography
 https://static.javatpoint.com/operating-system/images/os-priority-
scheduling.png
 https://www.geeksforgeeks.org/priority-cpu-scheduling-with-different-
arrival-time-set-2/
 https://media.geeksforgeeks.org/wp-content/cdn-
uploads/20220727105424/Screenshot-77.png

Weitere ähnliche Inhalte

Was ist angesagt?

17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria 17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria
myrajendra
 
Process management in os
Process management in osProcess management in os
Process management in os
Miong Lazaro
 

Was ist angesagt? (20)

17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria 17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria
 
Python-00 | Introduction and installing
Python-00 | Introduction and installingPython-00 | Introduction and installing
Python-00 | Introduction and installing
 
Priority Scheduling
Priority Scheduling  Priority Scheduling
Priority Scheduling
 
COMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONSCOMPILER DESIGN OPTIONS
COMPILER DESIGN OPTIONS
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
Memory management
Memory managementMemory management
Memory management
 
Process management in os
Process management in osProcess management in os
Process management in os
 
OS-Process Management
OS-Process ManagementOS-Process Management
OS-Process Management
 
Shortest Job First
Shortest Job FirstShortest Job First
Shortest Job First
 
C Programming - Refresher - Part III
C Programming - Refresher - Part IIIC Programming - Refresher - Part III
C Programming - Refresher - Part III
 
Memory management in operating system | Paging | Virtual memory
Memory management in operating system | Paging | Virtual memoryMemory management in operating system | Paging | Virtual memory
Memory management in operating system | Paging | Virtual memory
 
Storage Management
Storage ManagementStorage Management
Storage Management
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process Scheduling
 
Multilevel queue scheduling
Multilevel queue schedulingMultilevel queue scheduling
Multilevel queue scheduling
 
5 Process Scheduling
5 Process Scheduling5 Process Scheduling
5 Process Scheduling
 
Multi processor scheduling
Multi  processor schedulingMulti  processor scheduling
Multi processor scheduling
 
Difference Program vs Process vs Thread
Difference Program vs Process vs ThreadDifference Program vs Process vs Thread
Difference Program vs Process vs Thread
 
scheduling
schedulingscheduling
scheduling
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
 

Ähnlich wie Priority_Scheduling.pptx

NON-PREEMPTIVE_SCHEDULING operating system
NON-PREEMPTIVE_SCHEDULING operating systemNON-PREEMPTIVE_SCHEDULING operating system
NON-PREEMPTIVE_SCHEDULING operating system
chnrketan
 
Operating Systems Third Unit - Fourth Semester - Engineering
Operating Systems Third Unit  - Fourth Semester - EngineeringOperating Systems Third Unit  - Fourth Semester - Engineering
Operating Systems Third Unit - Fourth Semester - Engineering
Yogesh Santhan
 

Ähnlich wie Priority_Scheduling.pptx (20)

CPU scheduling
CPU schedulingCPU scheduling
CPU scheduling
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
NON-PREEMPTIVE_SCHEDULING operating system
NON-PREEMPTIVE_SCHEDULING operating systemNON-PREEMPTIVE_SCHEDULING operating system
NON-PREEMPTIVE_SCHEDULING operating system
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
Os unit 2
Os unit 2Os unit 2
Os unit 2
 
cospptagain.pptx
cospptagain.pptxcospptagain.pptx
cospptagain.pptx
 
CPU scheduling algorithms in OS
CPU scheduling algorithms in OSCPU scheduling algorithms in OS
CPU scheduling algorithms in OS
 
Cpu Schedule Algorithm
Cpu Schedule AlgorithmCpu Schedule Algorithm
Cpu Schedule Algorithm
 
chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.ppt
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
Scheduling
SchedulingScheduling
Scheduling
 
Unit 2 notes
Unit 2 notesUnit 2 notes
Unit 2 notes
 
Operating Systems Third Unit - Fourth Semester - Engineering
Operating Systems Third Unit  - Fourth Semester - EngineeringOperating Systems Third Unit  - Fourth Semester - Engineering
Operating Systems Third Unit - Fourth Semester - Engineering
 
Priority scheduling algorithms
Priority scheduling algorithmsPriority scheduling algorithms
Priority scheduling algorithms
 
Preemptive process example.pptx
Preemptive process example.pptxPreemptive process example.pptx
Preemptive process example.pptx
 
LM10,11,12 - CPU SCHEDULING algorithms and its processes
LM10,11,12 - CPU SCHEDULING algorithms and its processesLM10,11,12 - CPU SCHEDULING algorithms and its processes
LM10,11,12 - CPU SCHEDULING algorithms and its processes
 
Operating System Scheduling
Operating System SchedulingOperating System Scheduling
Operating System Scheduling
 
In computing, scheduling is the action .
In computing, scheduling is the action .In computing, scheduling is the action .
In computing, scheduling is the action .
 
Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.
 
Osy ppt - Copy.pptx
Osy ppt - Copy.pptxOsy ppt - Copy.pptx
Osy ppt - Copy.pptx
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Priority_Scheduling.pptx

  • 2.  INDEX Content Slide No. 1. Scheduling 3 2. Priority Scheduling 4 3. Non Pre-emptive Priority Scheduling 5 4. Pre-emptive Priority Scheduling 6 5. Advantages & Disadvantages 7 6. Bibliography 8
  • 3. Scheduling  Scheduling is the activity of picking a process from ready state and allocating it to CPU.  The short term schedular is responsible for this process.  CPU utilization should be high  Turnaround time should be low  Response time should be low  Waiting time should be low  Throughput should be maximun  Performance Criteria for Scheduling Algorithm
  • 4. Priority Scheduling  This algorithm schedule a process based on the priority.  Out all of the available processes highest priority process gets the CPU.  If a tie occur then it follows FCFS, if again a tie occur then lowest id process is selected.  Generally the lower the priority number, the higher is the priority of the process.
  • 5.  Non Pre-emptive Priority Scheduling  In the non pre-emptive version of priority scheduling once a process gets the CUP it will execute until its completion.  Example: Process Priori ty AT BT CT TAT WT RT P1 2 0 11 11 11 0 0 P2 0 5 28 39 34 6 6 P3 3 12 2 60 48 46 46 P4 1 2 10 49 47 37 37 P5 3 9 9 58 49 40 40 Total 217 189 129 129 Average 43.4 37.8 25.8 25.8 P1 P2 P4 P5 P3 0 11 39 49 58 60
  • 6.  Pre-emptive Priority Scheduling  In the pre-emptive version when a process arrive the ready state, then it is compared with the other processes and with the process currently executing. Then the process with highest priority is allocated the CPU.  Example: Process Priori ty AT BT CT TAT WT RT P1 2 0 11 49 49 38 0 P2 0 5 28 33 28 0 0 P3 3 12 2 60 48 46 46 P4 1 2 10 40 38 28 0 P5 3 9 9 58 49 40 40 Total 240 212 152 86 Average 48 42.4 30.4 17.2 P1 P4 P2 P4 P1 P5 P3 0 2 5 33 40 49 58 60
  • 7. Advantages  Processes are executed based their priorities.  Provides a good mechanism where relative importance of each process may be precisely defined  Disadvantages  If high priority process takes a lot of time, lower priority process may starve and be postponed indefinitely. This situation is called starvation.  Deciding which process will get which priority level.