SlideShare a Scribd company logo
1 of 10
CPU SCHEDULING
T S PRADEEP KUMAR
CPU Burst and IO Burst
CPU Burst and IO Burst
• Burst time is an assumption of how long a process
  requires the CPU between I/O waits.
• It can not be predicted exactly, before a process starts.
• It means the amount of time a process uses the CPU for a
  single time. (A process can use the CPU several times
  before complete the job)
CPU Scheduler
• Short term scheduler is used
• Scheduler selects the processes from the ready list and
  allocates the CPU to that process.
• Ready queue may be
  • FIFO
  • Priority queue
  • Tree
  • Unordered list
  • Or any list
Scheduling Decisions
1. When a process switches from the running state to the
   waiting state
2. When a process switches from the running state to the
   ready state
3. When a process switches from the waiting state to the
   ready state
4. When a process terminates
1 and 4 uses Non Preemptive Scheduling
2 and 3 uses Preemptive Scheduling
Non preemptive Scheduling
• Windows 3.1 uses non preemptive scheduling
• once the CPU has been allocated to a process, the
  process keeps the CPU until it releases the CPU either by
  terminating or by switching to the waiting state.
• No special hardware (ex. timer)is needed for non
  preemption.
Preemptive Scheduling
• All the OS these days uses preemptive scheduling
• The hardware and the kernel has to be redesigned for
  preemptive scheduling
• Under preemption,
 • A task which is running under a CPU may be going to a ready
     state, if another high priority task running under a CPU
 •   Upon completion, then the task will resume based on the priorities
     of the other tasks in the ready queue.
 •   System calls are generated using Processes
 •   Kernel important data can be affected if preemption happens in
     between, so kernel has to be designed for accepting these
     changes.
 •   The kernel will not preempt a process while the kernel data
     structures are in an inconsistent state
Dispatcher
• The dispatcher is the module that gives control of the
 CPU to the process selected by the short-term scheduler.
  • Switching context
  • Switching to user mode
  • Jumping to the proper location in the user program to restart that
   program
• The dispatcher should be fast enough as it is invoked
  during every context switch.
• The time it takes for the dispatcher to stop one process
  and start another running is known as the dispatch
  latency
Scheduling criteria
• CPU Utilisation
   • Range from 0 to 100
   • Upto 40% for lightly loaded system, 90% for heavily loaded
• Throughput
   • Number of processes/hour
• Turnaround time
   • How long it takes to execute a process
   • The interval from the time of submission of a process to the time of
     completion is the turnaround time
   • Te_cpu_io+Tmem+Tready_queue
• Waiting time
   • Time for a process to wait in the ready queue
• Response Time
   • the time from the submission of a request until the first response is
     produced
Scheduling criteria
• Maximize
  • throughput and
  • CPU utilisation
• Minimize
  • Turnaround,
  • Waiting time
  • Response time.

More Related Content

What's hot

Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.Ravi Kumar Patel
 
Windows process-scheduling
Windows process-schedulingWindows process-scheduling
Windows process-schedulingTalha Shaikh
 
cpu scheduling by shivam singh
cpu scheduling by shivam singhcpu scheduling by shivam singh
cpu scheduling by shivam singhshivam71291
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Mukesh Chinta
 
Operating System-Process Scheduling
Operating System-Process SchedulingOperating System-Process Scheduling
Operating System-Process SchedulingShipra Swati
 
Processes and operating systems
Processes and operating systemsProcesses and operating systems
Processes and operating systemsRAMPRAKASHT1
 
Round robin scheduling
Round robin schedulingRound robin scheduling
Round robin schedulingRaghav S
 
Window scheduling algorithm
Window scheduling algorithmWindow scheduling algorithm
Window scheduling algorithmBinal Parekh
 
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
 
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)ritu98
 
Processor management
Processor managementProcessor management
Processor managementdev3993
 
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process SchedulingDamian T. Gordon
 

What's hot (20)

Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.
 
Windows process-scheduling
Windows process-schedulingWindows process-scheduling
Windows process-scheduling
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
cpu scheduling by shivam singh
cpu scheduling by shivam singhcpu scheduling by shivam singh
cpu scheduling by shivam singh
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
Operating System-Process Scheduling
Operating System-Process SchedulingOperating System-Process Scheduling
Operating System-Process Scheduling
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Operating System
Operating SystemOperating System
Operating System
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
Ch6 cpu scheduling
Ch6   cpu schedulingCh6   cpu scheduling
Ch6 cpu scheduling
 
Processes and operating systems
Processes and operating systemsProcesses and operating systems
Processes and operating systems
 
Round robin scheduling
Round robin schedulingRound robin scheduling
Round robin scheduling
 
Window scheduling algorithm
Window scheduling algorithmWindow scheduling algorithm
Window scheduling algorithm
 
17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria 17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria
 
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
cpu scheduling in os
cpu scheduling in oscpu scheduling in os
cpu scheduling in os
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
Processor management
Processor managementProcessor management
Processor management
 
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process Scheduling
 

Viewers also liked

Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systemsPradeep Kumar TS
 
Challenges in Embedded Computing
Challenges in Embedded ComputingChallenges in Embedded Computing
Challenges in Embedded ComputingPradeep Kumar TS
 
Virtual classrooms and labs using Big Blue Button
Virtual classrooms and labs using Big Blue ButtonVirtual classrooms and labs using Big Blue Button
Virtual classrooms and labs using Big Blue ButtonPradeep Kumar TS
 
Lecture 1 introduction to operating systems
Lecture 1  introduction to operating systemsLecture 1  introduction to operating systems
Lecture 1 introduction to operating systemsPradeep Kumar TS
 
Functions of osi layer in computer networks
Functions of osi layer in computer networksFunctions of osi layer in computer networks
Functions of osi layer in computer networksPradeep Kumar TS
 
Inter process communication
Inter process communicationInter process communication
Inter process communicationPradeep Kumar TS
 
Software Defined Networking - 1
Software Defined Networking - 1Software Defined Networking - 1
Software Defined Networking - 1Pradeep Kumar TS
 
IEEE 802 Standard for Computer Networks
IEEE 802 Standard for Computer NetworksIEEE 802 Standard for Computer Networks
IEEE 802 Standard for Computer NetworksPradeep Kumar TS
 

Viewers also liked (12)

Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systems
 
Challenges in Embedded Computing
Challenges in Embedded ComputingChallenges in Embedded Computing
Challenges in Embedded Computing
 
Virtual classrooms and labs using Big Blue Button
Virtual classrooms and labs using Big Blue ButtonVirtual classrooms and labs using Big Blue Button
Virtual classrooms and labs using Big Blue Button
 
Introduction to TCP
Introduction to TCPIntroduction to TCP
Introduction to TCP
 
Cs problem [repaired]
Cs problem [repaired]Cs problem [repaired]
Cs problem [repaired]
 
Lecture 1 introduction to operating systems
Lecture 1  introduction to operating systemsLecture 1  introduction to operating systems
Lecture 1 introduction to operating systems
 
OSI Layers
OSI Layers OSI Layers
OSI Layers
 
Functions of osi layer in computer networks
Functions of osi layer in computer networksFunctions of osi layer in computer networks
Functions of osi layer in computer networks
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
 
Software Defined Networking - 1
Software Defined Networking - 1Software Defined Networking - 1
Software Defined Networking - 1
 
Lecture 5 process concept
Lecture 5   process conceptLecture 5   process concept
Lecture 5 process concept
 
IEEE 802 Standard for Computer Networks
IEEE 802 Standard for Computer NetworksIEEE 802 Standard for Computer Networks
IEEE 802 Standard for Computer Networks
 

Similar to Lecture 7 cpu scheduling

CPU Scheduling Criteria CPU Scheduling Criteria (1).pptx
CPU Scheduling Criteria CPU Scheduling Criteria (1).pptxCPU Scheduling Criteria CPU Scheduling Criteria (1).pptx
CPU Scheduling Criteria CPU Scheduling Criteria (1).pptxTSha7
 
CPU Scheduling.pptx
CPU Scheduling.pptxCPU Scheduling.pptx
CPU Scheduling.pptxyashu23
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdfAliyanAbbas1
 
Unit 2_OS process management
Unit 2_OS process management Unit 2_OS process management
Unit 2_OS process management JayeshGadhave1
 
Scheduling Definition, objectives and types
Scheduling Definition, objectives and types Scheduling Definition, objectives and types
Scheduling Definition, objectives and types Maitree Patel
 
ch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdfch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdfSonaliAjankar
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentationusmankiyani1
 
Lecture 4 - Process Scheduling.pptx
Lecture 4 - Process Scheduling.pptxLecture 4 - Process Scheduling.pptx
Lecture 4 - Process Scheduling.pptxAmanuelmergia
 
Lecture 4 - Process Scheduling (1).pptx
Lecture 4 - Process Scheduling (1).pptxLecture 4 - Process Scheduling (1).pptx
Lecture 4 - Process Scheduling (1).pptxAmanuelmergia
 
Process scheduling & time
Process scheduling & timeProcess scheduling & time
Process scheduling & timeYojana Nanaware
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptxSHUJEHASSAN
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process managementArnav Chowdhury
 
Operating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - SchedulingOperating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - SchedulingPeter Tröger
 
In computing, scheduling is the action .
In computing, scheduling is the action .In computing, scheduling is the action .
In computing, scheduling is the action .nathansel1
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling AlgorithmsTayba Farooqui
 
Evolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptxEvolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptxssuser000e54
 
PROCESS.pptx
PROCESS.pptxPROCESS.pptx
PROCESS.pptxDivyaKS18
 

Similar to Lecture 7 cpu scheduling (20)

CPU Scheduling Part-I.pdf
CPU Scheduling Part-I.pdfCPU Scheduling Part-I.pdf
CPU Scheduling Part-I.pdf
 
CPU Scheduling Criteria CPU Scheduling Criteria (1).pptx
CPU Scheduling Criteria CPU Scheduling Criteria (1).pptxCPU Scheduling Criteria CPU Scheduling Criteria (1).pptx
CPU Scheduling Criteria CPU Scheduling Criteria (1).pptx
 
CPU Scheduling.pptx
CPU Scheduling.pptxCPU Scheduling.pptx
CPU Scheduling.pptx
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdf
 
Unit 2_OS process management
Unit 2_OS process management Unit 2_OS process management
Unit 2_OS process management
 
Scheduling Definition, objectives and types
Scheduling Definition, objectives and types Scheduling Definition, objectives and types
Scheduling Definition, objectives and types
 
ch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdfch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdf
 
ch_scheduling (1).ppt
ch_scheduling (1).pptch_scheduling (1).ppt
ch_scheduling (1).ppt
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
 
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
 
Process management1
Process management1Process management1
Process management1
 
Process scheduling & time
Process scheduling & timeProcess scheduling & time
Process scheduling & time
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptx
 
Os unit 3 , process management
Os unit 3 , process managementOs unit 3 , process management
Os unit 3 , process management
 
Operating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - SchedulingOperating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - 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 .
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
Evolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptxEvolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptx
 
PROCESS.pptx
PROCESS.pptxPROCESS.pptx
PROCESS.pptx
 

More from Pradeep Kumar TS

Digital Portfolio and Footprint
Digital Portfolio and FootprintDigital Portfolio and Footprint
Digital Portfolio and FootprintPradeep Kumar TS
 
Software Define Networking (SDN)
Software Define Networking (SDN)Software Define Networking (SDN)
Software Define Networking (SDN)Pradeep Kumar TS
 
What next - Career Enhancement of Graduates
What next - Career Enhancement of GraduatesWhat next - Career Enhancement of Graduates
What next - Career Enhancement of GraduatesPradeep Kumar TS
 
Higher Order Thinking - Question paper setting
Higher Order Thinking - Question paper settingHigher Order Thinking - Question paper setting
Higher Order Thinking - Question paper settingPradeep Kumar TS
 
IoT Communication Protocols
IoT Communication ProtocolsIoT Communication Protocols
IoT Communication ProtocolsPradeep Kumar TS
 
RPL - Routing Protocol for Low Power and Lossy Networks
RPL - Routing Protocol for Low Power and Lossy NetworksRPL - Routing Protocol for Low Power and Lossy Networks
RPL - Routing Protocol for Low Power and Lossy NetworksPradeep Kumar TS
 
Recompiling network simulator 2
Recompiling network simulator 2Recompiling network simulator 2
Recompiling network simulator 2Pradeep Kumar TS
 
OTcl and C++ linkages in NS2
OTcl and C++ linkages in NS2OTcl and C++ linkages in NS2
OTcl and C++ linkages in NS2Pradeep Kumar TS
 
Wired and Wireless Examples in ns2
Wired and Wireless Examples in ns2Wired and Wireless Examples in ns2
Wired and Wireless Examples in ns2Pradeep Kumar TS
 
Software Defined Networking - 2
Software Defined Networking - 2Software Defined Networking - 2
Software Defined Networking - 2Pradeep Kumar TS
 
Software Defined Networking - 3
Software Defined Networking - 3Software Defined Networking - 3
Software Defined Networking - 3Pradeep Kumar TS
 

More from Pradeep Kumar TS (20)

Digital Portfolio and Footprint
Digital Portfolio and FootprintDigital Portfolio and Footprint
Digital Portfolio and Footprint
 
Open book Examination
Open book ExaminationOpen book Examination
Open book Examination
 
Software Define Networking (SDN)
Software Define Networking (SDN)Software Define Networking (SDN)
Software Define Networking (SDN)
 
What next - Career Enhancement of Graduates
What next - Career Enhancement of GraduatesWhat next - Career Enhancement of Graduates
What next - Career Enhancement of Graduates
 
Protothreads
ProtothreadsProtothreads
Protothreads
 
6LoWPAN
6LoWPAN 6LoWPAN
6LoWPAN
 
Software Defined Networks
Software Defined NetworksSoftware Defined Networks
Software Defined Networks
 
Higher Order Thinking - Question paper setting
Higher Order Thinking - Question paper settingHigher Order Thinking - Question paper setting
Higher Order Thinking - Question paper setting
 
IoT Communication Protocols
IoT Communication ProtocolsIoT Communication Protocols
IoT Communication Protocols
 
IoT Applications
IoT ApplicationsIoT Applications
IoT Applications
 
RPL - Routing Protocol for Low Power and Lossy Networks
RPL - Routing Protocol for Low Power and Lossy NetworksRPL - Routing Protocol for Low Power and Lossy Networks
RPL - Routing Protocol for Low Power and Lossy Networks
 
Mannasim for NS2
Mannasim for NS2Mannasim for NS2
Mannasim for NS2
 
Recompiling network simulator 2
Recompiling network simulator 2Recompiling network simulator 2
Recompiling network simulator 2
 
OTcl and C++ linkages in NS2
OTcl and C++ linkages in NS2OTcl and C++ linkages in NS2
OTcl and C++ linkages in NS2
 
Wired and Wireless Examples in ns2
Wired and Wireless Examples in ns2Wired and Wireless Examples in ns2
Wired and Wireless Examples in ns2
 
Installation of ns2
Installation of ns2Installation of ns2
Installation of ns2
 
Introduction to ns2
Introduction to ns2Introduction to ns2
Introduction to ns2
 
Software Defined Networking - 2
Software Defined Networking - 2Software Defined Networking - 2
Software Defined Networking - 2
 
Software Defined Networking - 3
Software Defined Networking - 3Software Defined Networking - 3
Software Defined Networking - 3
 
Tracing and awk in ns2
Tracing and awk in ns2Tracing and awk in ns2
Tracing and awk in ns2
 

Recently uploaded

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
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)Jisc
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
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 ClassroomPooky Knightsmith
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
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...Poonam Aher Patil
 
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).pptxEsquimalt MFRC
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
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.pptxDr. Sarita Anand
 

Recently uploaded (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
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)
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
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
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
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...
 
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
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
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
 

Lecture 7 cpu scheduling

  • 1. CPU SCHEDULING T S PRADEEP KUMAR
  • 2. CPU Burst and IO Burst
  • 3. CPU Burst and IO Burst • Burst time is an assumption of how long a process requires the CPU between I/O waits. • It can not be predicted exactly, before a process starts. • It means the amount of time a process uses the CPU for a single time. (A process can use the CPU several times before complete the job)
  • 4. CPU Scheduler • Short term scheduler is used • Scheduler selects the processes from the ready list and allocates the CPU to that process. • Ready queue may be • FIFO • Priority queue • Tree • Unordered list • Or any list
  • 5. Scheduling Decisions 1. When a process switches from the running state to the waiting state 2. When a process switches from the running state to the ready state 3. When a process switches from the waiting state to the ready state 4. When a process terminates 1 and 4 uses Non Preemptive Scheduling 2 and 3 uses Preemptive Scheduling
  • 6. Non preemptive Scheduling • Windows 3.1 uses non preemptive scheduling • once the CPU has been allocated to a process, the process keeps the CPU until it releases the CPU either by terminating or by switching to the waiting state. • No special hardware (ex. timer)is needed for non preemption.
  • 7. Preemptive Scheduling • All the OS these days uses preemptive scheduling • The hardware and the kernel has to be redesigned for preemptive scheduling • Under preemption, • A task which is running under a CPU may be going to a ready state, if another high priority task running under a CPU • Upon completion, then the task will resume based on the priorities of the other tasks in the ready queue. • System calls are generated using Processes • Kernel important data can be affected if preemption happens in between, so kernel has to be designed for accepting these changes. • The kernel will not preempt a process while the kernel data structures are in an inconsistent state
  • 8. Dispatcher • The dispatcher is the module that gives control of the CPU to the process selected by the short-term scheduler. • Switching context • Switching to user mode • Jumping to the proper location in the user program to restart that program • The dispatcher should be fast enough as it is invoked during every context switch. • The time it takes for the dispatcher to stop one process and start another running is known as the dispatch latency
  • 9. Scheduling criteria • CPU Utilisation • Range from 0 to 100 • Upto 40% for lightly loaded system, 90% for heavily loaded • Throughput • Number of processes/hour • Turnaround time • How long it takes to execute a process • The interval from the time of submission of a process to the time of completion is the turnaround time • Te_cpu_io+Tmem+Tready_queue • Waiting time • Time for a process to wait in the ready queue • Response Time • the time from the submission of a request until the first response is produced
  • 10. Scheduling criteria • Maximize • throughput and • CPU utilisation • Minimize • Turnaround, • Waiting time • Response time.