Preview only show first 10 pages with watermark. For full document please download

Secondary Storage

   EMBED


Share

Transcript

Introduction to Computer Architecture Secondary Storage 9. Secondary Storage Secondary Storage refers to storage devices which are generally not solid-state in nature and usually have moving parts. This electro-mechanical characteristic makes them very slow in terms of access time, which is measured in anything from milliseconds (for hard drives) to seconds or minutes (for tape drives). In exchange for this penalty we gain storage capacity. This capacity is achieved not necessarily by high densities of data on each media, but by the removability and replaceability of media, which makes such storage effectively infinite. Also, these media are non-volatile, and are a necessary part of any computer system for long term storage of programs and data. External secondary storage devices are characterized as either serial, such as magnetic tape, or direct access, such as disk drives. The media itself is generally either magnetic (both tape and hard disk drives) or optical (CD-ROMs). We will focus on the various kinds of disk drives for the remainder of this chapter. Magnetic Disks Magnetic disks come in two flavors: ‘floppy’ and ‘hard’ (called ‘fixed’ by IBM). Both types of disks use magnetic media and both are block-oriented devices with a block size of 512 bytes (in the Wintel49 architecture). The magnetic material coats each surface of a circular disk, and information is written and read from this surface using read/write heads much like the read/write heads in an audio tape record but manufactured, of course, to much higher tolerances and specifications. Floppy disks are constructed from mylar, or similar plastic material which provides the support for the ferrous-oxide based magnetic media. Originally these disks were developed for IBM mainframes and were 8 inches in diameter. They were then shrunk to 5.25 inches in the mainframe environment and then adapted to the emerging personal computer market. Both the 8" and 5.25" disks were sealed in a tevlar envelope which protected them somewhat from environmental damage. The envelopes were not rigid, however, and did not protect them from being bent, folded or similar mistreatment. IBM then developed the 3.5 inch floppy disk which used the same support and magnetic media, but was now housed in a hard plastic case. A metal slide which protects the disk when not in use is slid aside when inserted into a disk drive, allowing the read/write heads access to the surface of the media. When in use, the disks spin at a speed of 360rpm and the heads are in contact with the magnetic media when reading or writing is taking place. Floppy disks are removable media. 49 ‘Wintel is a commonly-used contraction of ‘Windows’ and ‘Intel’, the two developers of the most prevalent desktop computer architecture: IBM-compatible personal computers. Compaq, Dell, and Gateway, among others, all manufacture machines to the Wintel specifications. The primary alternative to the Wintel architecture is the Apple architecture which uses Motorola chips and their own Operating System. Comp Arch Text NTC 8/22/04 159 Introduction to Computer Architecture Secondary Storage The common 3.5" floppy disk currently in use holds 1.44 MB of data on the two surfaces of a single disk. Other, proprietary, floppy drives of much higher capacity are available, such as Iomega’s Zip drives which come in 100 MB and 250 MB capacities. Hard Disks use fundamentally the same sort of magnetic media for holding data, but the media coats rigid aluminum disks rather than floppy plastic disks. They also come in a variety of disk diameters, from very large diameter (16") disks used on mainframe systems to disks the size of a quarter which can fit into a laptop’s PCMCIA slot. Note that physical size is not an indication of capacity, as these tiny quarter-sized drives currently can hold over a gigabyte of storage. The hard drives are generally hermetically sealed inside a case to prevent any contaminants from resting on the surfaces. This is due to the fact that when in use the heads do not come in contact with surface of the disks, but ‘float’ aerodynamically just above the surface. They fly so close to the surface, however, and the disk spins so fast50 that any object such as a dust mote or a hair on the surface will cause the head to crash into the surface, destroying any data in its path51. The rotational speed of a hard drive can vary, and has increased as technology has improved. The original speed of a hard disk was 3,600rpm (10 times the speed of a floppy drive). The most common speeds are currently 5,600rpm and 7,200rpm, but there are drives which spin at a speed of 10,000rpm. Unlike floppy disks, hard disk drives generally have more than one ‘platter’ and, hence more than two surfaces. There is a read/write head for each surface, and the number of heads is an important parameter in both the size of the drive and the accessing of data on the drive. Hard disks in mainframes were frequently removable media, but up until recently they were ‘fixed’ in desktop computers. It has recently become fashionable, however, to install hard drives in removable ‘carriers’, or mobile carriers, which can be unplugged from the system and either replaced or be moved to another system. Disk Formats Whether hard or floppy, the data on magnetic media is formatted the same way. Each magnetic surface is divided into a set of concentric rings, called tracks; each track is divided into a number of sectors, each of which generally holds a block of 512 bytes of data. In IBM-compatible systems every track has the same number of sectors. In a disk system with multiple surfaces (heads) a set of tracks that are directly above one another, 50 The relationship between the head and the disk speed and separation could be compared to a 747 flying at 500+mph a few feet off the ground. 51 Disks using this floating head technology are known as Winchester disks after an early code name IBM used during their development. Comp Arch Text NTC 8/22/04 160 Introduction to Computer Architecture Secondary Storage one on each surface, constitute a cylinder. It is usual to specify the number of cylinders a disk or disk drive has rather than the number of tracks. The capacity of a disk or disk drive is then calculated as Disk Capacity = Cylinders x Heads x Sectors/track x Bytes/sector52 Access Times The access time for a magnetic disk is made up of three components. The first is the length of time it takes for the heads to move across the surface of the disk until it is over the desired cylinder; this is known as the seek time of the disk. Once the head has been properly positioned over the cylinder, it must wait while the disk rotates until the sector containing the desired data is under the head; this is known as the latency period. This latency period may be anything from 0 (when the sector happens to be at just the right spot at the end of the seek time) to the time it takes for an entire disk rotation (when the sector has just passed the head at the end of the seek time). On the average, then, the latency period is given as half the time it takes for a single disk rotation. The final component of disk access time is the data transfer time, the time it takes to move the requested data from the disk to the CPU (or memory). Access time = Seek Time + Latency + Data Transfer Time Optical Disks Optical disks use a significantly different technology than do magnetic media, and the details of it will not be covered here. We will point out, instead some significant architectural differences of optical disks with respect to magnetic disks. First, and most important, optical disks have only a single spiral track rather than a set of concentric cylinders. Data is written to a CD by burning ‘pits’ into a polycarbonate base covered with a film of aluminum. Originally, CDs were used for audio applications, but computers adopted CD-ROMs as a relatively cheap way to deliver large amounts of data on relatively cheap media. Especially attractive were the fact that software delivered on a CD took only one disk, where it may take many floppies.53 Reproduction of CDs for mass marketing was also 52 Since neither the number of cylinders or the number of sectors/track is a power of two, the result of this calculation gives a result in English megabytes or gigabytes; that is in terms of 106 or 109 rather than 220 or 230. 53 A floppy disk holds 1.44 MB of data, while a CD-ROM holds about 700 MB of data. Thus a single CD could, potentially, replace over 480 floppy disks! Comp Arch Text NTC 8/22/04 161 Introduction to Computer Architecture Secondary Storage cheaper than floppies since they could be stamped out much like vinyl LP records. Furthermore, at the time of original introduction of CD-ROMs, the technology to make copies of CDs was extremely expensive; it was hoped that software piracy would be eliminated by delivering programs on CD instead of magnetic media. Of course, it wasn’t long before technology solved the problem of recording to optical media. The first recordable optical disks were called CD-R, standing for Compact Disk Recordable. The earliest disks, however, could only be recorded on a single time. This technology was followed by CD-RW (Compact Disk - ReWriteable) disks, which could be erased and rewritten. Unfortunately, this technology was not backwards compatible with many existing CD drives - only so-called multiread CD drives could be counted upon to be able to read CD-RW discs as well as CD-R discs. Even then, the ability to read either a CD-R or CD-RW data disk (as opposed to audio, for which the standard was universal) depended on the software used to write the disk. For instance, all CD drives could read disks created with Roxio’s Easy CD Creator, but not all drives could read data disks created with Roxio’s DirectCD54. Not all CDs spin at a constant rate. There are two data recording techniques: Constant Linear Velocity (CLV) implies that when the read head (laser) is at the outside of the disk, the disk spins faster than when the inner portions of the track are being read, providing a constant data transfer rate. Constant Angular Velocity (CAV) recording means that the disk spins at a constant speed regardless where the read head is located, so that data transfer rates will vary. CAV is the most common type of drive available. CD specifications are commonly given as 1x, 2x, 48x, etc. These refer to multiples of a base data transfer speed of 150KBps, and specify the maximum data transfer speed (when reading the outer edge of the disk). Thus, a 24x drive, the maximum data transfer rate is 24 x 150KBps = 3600KBps.55 Digital Versatile Disks (DVD) were originally intended as a video medium56 just as CDs were originally intended as an audio medium. DVD-ROMs (like CD-ROMs) are intended for data storage as a replacement for CDs. Unfortunately, there are a number of competing standards which are not necessarily compatible (readable in all DVD-ROM drives.) 54 Easy CD Creator created an entire disk at once. DirectCD allowed you to use a CD-R or CDRW as you would a floppy drive, using Drag-and-Drop techniques to add (or remove) data from the disk as necessary. Not that these software packages were owned by Adaptac before Roxio. 55 Note that the maximum rated speed of a disk is rarely achieved since CDs are written starting at the center of the disc, and there is rarely so much data recorded on a disc that the head moves to the edges of the disc. 56 ‘DVD’ originally stood for Digital Video Disk Comp Arch Text NTC 8/22/04 162 Introduction to Computer Architecture Secondary Storage DVD capacity varies as technology improves, but most DVDs store on the order of 4.7GB of digital information. There are also 8.5GB, 9.4GB, and 17GB dual-layer disks available. The standard data transfer rate is 1.3MBps and they use the same interfaces as CD-ROMs. DVD standards are unsettled at the present time, reminiscent of the Beta/VHS wars of the early days of VCRs. These standards include DVD-RAM, DVD±R, and DVD±RW System Interfaces Many methods for connecting disk drives to the CPU have been developed over the years. Floppy Drive Interface Floppy disks connect to the motherboard using a flat ribbon cable containing 34 wires. The cable may have one or two drive connectors (in addition to the motherboard connector) so that up to two drives, a: and b:, can be connected on the same cable. The drives are differentiated sometimes with a jumper setting on the back of the drive, but more usually by a ‘twist’ in the cable between the two drive connectors which switches the letter of the drive at the end of the cable from b: to a: Hard Drive Interfaces Physically, there are currently two hardware mechanisms for connecting hard drives to a computer system. 1. 2. SCSI - The Small Computer System Interface is a general-purpose (not just disk drives) standard for connecting high-performance devices to a computer system. See the I/O chapter for more detail on the SCSI interface. IDE - The Integrated Drive Electronics interface is the standard interface for connecting hard drives to a computer system. This standard places all the electronics for supporting a hard drive interface on the drive itself, thereby minimizing the distance between the electronics and the drive itself. This provides a higher level of performance and reliability than previous standards were capable of. The physical interface to the motherboard of a PC is a stripped down ISA interface in a 40 pin flat cable. The IDE interface has various varieties, the most common now being ATA (AT Attachment) which has gone through some evolution in terms of performance, the latest being ATA/66. Comp Arch Text 163 NTC 8/22/04 Introduction to Computer Architecture Secondary Storage Optical Drive Interfaces Optical drives can connect to the system using the same physical interfaces (SCSI and IDE) as do hard drives. It is known as ATAPI (ATA Packet Interface) but for all practical purposes an ATAPI CD-ROM is an IDE CD-ROM. RAID RAID stands for ‘Redundant Array of Inexpensive Disks’57, and the primary purpose of a RAID memory system is reliability. This is provided by writing critical data to multiple disks instead of just a single disk, so that a disk failure will not cause loss of data. This distribution of data is called ‘striping’. There are a number of ways in which the data may be written to the disks (that is, distributed across multiple disks) in order to achieve the desired reliability. These are categorized into levels as follows, with reliability increasing with the level numbers: RAID Level 0 The multiple drives are treated as a single logical drive (or volume). No recovery mechanisms are employed; that is, there is no reliability at all, beyond the inherent reliability of each drive. RAID Level 1 Known as Mirroring, data is simply written to two independent drives simultaneously. If one fails, the data is still available on the second drive. RAID Level 2 Bit Interleaving. That is, each bit of a word is written to a separate drive, including an additional parity bit on each byte. RAID Level 3 Byte Interleaving. Each byte of a word is written to a separate drive, with an additional drive dedicated to the parity bits. RAID Level 4 Block Interleaving. Again, parity is stored on a separate drive. RAID Level 5 Data, including error-correction coding, is striped across all drives. This is the most powerful form of RAID. The various levels of RAID differ not only in level of reliability and cost, but also in performance. For instance, RAID levels 0, 4, or 5 are used where there is a high I/O request rate (many different transactions) while RAID levels 0, 2, and 3 are more appropriate for applications requiring a high data transfer rate. 57 Since the disks were, originally, not all that inexpensive, RAID is frequently known as a ‘Redundant Array of Independent Disks’ instead. Nowadays, the disk are, in fact, quite inexpensive. Comp Arch Text NTC 8/22/04 164 Introduction to Computer Architecture Secondary Storage Review Questions 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. What material is used to contain the data on a hard drive? What material is used to contain the data on a floppy drive? What material is used to contain the data on an optical drive? What material is used to as a base to support the material which contains the data on a floppy drive? What material is used to as a base to support the material which contains the data on a hard drive? What material is used to as a base to support the material which contains the data on an optical drive? What physical sizes have floppy disks come in? What is the rotational speed of a floppy disk? What is a common rotational speed of a hard drive? Consider a hard drive with 1000 cylinders, 26 sectors/track and six heads. What is the capacity of the drive? What are the three components of disk access time? What is the average Latency time for a hard drive spinning at 7200rpm? What interface connects a hard drive to a motherboard? Which kinds of CD are writeable? Which kinds of CD are readable in all CD drives? What is the capacity of a CD? A DVD? Which CD standard has a constant data transfer rate? What is the maximum possible data transfer rate for a CAV CD rated at 32x? What two mechanisms are used to distinguish floppy drive a: from drive b:? What is the IDE interface used for? The ATAPI interface? What is meant by ‘mirroring’ in RAID? What is meant by ‘striping’? Which RAID level uses Error Correcting Codes? Comp Arch Text NTC 8/22/04 165