Trang 2
Outline • Disks • Data access from disks • Software-based optimizations – Prefetching blocks – Choosing the right block size
Đang tạo bản xem trước...
Outline • Disks • Data access from disks • Software-based optimizations – Prefetching blocks – Choosing the right block size
Focus on: “Typical Disk” Top View … Head assembly Sector Gap Terms: Platter, Head, Cylinder, Track Sector (physical), Block (logical), Gap
Other Delays • CPU time to issue I/O • Contention for controller • Contention for bus, memory “Typical” Value: 0
If we do things right … Time to get = Block Size + Negligible next block t - skip gap - switch track - once in a while, next cylinder
Rule of Random I/O: Expensive Thumb Sequential I/O: Much less • Ex: 1 KB Block » Random I/O: 20 ms. » Sequential I/O: 1 ms.
A Synthetic Example • 3.5 in diameter disk • 3600 RPM • 1 surface • 16 MB usable capacity (16 X 220) • 128 cylinders • seek time: average = 25 ms. adjacent cylinders = 5 ms.
• 1 KB blocks = sectors • 10% overhead between sectors • capacity = 16 MB = (220)16 = 224 bytes • # cylinders = 128 = 27 • bytes/cyl = 224/27 = 217 = 128 KB • blocks/cyl = 128 KB / 1 KB = 128
3600 RPM 60 revolutions / sec 1 rev. = 16.66 msec. One track: ... Time over useful data:(16.66)(0.9)=14.99 ms. Time over gaps: (16.66)(0.1) = 1.66 ms. Transfer time 1 block = 14.99/128=0.117 ms. Trans. time 1 block+gap=16.66/128=0.13ms.
Burst Bandwith 1 KB in 0.117 ms. BB = 1/0.117 = 8.54 KB/ms. or BB =8.54KB/ms x 1000 ms/1sec x 1MB/1024KB = 8540/1024 = 8.33 MB/sec
Hiển thị 20 trang đầu. Tải tài liệu để xem đầy đủ.
Chưa có bình luận nào. Hãy là người đầu tiên!
Bình luận (0)
Chưa có bình luận nào. Hãy là người đầu tiên!