Storage & Peripherals Disks, Networks, and Other Devices
Typical System
I/O Device Comparison DeviceBehaviorData Rate (Mbit/sec) KeyboardInput MouseInput Graphics Display Output Network/LANInput/Output Network/WiFiInput/Output11.0 – 54.0 Optical DiskStorage80.0 Magnetic DiskStorage240.0 –
Disk Organization Professor Tod Amon, Lecture Slides, Southern Utah University, Morgan-Kaufmann, 2005
Disk Architecture Magnetic media : Ferris Oxide coating Rotational speed : 5400 – 15,000 RPM Diameter 1 to 3.5 currently Larger in past Tracks – 10,000 to 50,000 per surface Sectors 100 to 500 per track 512 bytes per sector ZBR (Zone Bit Recording) : evenly space bits Cylinder : same track on each platter
Disk Access Components Seek Time – time to position the read/write heads Rotational Latency – time to wait on data to rotate under the read/write head Transfer Time – time to transfer a block of bits Controller Time : disk controller overhead
Average Rotational Latency Slowest Fastest
Time to Read Disk Suppose 512 byte sector 10,000 RPM Average seek time 6ms Transfer Rate of 50 MB/sec Controller overhead of 0.2ms Average disk time = avg seek time + avg rot lat + trans time + controller time
RAID Redundant Array of Inexpensive Disk Goal: Improve performance and reliability by using an array of many small disks as opposed to a few large expensive disks. Introduces redundancy in data storage
RAID Levels RAID Level 0 No redundancy Striping – writes data across multiple disks Parallel access to data RAID Level 1 Mirroring Writes same data “mirror disks” Requires twice as many disks On disk failure, system just reads backup disk
RAID Levels RAID Level 2 Detecting and Correcting Code Not used today RAID Level 3 Bit-Interleaved Parity Keep only enough redundant data to restore lost data Reads and writes go to all disks in the group, with one extra disk to hold check information Parity – sum of data modulo 2 used
Parity XOR ( ) Operation is useful A B – gives sum A B B = A Recovers A if B and the sum is known Data blocks D 1, D 2, D 3, D 4 P = D 1 D 2 D 3 D 4 Any 3 and P allows the missing block to be recovered X1X1 X2X2 X 1 X Parity reference: Parity, Nov. 16,
RAID Levels RAID Level 4 Block-interleave parity Parity stored as blocks and associated with a set of data blocks One check disk associated with group data disks Allows access to “small reads and writes” RAID 3 read or write access each disk RAID 4 read or write may access a single disk Reads check error detection data stored with each sector
RAID 3 vs. RAID 4 Parity RAID 3 RAID 4
RAID Levels RAID Level 5 Distributed Block- Interleaved Parity Parity disk is bottle neck for RAID 4 RAID Level 5 removes by distributing parity across disk set
RAID Level Summary RAID 1 and RAID 5 widely used in servers “hot swapping” allows disks to be replaced w/o shutting the disk array down standby spares – includes extra disks in system that can be used if disk goes down
I/O Buses Shared communication link (one or more wires) Difficult design: — may be bottleneck — length of the bus — number of devices — tradeoffs (buffers for higher bandwidth increases latency) — support for many different devices — cost
Types of Buses processor-memory (short high speed, custom design) backplane (high speed, often standardized, e.g., PCI) I/O (lengthy, different devices, e.g., USB, Firewire)
Transmission Modes Synchronous vs. Asynchronous Synchronous Uses Clock and a synchronous protocol Fast and small All devices must operate at same rate Bus must be short Asynchronous Does not use a clock Requires a handshaking protocol
Contemporary Bus Standards Comparison of two contemporary buses
Buses – Other Issues Bus Arbitration: daisy chain arbitration (not very fair) centralized arbitration (requires an arbiter), e.g., PCI collision detection, e.g., Ethernet Operating system: Polling Interrupts direct memory access (DMA)
I/O Options