1 / 13

Disk scheduling examples

Disk scheduling examples. Problem parameters:. Disk has 100 cylinders, labeled 0-99. Time to move from cylinder A to cylinder B is a linear function of |A – B| Time to read a block stored at the current cylinder is the same as the time to move one cylinder. Problem statement.

larya
Download Presentation

Disk scheduling examples

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. Disk scheduling examples

  2. Problem parameters: • Disk has 100 cylinders, labeled 0-99. • Time to move from cylinder A to cylinder B is a linear function of |A – B| • Time to read a block stored at the current cylinder is the same as the time to move one cylinder

  3. Problem statement • Assume block requests arrive according to table to the right • Assume, at time 0, the read-write heads are positioned above cylinder 28. • Requests with identical arrival time are listed in FIFO order • Requests with arrival time of 0 are pending when the simulation begins • All times are given in cylinder movement units

  4. FCFS • Assume, when no requests are pending, the R/W heads do not move. • What is the total time to service all requests?

  5. FCFS • Assume, when no requests are pending, the R/W heads do not move. • What is the total time to service all requests? • (28 – 3) + 1 + (16 – 3) + 1 + (58 – 16) + 1 + (98 – 58) + 1+ (98 – 71) + 1 + (71 –12) + 1 + (56 – 12) + 1

  6. FCFS 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 0 26 40 83 124 152

  7. FCFS 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 212 257

  8. Scan • Assume the R/W heads are moving towards cylinder 99 when the simulation begins • What is the total time to service all requests? (58 – 28) + 1 + (98 – 58) +1 + (99–98) + (99 – 16) + 1 + (16 – 12) + 1 + (12 – 0) + (56 – 0) + 1 + (71 – 56) + 1

  9. Scan 0 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 31 72 [101] 157 162

  10. Scan 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 172 231 247

  11. SSTF • Assume the R/W heads continue moving toward cylinder 50 when there is no pending request, and that seek decisions can be changed dynamically • What is the total time to service all requests? (28 – 3) + 1 + (16 – 3) +1 + (58–16) + 1 + (98 – 58) + 1 + (98 – 71) + 1 + (71 – 38) + (56 – 38 ) + 1 + (56 – 12) + 1 = 249

  12. SSTF 13 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 0 27 83 124 152

  13. SSTF 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 C = 38 at 185 38 – 12 = 26 56 – 38 = 18 204 249

More Related