rensselaer polytechnic institute csc 432 operating systems david goldschmidt ph d
Download
Skip this Video
Download Presentation
Operating Systems { week 06.b }

Loading in 2 Seconds...

play fullscreen
1 / 12

Operating Systems { week 06.b } - PowerPoint PPT Presentation


  • 91 Views
  • Uploaded on

Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D. Operating Systems { week 06.b }. Short-term (CPU ) scheduling. the dispatcher operates here. CPU scheduling algorithms (i).

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

PowerPoint Slideshow about ' Operating Systems { week 06.b }' - callie-reynolds


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
rensselaer polytechnic institute csc 432 operating systems david goldschmidt ph d
Rensselaer Polytechnic Institute

CSC 432 – Operating Systems

David Goldschmidt, Ph.D.

Operating Systems{week 06.b}

short term cpu scheduling
Short-term (CPU) scheduling

the dispatcher operates here

cpu scheduling algorithms i
CPU scheduling algorithms (i)
  • CPU scheduling requires an algorithm todetermine which process to dispatch next
  • Scheduling algorithms include:
    • First-Come, First-Served (FCFS)
    • Shortest-Job-First (SJF)
    • Round-Robin (RR)
    • Priority
    • Multilevel Queue (MQ)
cpu scheduling algorithms ii

process

CPU scheduling algorithms (ii)
  • Preemptive scheduling preempts a running process before itstime slice expires
    • Or it preempts a processbecause its time slice has expired
  • Non-preemptive scheduling gives a process exclusive uninterrupted access to the CPU for the entirety of its execution

process

process

process

cpu scheduling algorithms iii
CPU scheduling algorithms (iii)
  • Compare scheduling algorithms by measuring
    • CPU utilization – keep CPU as busy as possible
    • Throughput – maximize the number of processes that complete their execution per unit time
    • Turnaround time – minimize the elapsed time to fully execute a particular process
    • Waiting time – minimize the elapsed time a process waits in the ready queue
round robin rr

P3

P1

P2

P3

P1

P3

P1

0

2

4

6

8

10

12

13

Round-Robin (RR)
  • RR is a preemptive algorithmthat gives all ready processesa fair time slice of CPU time
    • Using a time slice of 2 ms....

time

priority scheduling i
Priority Scheduling (i)
  • Associate a priority number with each process
    • The dispatcher selects the processwith the highest priority
    • For multiple ready processes withidentical priority numbers, use FCFS (or ...)
    • Key problem is starvation
      • Overcome starvation by aging, increasingthe priority of a process as it ages
priority scheduling ii

process

Priority Scheduling (ii)
  • Is priority scheduling preemptiveor non-preemptive?
    • Non-preemptive priority scheduling places higher-priority processes at the head of the queue
    • Preemptive priority scheduling requires a running process to be interrupted and preempted upon the arrival of a higher-priority process

(use this one for Project #1)

multiclass systems
Multiclass systems
  • Operating systems that support priority schemes are often called multiclass systems

use a separate schedulingalgorithm for each queue

multilevel queue mq
Multilevel Queue (MQ)
  • Assign processes to multiple queues,each with its own scheduling algorithm
multilevel feedback queue mfq
Multilevel Feedback Queue (MFQ)
  • Dynamically assign processes to multiple queues based on actual CPU burst times
    • i.e. feedback

quantum is synonymouswith time slice

practice
Practice!
  • Apply the FCFS, SJF, RR, and Preemptive Priority scheduling algorithms to this table:
    • For RR, use a time slice of 10 ms
    • Calculate the wait and turnaround times ofeach process, as well as overall averages

lower number indicates

a higher priority

recalculate using

context switch

time tcs = 20 μs

ad