Disk Scheduling PowerPoint PPT Presentation

presentation player overlay
1 / 7
About This Presentation
Transcript and Presenter's Notes

Title: Disk Scheduling


1
Disk Scheduling
  • CSE 380
  • Lecture Note 11a
  • Insup Lee

2
Second Storage Management
  • Why second storage?
  • main memory too small
  • main memory volatile
  • Devices Disks, Tapes, Drums
  • Device Hardware
  • backing store for swapped parts of virtual
    storesecondary store to hold filesarchival
    store

3
Disk Scheduling
  • Disk access time seek time
    rotational latency time transfer time
  • Minimize Seek Times
  • I. Assumptions
  • random distribution of locations on the disk.
  • the seek time is linear in the of tracks to
    cross.
  • no delays due to the controller
  • read write take identical time
  • II. Measures of response
  • mean wait time
  • variance of mean wait time
  • III. Measures of load
  • of requests per second.
  • mean length of task queue.

4
Disk-Head Seek Algorithms
  • FCFS disk queue 98, 183, 37, 122, 14, 124, 65,
    67 initial r/w head position 53
  • -------------------------------------
    53 98 183
    ---------gt------------------
  • total head movement 45 75 146
    85 108 110 59 2 640 tracks OK
    for small load, low variance of waiting time
  • Shortest 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
  • Scan 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 1623146523124259 236
    tracks
  • Almost as good as SSTF in mean wait time,
    lower variance.
  • Look Scan, but change direction if no requests
    require tracks farther in current direction.
    Always preferable over scan.
  • Circular 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
  • N-Step ScanTwo 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
Minimize rotational latency
  • I. Assumptions
  • Many fixed heads
  • No delay switching from one head to another
  • read write take the same time
  • variable-sized records
  • II. Policies
  • Shortest latency time first
  • Minimal 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 iscomplicated to deal with new
    requests,
Write a Comment
User Comments (0)
About PowerShow.com