CSE 451
Operating Systems
L21 – Spinning disks & File system abstraction
Slides by: Tom Anderson
Rohan Kadekodi
Magnetic Disk
Magnetic Disk Anatomy
Disk Tracks
Disk Performance
Disk Latency =
Seek Time + Rotation Time + Transfer Time
Seek Time: time to move disk arm over track (1-20ms)
Fine-grained position adjustment necessary for head to “settle”
Head switch time ~ track switch time (on modern disks)
Rotation Time: time to wait for disk to rotate under disk head
Disk rotation: 4 – 15ms (depending on price of disk) On average, only need to wait half a rotation
Transfer Time: time to transfer data onto/off of disk
Disk head transfer rate: 100-250MB/s (5-10 usec/sector)
Host transfer rate dependent on I/O connector (USB, SATA, …)
Western Digital Ultrastar DC HC690
Capacity | 32 TB, 7 platters |
Spin Speed | 7200 RPM |
Sustained Transfer Rate | 270 MB/s (read), 260 MB/s (write) |
Interface Transfer Rate | 1.2 GB/s |
Seek time (avg) | 8 ms (read), 8.6 ms (write) |
Rotational latency (avg) | 4.16 ms |
Cache | 512 MB DRAM |
Idle/Operating Power | 5.8W/9.7W |
Bit Error Rate (read) | 10^-15 |
File Systems
File System Abstraction
File System Abstraction
UNIX File System API
Named Data in a File System
File number = location of inode
inode contains table to find storage for any offset
inode -> disk block
File System Workload
File System Workload
File System Workload
File System Workload
File System Workload
File System Design Constraints
File System Design Options
| FAT | FFS | NTFS |
Index structure | Linked list | Tree (fixed, assym) | Tree (dynamic) |
granularity | block | block | extent |
free space allocation | FAT array | Bitmap (fixed location) | Bitmap (file) |
Locality | defragmentation | Block groups + reserve space | Extents Best fit defrag |
Microsoft File Allocation Table (FAT)
FAT
FAT
Berkeley UNIX FFS (Fast File System)
FFS inode
FFS inode
FFS inode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FFS Asymmetric Tree
FFS Locality
FFS First Fit Block Allocation
FFS First Fit Block Allocation
FFS First Fit Block Allocation
FFS
NTFS