Secondary Storage 9
Total Page:16
File Type:pdf, Size:1020Kb
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. 51Disks 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 52Since 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.