1 / 9

CS 101 – Oct. 28

CS 101 – Oct. 28. Operating Systems (continued) Process states √ Scheduling processes on the CPU System load Types of OS. Process scheduling. Extensively studied in CS ! Look carefully at examples pp. 340-342. 3 common techniques Round robin (we saw this one already)

tania
Download Presentation

CS 101 – Oct. 28

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. CS 101 – Oct. 28 • Operating Systems (continued) • Process states √ • Scheduling processes on the CPU • System load • Types of OS

  2. Process scheduling • Extensively studied in CS ! • Look carefully at examples pp. 340-342. • 3 common techniques • Round robin (we saw this one already) • First-come, first-served • Shortest Job Next

  3. Scheduling • Round-robin • Fair: give each process an equal time quantum. • Usually not long enough to finish, so pre-empt. Pre-emption incurs some overhead, so there are alternative strategies: • First-come first served • Do the tasks in the order in which they are requested • Shortest job next • Try to minimize the average completion time. Do the easy/short tasks first.

  4. Measuring a schedule • To tell how good a schedule is, we can compute the average turnaround time. • People are usually interested in how long it takes for their jobs to get done. • Turnaround time = (time @ finish – time @ request)

  5. Example First-come, first-served: Process 1 can execute from t=0 to t=20 Process 2, t=20 to t=50 Process 3, t=50 to t=90 Process 4, t=90 to t=100 What is the average turnaround time?

  6. Examples

  7. System load • A measure to show how “busy” the CPU is • At an instant: how many tasks are currently running or ready • If load > 1, we have “overloaded” system, and work is starting to back up. Should stop requesting more jobs.  • Typically reported as an average over the last 1, 5 or 15 minutes.

  8. Cutting Edge • Real-time OS • Assumes all jobs have deadlines • High Performance Computing • Using multiple CPUs at once • Technique is called “parallel processing” • Distributed OS • Your running program and/or files may be on a different machine

More Related