1 / 7

CGS 3763 Operating Systems Concepts Spring 2013

CGS 3763 Operating Systems Concepts Spring 2013. Dan C. Marinescu Office: HEC 304 Office hours: M- Wd 11:30 - 12:30 A M. Last time: CPU Scheduling Today: CPU scheduling Next time CPU scheduling Process synchronization Reading assignments

elewa
Download Presentation

CGS 3763 Operating Systems Concepts Spring 2013

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11:30 - 12:30 AM

  2. Last time: CPU Scheduling Today: CPU scheduling Next time CPU scheduling Process synchronization Reading assignments Chapter 6 of the textbook Lecture 24 – Wednesday, March 13, 2013 Lecture 24

  3. Comparison of FCFS, SJF, and RR • We have three processes A, B, and C. • Each process is characterized by • Release time (R) – the time the process arrives in the system • Start time (S) – the time the scheduler allows it to run • Wait time (W) – the time till it has to wait until it is started: W = S - R • Work (Wrk) – the amount of time it needs to use the CPU • Finish time (F) – the time the process finishes: F=S+Wrk • Time in system (T) – the time from when the process arrives until it finishes: T = F- R. • We compare • The average time in system • The average waiting time for three scheduling policies: FCFS, SJF, and RR. Lecture 24

  4. Lecture 24

  5. Lecture 24

  6. Priority scheduling • Each thread/process has a priority and the one with the highest priority (smallest integer  highest priority) is scheduled next. • Preemptive • Non-preemptive • SJF is a priority scheduling where priority is the predicted next CPU burst time • Problem  Starvation – low priority threads/processes may never execute • Solution to starvation  Aging – as time progresses increase the priority of the thread/process • Priority my be computed dynamically Lecture 24

  7. Priority inversion • A lower priority thread/process prevents a higher priority one from running. • T3 has the highest priority, T1 has the lowest priority; T1 and T3 share a lock. • T1 acquires the lock, then it is suspended when T3 starts. • Eventually T3 requests the lock and it is suspended waiting for T1 to release the lock. • T2 has higher priority than T1 and runs; neither T3 nor T1 can run; T1 due to its low priority, T3 because it needs the lock help by T1. • Allow a low priority thread holding a lock to run with the higher priority of the thread which requests the lock • other types of software. Lecture 24

More Related