OSTEP Chapter 37

ECE 3600, Fall 2022


Table of Contents


1. Hard Disk Drive Geometry

Tracks and Sectors


Seek, Rotation, Transfer - request for sector 11:


2. Skew for Faster Sequential Access


3. Example Specifications

Cheetah Average Timings for 4 KB read:

Tseek = 4 msec

Trotation = (max rotation)/2 = (1/15000 min/Rot * 60 sec/min * 1000 msec/sec)/2 = 2 msec

Ttransfer = 1/125 sec/MB * 1/1024 MB/KB * 4 KB * 1000000 usec/sec = 31.25 usec


4. Disk Scheduling

shortest seek time first (SSTF):

Requests for sectors 2 and 21:
  get 21 first, then 2

     
Requests for sectors 8 and 16:
  get 16 first, then 8
  but 8 first, then 16, may be faster

Consider seek + rotate times --> shortest access time first (SATF)


5. Exercises

If disk.py fails with error "ImportError: No module named Tkinter": sudo apt install -y python-tk
or just comment out the line: from Tkinter import * and don't use the graphics -G option

Exercises from the book using disk.py:

Defaults: Seek time = 40 per track, Rotate time = 30 per sector

$ python ./disk.py -a 7,30,8 -c -p FIFO

REQUESTS [7, 30, 8]

Block:   7  Seek:  0  Rotate: 15  Transfer: 30  Total:  45
Block:  30  Seek: 80  Rotate:220  Transfer: 30  Total: 330
Block:   8  Seek: 80  Rotate:310  Transfer: 30  Total: 420

TOTALS      Seek:160  Rotate:545  Transfer: 90  Total: 795

$ python ./disk.py -a 7,30,8 -c -p SATF

REQUESTS [7, 30, 8]

Block:   7  Seek:  0  Rotate: 15  Transfer: 30  Total:  45
Block:   8  Seek:  0  Rotate:  0  Transfer: 30  Total:  30
Block:  30  Seek: 80  Rotate:190  Transfer: 30  Total: 300

TOTALS      Seek: 80  Rotate:205  Transfer: 90  Total: 375
     

6. Homework Example

Seek time = 20 per track, Rotate time = 30 per sector

Scheduler Policy: SATF

For the following requests determine the block order and seek/rotate times:

REQUESTS [10, 11, 10, 14, 9, 12]
Block SeekRotate

     

ans