SlideShare a Scribd company logo
1 of 13
CPU Scheduling
What is CPU Scheduling?
• CPU scheduling is a process which allows one process to use the CPU
while the execution of another process is on hold(in waiting state) due
to unavailability of any resource like I/O etc.
• The aim of CPU scheduling is to make the system efficient, fast and
fair.
• Whenever the CPU becomes idle, the operating system must select one
of the processes in the ready queue to be executed. The selection
process is carried out by the short-term scheduler (or CPU scheduler).
The scheduler selects from among the processes in memory that are
ready to execute, and allocates the CPU to one of them.
Types of CPU Scheduling
CPU scheduling decisions may take place under the following four
circumstances:
• When a process switches from the running state to the waiting state(for
I/O request or invocation of wait for the termination of one of the child
processes).
• When a process switches from the running state to the ready state (for
example, when an interrupt occurs).
• When a process switches from the waiting state to the ready state(for
example, completion of I/O).
• When a process terminates.
Types :
• Preemptive Scheduling
The scheduling in which a Running program can be interrupted if a
high priority process enters the queue & is allocated to the CPU is
called “Preemptive Scheduling”.
• Non-Preemptive Scheduling :
The scheduling in which a Running program Cannot be interrupted
by any other process is called “Non-Preemptive Scheduling”.
Scheduling Algorithms
• First Come First Serve(FCFS) Scheduling
• Shortest-Job-First(SJF) Scheduling
• Priority Scheduling
• Round Robin(RR) Scheduling
Process Scheduling solution
Process Burst Time
P1 9
P2 33
P3 2
P 4 5
P5 14
Suppose that the processes arrive in the order: P1 , P2 , P3, P4 .P5.
1. FCFS
2. SJF
3. Priority Scheduling
3. RR (Round Robin ) Quantum = 8 :
Multiple processor scheduling.
• Multiprocessor scheduling can be used when processes are related
to one another. Scheduling two or more than two threads at the
same time across multiple central processing units is called as
space sharing.
Real-time-scheduling
• A real Time scheduling intented to serve real-time-application
requests.it must be able to process data as it comes in, typically
without buffering delays.Processing time requirements ( including
any os delay ) are measured in shorter.
• Determines the order of real time task executions.
• Highest priority process runs first.
• Real time scheduling is one of the most active areas of research in
computer Science.
Evaluation of Scheduling algorithms

More Related Content

What's hot

deadlock avoidance
deadlock avoidancedeadlock avoidance
deadlock avoidance
wahab13
 
Services provided by os
Services provided by osServices provided by os
Services provided by os
Sumant Diwakar
 
Process management in os
Process management in osProcess management in os
Process management in os
Miong Lazaro
 

What's hot (20)

Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
 
Priority scheduling algorithms
Priority scheduling algorithmsPriority scheduling algorithms
Priority scheduling algorithms
 
Operating System: Deadlock
Operating System: DeadlockOperating System: Deadlock
Operating System: Deadlock
 
Semaphores
SemaphoresSemaphores
Semaphores
 
Memory management ppt
Memory management pptMemory management ppt
Memory management ppt
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
deadlock avoidance
deadlock avoidancedeadlock avoidance
deadlock avoidance
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
Demand paging
Demand pagingDemand paging
Demand paging
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
 
Scheduling Definition, objectives and types
Scheduling Definition, objectives and types Scheduling Definition, objectives and types
Scheduling Definition, objectives and types
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)
 
Operating systems system structures
Operating systems   system structuresOperating systems   system structures
Operating systems system structures
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Services provided by os
Services provided by osServices provided by os
Services provided by os
 
operating system structure
operating system structureoperating system structure
operating system structure
 
Process management in os
Process management in osProcess management in os
Process management in os
 

Similar to CPU Scheduling in OS Presentation

Lecture 4 - Process Scheduling.pptx
Lecture 4 - Process Scheduling.pptxLecture 4 - Process Scheduling.pptx
Lecture 4 - Process Scheduling.pptx
Amanuelmergia
 
Lecture 4 - Process Scheduling (1).pptx
Lecture 4 - Process Scheduling (1).pptxLecture 4 - Process Scheduling (1).pptx
Lecture 4 - Process Scheduling (1).pptx
Amanuelmergia
 

Similar to CPU Scheduling in OS Presentation (20)

operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdf
 
Lecture 4 process cpu scheduling
Lecture 4   process cpu schedulingLecture 4   process cpu scheduling
Lecture 4 process cpu scheduling
 
Operating system 28 fundamental of scheduling
Operating system 28 fundamental of schedulingOperating system 28 fundamental of scheduling
Operating system 28 fundamental of scheduling
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process management
 
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
 
ch_scheduling (1).ppt
ch_scheduling (1).pptch_scheduling (1).ppt
ch_scheduling (1).ppt
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILEDCPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
 
Lecture 4 - Process Scheduling.pptx
Lecture 4 - Process Scheduling.pptxLecture 4 - Process Scheduling.pptx
Lecture 4 - Process Scheduling.pptx
 
Lecture 4 - Process Scheduling (1).pptx
Lecture 4 - Process Scheduling (1).pptxLecture 4 - Process Scheduling (1).pptx
Lecture 4 - Process Scheduling (1).pptx
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
L6 CPU Scheduling.pptx
L6 CPU Scheduling.pptxL6 CPU Scheduling.pptx
L6 CPU Scheduling.pptx
 
CPU Scheduling.pptx
CPU Scheduling.pptxCPU Scheduling.pptx
CPU Scheduling.pptx
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
CPU Scheduling Part-I.pdf
CPU Scheduling Part-I.pdfCPU Scheduling Part-I.pdf
CPU Scheduling Part-I.pdf
 
ch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdfch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdf
 
PROCESS.pptx
PROCESS.pptxPROCESS.pptx
PROCESS.pptx
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
 
Scheduling
SchedulingScheduling
Scheduling
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

CPU Scheduling in OS Presentation

  • 2. What is CPU Scheduling? • CPU scheduling is a process which allows one process to use the CPU while the execution of another process is on hold(in waiting state) due to unavailability of any resource like I/O etc. • The aim of CPU scheduling is to make the system efficient, fast and fair. • Whenever the CPU becomes idle, the operating system must select one of the processes in the ready queue to be executed. The selection process is carried out by the short-term scheduler (or CPU scheduler). The scheduler selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them.
  • 3. Types of CPU Scheduling CPU scheduling decisions may take place under the following four circumstances: • When a process switches from the running state to the waiting state(for I/O request or invocation of wait for the termination of one of the child processes). • When a process switches from the running state to the ready state (for example, when an interrupt occurs). • When a process switches from the waiting state to the ready state(for example, completion of I/O). • When a process terminates.
  • 4. Types : • Preemptive Scheduling The scheduling in which a Running program can be interrupted if a high priority process enters the queue & is allocated to the CPU is called “Preemptive Scheduling”. • Non-Preemptive Scheduling : The scheduling in which a Running program Cannot be interrupted by any other process is called “Non-Preemptive Scheduling”.
  • 5. Scheduling Algorithms • First Come First Serve(FCFS) Scheduling • Shortest-Job-First(SJF) Scheduling • Priority Scheduling • Round Robin(RR) Scheduling
  • 6. Process Scheduling solution Process Burst Time P1 9 P2 33 P3 2 P 4 5 P5 14 Suppose that the processes arrive in the order: P1 , P2 , P3, P4 .P5.
  • 10. 3. RR (Round Robin ) Quantum = 8 :
  • 11. Multiple processor scheduling. • Multiprocessor scheduling can be used when processes are related to one another. Scheduling two or more than two threads at the same time across multiple central processing units is called as space sharing.
  • 12. Real-time-scheduling • A real Time scheduling intented to serve real-time-application requests.it must be able to process data as it comes in, typically without buffering delays.Processing time requirements ( including any os delay ) are measured in shorter. • Determines the order of real time task executions. • Highest priority process runs first. • Real time scheduling is one of the most active areas of research in computer Science.