cpu scheduling n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
CPU Scheduling PowerPoint Presentation
Download Presentation
CPU Scheduling

Loading in 2 Seconds...

play fullscreen
1 / 10

CPU Scheduling - PowerPoint PPT Presentation


  • 103 Views
  • Uploaded on

CPU Scheduling. CSCI 4534. Introduction. By switching the CPU among processes, the O.S. can make the system more productive Some process is running at all times Several processes are kept in memory A process is executed until it must wait typically for I/O

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

CPU Scheduling


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
introduction
Introduction
  • By switching the CPU among processes, the O.S. can make the system more productive
    • Some process is running at all times
    • Several processes are kept in memory
    • A process is executed until it must wait
      • typically for I/O
    • When this process waits, another runs
      • running means the CPU is executing it
cpu i o burst cycle
CPU-I/O Burst Cycle
  • Observed Property of Processes:
    • Processesalternate between a cycle of CPU execution and I/O wait
      • CPU burst
      • I/O burst (read from file/write to file)
      • CPU burst
      • CPU burst (to terminate)
cpu i o burst cycle1
CPU-I/O Burst Cycle
  • Durations of CPU bursts vary, but curve is similar to Figure 5.2 histogram, typically:
    • large number of short CPU bursts
    • small number of long CPU bursts
  • I/O bound programs have many short CPU bursts
  • CPU bound programs have a few long CPU bursts
cpu scheduler
CPU Scheduler
  • When CPU is idle, the O.S. selects a process in the ready queue
    • Done by short-term scheduler / CPU scheduler
  • Ready Queue is set of PCBs in:
    • FIFO queue
    • priority queue (actually a Ready State, not queue)
    • tree
    • unordered linked list
cpu scheduling decisions
CPU Scheduling Decisions
  • CPU scheduling decisions are made when:
    • A process switches from running to waiting
    • A process switches from running to ready
    • A process switches from waiting to ready
    • A process terminates
  • What is preemptive?
    • What are problems?
  • What is nonpreemptive?
dispatcher
Dispatcher
  • The dispatcher gives control of CPU to the process selected by short-term scheduler
    • It does context switching
    • It switches to user mode
    • It jumps to next executable statement in the user program
  • The time taken to stop one process and start another is dispatch latency
    • “interval between stimulation and response”
scheduling criteria
Scheduling Criteria
  • CPU utilization
  • Throughput - # processes completed per time unit
  • Turnaround time - time from submission to completion
  • Waiting time - in the ready queue
  • Response time - time from submission to first response
scheduling criteria1
Scheduling Criteria
  • Goals:
    • Maximize: CPU Utilization and Throughput
    • Minimize: Turnaround, Waiting and Response Times
  • May also want to minimize variance for response time for more predictability
scheduling algorithms
Scheduling Algorithms
  • FCFS
  • SJF
  • Priority Scheduling
  • Round-Robin
  • Multilevel Queue
  • Multilevel Feedback Queue