Title: Textbook Ch14'12
1CSS430 Disk Structure/Scheduling Textbook Ch14.1-2
Instructor Munehiro Fukuda These slides were
compiled from the Applied OSC textbook slides
(Silberschatz, Galvin, and Gagne) and the
instructors class materials.
2Review of Disk Structure
- File system interface provides applications with
various system calls and commands such as open,
write, read, seek, etc.. - File system maintains disk space in blocks and
allocates available blocks to each
stream-oriented file. - Basic file system (BIOS) maintains data in
physical blocks - Disk driver reads from and writes to disk in a
unit of block which consists of one (or more)
sector(s). - Disk maintains data locations with drive,
cylinder, track and sector
track
sector
cylinder
3Disk Scheduling
- Disk access time
- Seek time time for the disk arm to move the head
to the cylinder - Rotational latency time for the disk to rotate
the desired sector to the disk head - Disk scheduling
- First-come first-served (FCFS) Scheduling
- Shortest-Seek-Time-First (SSTF) Scheduling
- Scan Scheduling (or Elevator Algorithm)
- Circular Scan (C-Scan) Scheduling
- Look Scheduling
- Circular Look (C-Look) Scheduling
4FCFS Scheduling
- Illustration shows total head movement of 640
cylinders.
5SSTF Scheduling
- Illustration shows total head movement of 236
cylinders.
6Elevator Algorithm (SCAN)
- Illustration shows total head movement of 208
cylinders.
Go all the way to the end and reverse its
direction
7Circular Scan (C-SCAN) Scheduling
- Illustration shows total head movement of 392
cylinders.
The direction is always the same. When reaching
the end, the head restarts From 0.
8LOOK Scheduling
- Illustration shows total head movement of 208
cylinders.
Go only as far as the final request in each
direction and reverse its direction
9Circular Look (C-LOOK) Scheduling
- Illustration shows total head movement of 322
cylinders.
The direction is always the same. When reaching
only as far as the final request in this
direction, the head restarts as far as the
request in the other side.
10Selecting a Disk-Scheduling Algorithm
- One request in a queue
- FCFS, SSTF, SCAN, and LOOK are all the same.
- Many requests in a queue
- SSTF performs best.
- SCAN/CSCAN perform better for the system but
causes a heavy disk movement. - Disk scheduling affected by file allocation
- The position of file blocks, FAT, and
directories. - Default algorithm
- SSTF or LOOK
- Problems in modern disk systems
- Block locations are not disclosed to OS
- Disk scheduling is performed by intelligent
disks. - Why should OS still schedule disks?
11Exercises (No turn-in)
- While modern disk hardware performs disk
scheduling by itself and does not disclose block
locations to OS, why should OS still schedule
disks? - Solve the problem 14.1 on your textbook page 580
- Solve the problem 14.2 on your textbook page 580