Upload
ethan-jordan
View
216
Download
0
Embed Size (px)
Citation preview
Storage & Peripherals
Disks, Networks, and Other Devices
Typical System
I/O Device Comparison
Device Behavior Data Rate (Mbit/sec)Keyboard Input 0.0001
Mouse Input 0.0038
Graphics Display
Output 800.0 - 8000.0
Network/LAN Input/Output 100.0 - 1000.0
Network/WiFi Input/Output 11.0 – 54.0
Optical Disk Storage 80.0
Magnetic Disk Storage 240.0 – 2560.0
Disk Organization
Platter
Track
Platters
Sectors
Tracks
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
msRPM
rotation
RPM
rotation6.5
)minsec
60/(5400
5.0
5400
5.0
msRPM
rotation
RPM
rotation0.2
)minsec
60/(000,15
5.0
000,15
5.0
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
msmsMB
MBbytes
bytes
RPM
rotms 2.92.0
sec50
10241024
512
minsec60
000,10
5.00.6
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 D1, D2, D3, D4
P = D1 D2 D3 D4
Any 3 and P allows the missing block to be recovered
X1 X2 X1 X2
0 0 1
0 1 0
1 0 0
1 1 1
Parity reference: Parity, http://www.pcguide.com/ref/hdd/perf/raid/concepts/genParity-c.html, Nov. 16, 2005.
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
Parallel ATA(100 MB/sec)
Parallel ATA(100 MB/sec)
(20 MB/sec)
PCI bus(132 MB/sec)
CSA(0.266 GB/sec)
AGP 8X(2.1 GB/sec)
Serial ATA(150 MB/sec)
Disk
Pentium 4processor
1 Gbit Ethernet
Memorycontroller
hub(north bridge)
82875P
MainmemoryDIMMs
DDR 400(3.2 GB/sec)
DDR 400(3.2 GB/sec)
Serial ATA(150 MB/sec)
Disk
AC/97(1 MB/sec)
Stereo(surround-
sound) USB 2.0(60 MB/sec)
. . .
I/Ocontroller
hub(south bridge)
82801EB
Graphicsoutput
(266 MB/sec)
System bus (800 MHz, 604 GB/sec)
CD/DVD
Tape
10/100 Mbit Ethernet