CS162 Notes 3/14/2007 I/O Devices + Devices : Hard Disks (continued from previous lectures) Typical drives come in 5.25", 3.5", 2.5", 1.8", and 1" models + Today most physical disks are made of aluminum with a magnetic coating. If the read heads hits the surface the drive is destroyed. + Common Drive Characteristics 3,600 - 15,000 rpm (3600 rpm was common when disk drives ran off of AC power.) Rotational speed is limited by centripetal force: (mass x velocity^2) / radius. If spun too fast, the disk can fly apart. In the olden days, high-speed disks were shielded with bullet-proof glass. Power consumption and noise increase as the square of rotational speed. Surface density approaches 133 GB per square inch. 1 - 16 MB cache buffers. 650 MB/s max instantaneous transfer from disk into buffer; the interconnect bus of the system limits the transfer rate off of the disk. Sector size is 512 Kilobytes. In the olden days the data was addressed by . Today data is addressed linearly in by block number (0 - max). Tracks are written at different speeds since inner tracks are smaller than outer tracks. You can increase density by 30-50% by having variable-length tracks. Software in the disk remembers how many bits exist per track. Desktop drives consume 5 - 10 Watts of power when running and 0.5 Watts when in standby. Most drives have several operational modes, e.g., the arm does not move but the disk spins; the arm and disk are inactive but the electronics are on; etc... 22-36 dB of noise while operational. + Reliability 1 recoverable error in 10^12 bits. 1 unrecoverable error in 10^16 bits. Disks add error correction and information for remapping bad sectors. Some fraction of disk space is used as spare space. The disk tests each sector before writing; if the sector is bad then a flash or EEPROM memory remaps the bad sector to a new location on disk. You can remap the entire track, have spare sectors at end of track or cylinder, or renumber good sectors to keep them all sequential. Traditional disks used to have a 50,000 hour mean time to failure (MTTF) but today it's between 300,000 and 1 million hours: "If you believe that I have a bridge to sell you" - Prof. Smith. No one actually tests disk drives for 1 million hours (that's roughly 114 years). Actual reliability isn't as high. Reliability used to be infinite because only a few physically large disks were in use. Now many more disks are used so failure is common. Laptop disk drives also undergo start-stop cycles to conserve power. + Seek times Average seek time is 2 - 5 ms (calculated for seeks across only 1/3 of the disk). Track-to-track seek time is 0.3 - 2 ms. Outer-most to inner-most track seek time is 8 - 24 ms. During a seek, the arm has to stop, read the track number, and start again many times to find the correct track. + 5.25" disks are being phased out. Larger disks require the arm to move farther and their rotational speeds are constrained by physics. + 3.5" disks currently store up to 750 GB. + 2.5" disks currently store up to 250 GB. + 1.8" disks are the kind found in iPods and portable devices; 1" drives are used in PC Cards. There are lots of disk interfaces we won't talk about -- you'll see SCSI, SCSI2, ultra SCSI, IDE, etc... Interfaces from 5-8 years ago are different than those available today. Example: Toshiba 1.8" drive from 2001 Up to 10 GB of storage. Two platters with four heads. 41,000 tracks per inch, 21 million bits per sq. inch. Bits on a track are 12 times closer together than are the tracks to one another. 4000 rpm. 100 MB/s maximum transfer. 1 MB cache. Operates at 3.3 - 5 volts (power consumption increases as the square of voltage). Multiple power-down modes. Able to withstand 150 Gs when operational and 1000 Gs when off. You don't need to memorize numbers but should have a good idea of the parameters. You need to know the basic numbers to know what the tradeoffs are when designing systems. Operating systems talk to hardware and incorporate all of this information so you need to have an integrated view to make sense of things. Historical Trends + The RAMAC became available in 1956 with a capacity of 5 MB and weighed 1 ton. (It could have had more capacity but marketing didn't think people would need so much space.) Consisted of 24" disks manually painted with iron oxide. + Density typically increased at 35% per year. Today the rate is about 40%. + Compatibility is a theme. When selling a new I/O device it helps if the device can talk to existing systems. Servers Server disks are faster (15,000 rpm) and typically have less capacity. Servers are limited by the number of simultaneous data streams they send out: 1 drive = 1 stream, so parallel I/Os require having many drives. Because servers use a large number of drives, storage is abundant despite each drive having a lower capacity. + Devices : Solid State Storage Wouldn't it be nice to have a disk as fast a memory? In the past you couldn't just buy memory since the OS did know how to address memory as disk. Instead, you put in a "DRAM" disk that the OS treats as a hard drive. + 268 MB - 3.2 GB memory disks were available for a time. + EMC shipped disk arrays with 30GB of cache 5 years ago; today it's probably 200-300 GB. + Devices : Drums Rotates | | ------- | <- ------ represent tracks | ------- | <- <- represent read heads | ------- | <- | ------- | <- | ------- | <- | ------- | <- | Became available in the 1970's. The goal was to eliminate seek time. Twice as fast as traditional hard disks because they have 1 head per track and the heads don't move. Very expensive; the number of tracks is limited by how many heads can fit on the arm. State-of the art was 28 MB of storage initially; later increased to about 100 MB. Used mainly for paging. + Devices : Optical Disks (CD) + Common Disk Characteristics 644 MB formatted capacity; about1 GB unformatted capacity. 95 ms average seek times; max seek time is 200ms. Rotates at 2400 rpm. 6.8 MB/sec maximum transfer rate. 18,000 tracks per surface. 1 unrecoverable error in 10^14 bits. 1x = 105 KB/sec transfer rate The fastest a disk can be spun is 12x. Drives that can read faster than 12x read multiple tracks simultaneously. + Common Drive Characteristics Traditional drives use a constant linear velocity to read along a track. Recent drives use a constant angular velocity so data rate varies by which part of the disk is read. This is corrected via electronics. RW drives heat the disk to a special temperature to change its material to a default state and use another temperature to write to it. Retail disks are physically pressed but consumer disks use phase-change technology. + Magneto-optical drives use polarized light to read the medium. The magnetic field on the disk's surface affects the polarization of the reading laser. Writes are done using a strong laser that polarizes the disk's surface. A very hot laser can erase the disk because at high temperatures the surface's magnetic field takes the shape of the surrounding field. + Devices : DVD A Standard DVD has a capacity of 4.5 GB. The bits are smaller than in a CD and you can double the capacity by writing to two sides or using two layers that are transparent at different focal lengths. For 18GB you can have dual layer double-sided DVDs. CDs and DVDs use red lasers that can't focus on "pretty much" anything smaller than the red wavelength. In the semiconductor world, those lasers can write features smaller than their wavelengths using diffraction effects. + Common Disk Characteristics DVDs use 650 nm light with a 1.23 micron spot size. 10 MB/sec maximum transfer rate. BluRay allows 25 GB per layer and has 2 layers. Spots size is 0.58 microns and light is 405nm. HD-DVD disks allow 15 GB per layer. HD-DVD and BluRay use blue or green wavelengths. There is a 5 - 25 ms overhead to access a block on disk - around 3,000 to 25,000 instructions. Seek time is 2 - 12 ms. Rotational delay is 2 - 8 ms. Total time before actual data transfer begins is 5 - 25 ms, so you need to store data in large blocks to make accesses efficient. + Device Interconnections + For small systems the CPU connects to a disk through a bus connected to a cable connected to a disk. + In mainframes +-----------+ +-----------+ +--------------+ +-----------+ +-----------+ | CPU | --> | Channel | --> | Storage Ctrl | --> |String Ctrl| --> | DISK | +-----------+ +-----------+ \ +--------------+ \ +-----------+ \ +-----------+ Channels could talk to many storage controllers. Several disks shared a string controller, which contained the disk electronics, because electronics were expensive. Today the devices interconnect in a network, rather than tree, fashion. + Devices : NAS and SAN + Networked-Attached Storage (NAS) is used for systems with large storage requirements. Typically attached to a LAN via Ethernet and provides a file interface. + Storage-Area Network (SAN) is a self-contained network of disk drives with a fiber-optic interface. Data in the network is addressed by block number as in a regular disk drive. + The storage networking industry association (SNIA) enforces standardized interfaces. + Storage Service Providers + Provide networked disk space for clients. + Used to be very expensive but are now largely free. + Devices : Data Cells Tape is pretty dense, so why not make a random access tape drive? Strips of tape are automatically removed from a cartridge and wrapped around a drum.