Presentation is loading. Please wait.

Presentation is loading. Please wait.

Operating Systems Lecture 15 Disk Scheduling Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software.

Similar presentations


Presentation on theme: "Operating Systems Lecture 15 Disk Scheduling Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software."— Presentation transcript:

1 Operating Systems Lecture 15 Disk Scheduling Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software Engineering Beijing Univ. of Posts and Telcomm.

2 Purposes of disk scheduling  The processes running on a machine may have multiple outstanding requests for data from the disk.  In what order should requests be served?

3 FCFS disk scheduling  First-Come-First-Served. This is how nachos works right now. As processes arrive, they queue up for the disk and get their requests served in order. In current version of nachos, queueing happens at the mutex lock.

4 What is wrong with FCFS?  May have long swings from one part of disk to another. It makes sense to service outstanding requests from adjacent parts of disk sequentially.

5 Shortest-Seek-Time-First disk sceduling  Disk scheduler looks at all outstanding disk requests, and services the one closest to where the disk head currently is. Sort of like Shortest-Job-First task scheduling.

6 What is the problem with SSTF?  Starvation. A request for a remote part of the disk may never get serviced.

7 SCAN algorithm  Head goes from one end of disk to another. Reverses direction when hits end of disk and goes back the other way. Eliminates starvation problem.  Minor variant: C-SCAN, which goes all the way back to front of disk when it hits the end, sort of like a raster scan in a display.

8 LOOK algorithm  Like scan, but reverse direction when hit the last request in the current direction. C-LOOK is the circular variant of LOOK. What most systems use in practice.


Download ppt "Operating Systems Lecture 15 Disk Scheduling Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software."

Similar presentations


Ads by Google