Presentation is loading. Please wait.

Presentation is loading. Please wait.

University of Pennsylvania 10/24/00CSE 3801 Disk Scheduling CSE 380 Lecture Note 11a Insup Lee.

Similar presentations


Presentation on theme: "University of Pennsylvania 10/24/00CSE 3801 Disk Scheduling CSE 380 Lecture Note 11a Insup Lee."— Presentation transcript:

1 University of Pennsylvania 10/24/00CSE 3801 Disk Scheduling CSE 380 Lecture Note 11a Insup Lee

2 University of Pennsylvania 10/24/00CSE 3802 Second Storage Management Why second storage? 1main memory too small 2main memory volatile Devices: Disks, Tapes, Drums Device Hardware backing store: for swapped parts of virtual store secondary store: to hold files archival store

3 University of Pennsylvania 10/24/00CSE 3803 Disk Scheduling Disk access time = seek time + rotational latency time + transfer time Minimize Seek Times I. Assumptions 1random distribution of locations on the disk. 2the seek time is linear in the # of tracks to cross. 3no delays due to the controller 4read & write take identical time II. Measures of response 1mean wait time 2variance of mean wait time III. Measures of load 1# of requests per second. 2mean length of task queue.

4 University of Pennsylvania 10/24/00CSE 3804 Disk-Head Seek Algorithms 1FCFS: disk queue: 98, 183, 37, 122, 14, 124, 65, 67 initial r/w head position: 53 |--------|--------|-----------------|----| 53 98 183 --------->------------------ total head movement = 45 + 75 + 146 + 85 + 108 + 110 + 59 + 2 = 640 tracks OK for small load, low variance of waiting time 2Shortest Seek Time First (SSTF) 65, 67, 37, 14, 98, 122, 124, 183 total head movement = 12 + 2 + 30 + 23 + 84 + 24 + 2 + 59 = 236 tracks High variance (starvation possible) Not optimal: eg. 53, 37, 14,...

5 University of Pennsylvania 10/24/00CSE 3805 3Scan: Shortest seek time in current direction first change direction only at edges. Assume head was moving toward 0. 37, 14, 0, 65, 67, 98, 122, 124, 183 total head movement = 16+23+14+65+2+31+24+2+59 = 236 tracks Almost as good as SSTF in mean wait time, lower variance. 4Look: Scan, but change direction if no requests require tracks farther in current direction. Always preferable over scan. 5Circular Scan/Look (C-Scan, C-look) Only travel in upward direction. Instead of changing direction, return immediately to the first track. Circular look is the best method overall. For light load, normal look is better.

6 University of Pennsylvania 10/24/00CSE 3806 6N-Step Scan Two queues, active (N tasks or less) and latent. Service requests from active queue. When it is empty, transfer the first N tasks of the latent queue to the active queue. N = infinity is the best, but still N-step scan is worse than plain scan for mean wait time, but lower variance. 7. Optimal algorithm possible, but computational overhead may not be worthwhile. File allocation method important, e.g., scattered file.

7 University of Pennsylvania 10/24/00CSE 3807 Minimize rotational latency I. Assumptions 1Many fixed heads 2No delay switching from one head to another 3read & write take the same time 4variable-sized records II. Policies 1Shortest latency time first 2Minimal total processing time schedule (MTPT) 1, 3, 2, 5, 4 (2 3/4 revolutions) There are several algorithms. The simples needs time O(n log n); It is complicated to deal with new requests,


Download ppt "University of Pennsylvania 10/24/00CSE 3801 Disk Scheduling CSE 380 Lecture Note 11a Insup Lee."

Similar presentations


Ads by Google