General approaches to speed up access to data stored on disks  

  • Techniques (and tricks) to speed up disk access operations:

    1. Placement (opportunistic)

    2. Striping (space/parallellism)

    3. Scheduling (opportunistic - analogy: elevator)

    4. Pre-fetching (time-overlap/parallellism)


  • We will briefly discuss each technique in this webpage

  Placement of sectors  

  • A disk block is the unit of a disk access operation

    • A read/write operation to disk will read/write 1 disk block

  • A disk block consists of N sectors

  • Placement of sectors in a disk block:

    • On same track
    • Sectors phyically follows each other on track

  • Reading/writing the first sector of a disk block is typically slow due to:

    • High seek time
    • High rotational delay

  • Reading/writing subsequent sectors of a disk block is fast because:

    • 0 msec seek time
    • Low rotational delay

  Striping: spread a file blocks over multiple disks  

  • Non-striped and striped storage strategy:

    Striping:

    • The disk blocks of data files are spread over all disks

  Striping: spread a file blocks over multiple disks  

  • How striping can reduce access time to data stored in a file:

    Access time is reduced because:

    • Multiple independent disk heads can seek in parallel to different blocks of the data file

    • Multiple transfer channels can transfer data in parallel

  Commonly used scheduling discipline: First Come First Server (FCFS)  

  • FIFC: the requests are served in the order they were received

  Strength and weakness of the First Come First Server (FCFS) scheduling  

  • Strength of First Come, First Serve:

    • Fairness !!!

  • Weakness of First Come, First Serve:

    • Inefficient !!! (e.g. zig-zag access pattern)

    Example:

    • Request 1: accesses data stored on track 1
    • Request 2: accesses data stored on track 1001          
    • Request 3: accesses data stored on track 2
    • Request 4: accesses data stored on track 1002
    • and so on...

    The disk head will move across 1000 + 999 + 1000 = 2999 tracks !!!!!

    • Because seek time is very long for a disk, moving across 2999 tracks is very time consuming

  Efficient Disk Scheduling Algorithm:   the Elevator Algorithm  

  • Operation of an idle elevator:

    • When someone on floor k presses the elevator request button:

      • Make a request to stop at floor k

      • Move to floor k

  • Operation of an active elevator:

    • When someone on floor k presses the elevator request button:

      • Add a request to stop at floor k


    • When the elevator arrives on floor k:

      • All requests for floor k are serviced before moving to next floor!