A major inconvenience of semiconductor memories is that they are volatile and loose data when the power is switched off. Flash EEPROM is non-volatile, but is too expensive for large-scale use. Moreover, EEPROM has a long write cycle; that is you can read the memory exactly like any other fast static RAM, but it takes much longer to modify the contents of a memory cell. Memories that use the magnetic properties of certain materials to store data are non-volatile, because once a material has been magnetized, the magnetization remains until it is either demagnetized or remagnetized. The underlying principle behind magnetic recording is very simple—tiny regions of a magnetic material are magnetized either North-South or South-North to store one of two binary states. Serial access memory systems employing a magnetic recording technique store data by magnetizing a substance deposited on a substrate (either a plastic disk, a rigid aluminum platter, or long ribbon of tape).
The floppy disk drive is a low-cost serial access device designed to transfer programs and data from the vendor to the end-user, or from one computer to another. Over the years, floppy-disk drives have been manufactured in a wide variety of formats: 8”, 5 ¼”, 3 ½“, and 3”. Today, the most popular version is the 3 ½” drive that stores about 1.44 Mbytes of data. By using data compression techniques, programs up to about 4Mbyes can often be squeezed on a single floppy. 3 ½” diskettes are now so cheap that magazines use them to distribute software to their readers. The storage capacity of a floppy disk was once sufficient for most purposes—when very few programs were longer than about 400 Kbytes and data files were relatively small. Floppy disks are becoming less and less well suited to the transfer of data—anyone who has installed a program from 20 or more floppy disks will appreciate what we mean. By the mid 1990’s many software houses were distributing there programs on CDs, rather than floppy disks.
The great advantage of the floppy disk drive is that it is very cheap and the floppy disk itself costs only a few cents. Unfortunately, the floppy disk drive reads and writes data relatively slowly and it is therefore suited only to the transfer programs and data between machines, or to the archiving of data.
| Structure of the floppy disk drive |
A plastic disk coated with a magnetic material rotates at 360 rpm under a read/write head. The read/write head is, essentially, a ring of a magnetic material with a tiny gap in it. When a current is passed through a coil of fine wire is wound around the ring, a magnetic flux is set up in the ring. The flux flows round the ring until it comes to the gap, where it spills out into the surrounding space.
The magnetic flux from the gap in the read/write head magnetizes the surface of the disk along a circular path called a track. By changing the direction of the current in the coil, the surface of the disk can be magnetized in tiny regions that are aligned either north-south or south-north.
When data is retrieved from the disk, the moving magnetized surface of the disk induces a magnetic flux (i.e., field) in the read/write head. In turn, this flux causes a current to flow in the coil. Electronic circuits in the disk drive convert the current into the original digital data.
Each of the concentric tracks around a disk is divided into sectors that constitute the basic unit of information stored on a disk—a sector is the minimum amount of data that can be written to or read from a diskette. Figure 3.7 shows the logical structure of a typical disk. A 3 ½” diskette has 80 tracks, on each of its two sides, and each track contains eighteen 512-byte sectors. The total quantity of data that can be stored on a diskette is given by: number of sides x number of tracks per surface x number of sectors per track x number of bytes per sector. A high density 3 ½ diskette can store 2 x 80 x 18 x 512 = 1,474,560 Mbytes of data.
![]() |
The structure of a disk |
The tracks and sectors on a disk are not laid down physically when the disk is manufactured. Sectors are data structures that are written to the disk in an operation called formatting. Before a disk can be used, it must be formatted and the sectors are written to the disk. Each sector includes a header that contains its address (i.e., the track number and sector number) and a data block (typically 256, 512, or 1024 bytes). We describe the structure of sectors in more detail later. When data is later written to the disk, the sectors are read until the required sector has been located, and then the data is written into the sector.
Disk drives rotate at 360 rpm (i.e., 166.7ms/revolution), which is relatively slow in comparison with hard disks that rotate at 3,600 rpm or more. Two important parameters characterize a disk drive: its latency and seek time. When the disk is accessed, the read/write head has to step from its current position to the track to be accessed. If a disk has n tracks, the average number of tracks stepped past per access is n/3. Assuming it takes tstep seconds to step one track, the average seek time for a disk is n/3 x tstep. Once a track has been located, the read/write head has to wait until the desired sector moves under the head. The average waiting time is called the latency and is equal to one half of a revolution, ½ trev. The average access time for a disk drive is therefore:
n/3 x tstep + ½ trev.
The hard disk stores programs and data that are not currently in the system’s immediate access store. In principle there’s no difference between a hard disk drive and a floppy disk drive. The hard disk drive is a sealed unit built to a much higher precision than a floppy disk drive. The rotating platter coated is rigid and rotates at 3,600 rpm or 7,200 rpm (or even more). Typical hard disk drives hold 500 Mbytes to over 9 Gbytes of data; average seek times are about 8ms, and data can be transferred at over 10 Mbits/s. Figure 3.8 describes the construction of a hard disk drive.
The read/write head is not in contact with the surface of the rotating disk—it hovers a few millionths of an inch above the disk’s surface. Hard disk drives employ multiple platters on the same spindle. Each platter has its own read/write heads (one for the upper surface and one for the lower surface).
| The hard disk drive |
As we said earlier, the disk drive is a serial access device because the time taken to access data depends on where the data is located on the surface of the disk. Some texts refer to the disk drive as a random access device because you can access a given sector without reading all sectors one by one until you find the desired sector. This use of the term “random access” arises because programmers often wish to emphasize the difference between a disk drive and a tape drive.
If you look at the specification of a typical personal computer, PC, you will see that some disks are described as IDE and some as SCSI. IDE means integrated drive electronics and SCSI means small computer systems interface. Both IDE and SCSI refer to the electrical interface between the computer system and the disc drive, and are not related to how the disk stores information.
The last 1980’s and ‘90’s has witnessed immense progress in the field of semiconductor technology; chips are much faster than they once were and contain many more transistors. Disk storage technology has made corresponding advances over the same period. In the early 1980’s a PC’s hard disk might have had a capacity of 5 Mbytes and an access time of 80 ms. Today, a capacity of 9 Gbytes and an access time of 8 ms is not unusual.
The performance of hard disk drives has been improved by technological changes on several fronts. The magnetic material once used to coat the moving platter of a hard disk was gamma ferric oxide in a plastic binder. Hard disks are now coated with a thin film of a pure magnetic material that is sputtered onto the aluminum platter (sputtering involves vaporizing the material in a vacuum and spraying it on the surface). Magnetic films can achieve a much higher density in terms of bits/inch. The mechanism by which the head is located over a track has also been improved. Some large capacity hard disk drives even periodically recalibrate the track-seeking mechanism to allow for thermal expansion as the system warm up. Another way of increasing the capacity of hard disks is by means vertical recording in which the surface of the disk is magnetized vertically rather than horizontally.
One of the most significant developments of the late 1980’s was the compact disk or CD. The audio CD stores analog signals in digital form and provides over 70 minutes of high quality sound. Figure 3.7 illustrates the structure of a CD drive (there’s virtually no difference between the domestic CD player and the CD ROM). Data is stored as a pattern of tiny dots that can be read by means of a laser—the laser beam is either reflected or not reflected back from the surface. A laser is used to read the data because its light is coherent and can be focused to a tiny point. Unlike the disk drive that stores data along concentric tracks, the data on a CD is written along the surface of a single continuous spiral. Optical storage technology has considerable advantages over magnetic storage systems. The CD itself is very robust and is little affected by heat, magnetic fields and dust. Optical storage technology has given us low-cost CD drives and CD ROMs that store over 600 Mbytes of data for a few cents. Unfortunately, the CD’s access time is very much longer than that of a hard disk.
By the early 1990’s CD’s were widely used to transfer large amounts of data between computers. Large programs like CorelDraw were supplied on CD to greatly reduce the time taken to install the program on hard disk. CDs soon became associated with multimedia and the storage of very large quantities of data at low cost (e.g., manuals, encyclopedias, images etc.).
CDs are manufactured by a high technology process and are suitable only for applications that generate a lot of sales. Writable CDs are available but they are have relatively long write times and are not as cheap as magnetic media. In the mid 1990’s some of the larger magneto-optical storage systems cost more than an entire PC itself. A typical rewritable optical disk drive system is the Optistore 1300HS, that has a storage capacity of up to 1.3 Gbytes using double-sided media (654 Mbytes/side). Its parameters are:
Average random seek time 19.8 ms
Maximum seek time 39.6 ms
Track-to-track time 0.35 ms
Average latency 8.9 ms
Rotation speed (1.3 Gbyte disk) 3375 rpm
Data transfer rate (1.3 Gbyte disk) 23.95 Mbits/s
| The CD ROM drive |
In principal the magnetic tape drive operates exactly like a disk drive. The major difference is that data is recorded on a long ribbon of tape, rather than around concentric tracks on a disk. The tape drive is very slow in comparison with all other methods of data storage—only mediaeval monks who prepared illuminated manuscripts were slower than magnetic tape. The advantage of magnetic tape is its very low cost; it is used to archive data by taking a backup copy and storing it in a safe place as insurance against accidents. Tape drives are large and expensive data back up systems found almost exclusively in computer centers. The successor to the tape drive is the low-cost cartridge drive mechanism that uses a tape cartridge to store about 500 Mbytes of data. The tape cartridge looks like the audio tape cassette and employs a similar technology.
During the late 1980’s the technology of the VCR (video cassette recorder) was applied to magnetic cartridge drives. The VCR employs a tape whose effective length is many times longer than its actual length, because the video track is recorded as a series of parallel diagonal stripes. The mechanism used to record data is called helical scan technology because the recording head rotates and traces out a helix. Figure 3.10 illustrates the principle of helical scan recording. Helical scan technology is now used in DAT (digital audio tape) systems has been applied to digital data storage. DAT recording systems are used to archive large amounts of data (e.g., 2 Gbytes).
Since the way in which data is stored on both hard and floppy disks has a profound effect on all aspects of the computer (e.g., operating system design, system performance), we are going to look at how data is organized on disks.
![]() |
Helical scan recording |
Although there are an almost infinite number of ways in which digital data may be arranged (i.e., organized or formatted) on a diskette, there are only two highly standardized ways of formatting the data. These have both been developed by IBM and are referred to as IBM 3740-compatible single-density recording, and IBM System 34-compatible double-density recording. The standardization of recording formats is good because the proliferation of ad hoc formats doesn’t benefit computing. From the end user's point of view, the free exchange of software between computers is highly beneficial. However, some software distributors liked non-standard formats because they made for people to copy their software illegally. Similarly, non-standard disk formats forces the user of such equipment to remain dependent on one or two suppliers.
Floppy disks are soft-sectored because the beginning of a sector is identified by a code written onto the disk rather than by a physical tag such as a hole in the disk. It is best to think of a soft-sector as a vehicle or data structure for transporting data. Disks must first be formatted before they can be used to store data. Formatting a disk consists of writing a series of sector headers followed by empty data fields that can later be filled with data as required.
Figure 3.11 describes how a track is formatted with 512 bytes of data per sector. A track consists of an index gap, and a sequence of sectors beginning with sector one. There are four types of gap along a track (a gap is just a filler or buffer that carries no useful data). Because the disk drive is an electromechanical system it is impossible to determine exactly where the various fields of a track start and finish. Gaps provide a safety margin between the various fields of the sectors. We now look at the structure of a sector in more detail.
![]() |
The structure of a soft-sectored disk |
The beginning of a track is indicated by a special byte called an index address mark. How do you create a “special” marker to indicate the start of a track without limiting what you can store in the data field of a sector? All 256 possible values of an 8-bit MFM-encoded byte are legal data values, so you can’t use, say, 01010101 as a marker because you might want to store the same binary value in a sector. The solution to this dilemma is ingenious. The bits stored on a floppy disk are first encoded by means of a technique called MFM (modified frequency modulation). Suppose you deliberately encode a byte incorrectly so that it is not a valid MFM-encoded byte. The index address mark is such a byte and can easily be detected electronically.
Each sector consists of an identity field, ID, that provides the sector with an address, and a data field. The ID field is seven bytes long and begins with a unique ID address mark (another illegal bit pattern). The other six bytes of the ID field are: the track number, the side number (0 or 1), the sector address, the sector length code, and a two-byte cyclic redundancy code (CRC). The CRC is calculated by treating the bits recorded as a long number and then dividing them by number called a generator. The remainder of the division is the CRC. The 16-bit CRC provides a powerful method of detecting an error in the sector's ID field.
The beginning of the data field itself is denoted by one of two special markers: a data address mark or a deleted data address mark. Following the data address mark are 512 bytes of user data, terminated by a 16-bit CRC to protect the data field from error. The data field is bracketed by two gaps, whose purpose is to provide time for the circuits in the disk controller to turn write a new data field and then turn off before the next sector is encountered.
The floppy disk controller, FDC, is a single chip, that provides an interface between the microprocessor and the disk drive itself. The FDC saves the computer systems designer a considerable quantity of software and hardware. Hardware is saved because the FDC converts 8-bit parallel data from the host microprocessor into the MFM-encoded serial form required by the floppy disk drive, and because it converts the serial data read from the disk drive into the parallel form required by the host computer. The FDC also reduces the amount of system software required within the operating system, because it carries out operations such as reading a track number from the disk and comparing the number with the contents of its own track register.
The role of the FDC in a disk system is illustrated in figure 3.12. Conceptually, the host microcomputer in figure 3.12 is organized hierarchically, with the operating system at the top of the diagram and the physical connection to the disk drive at the bottom. Although the disk drive itself can be considered to have a similar but simpler internal organization, it is bought as a complete unit. The designer normally knows little of its internal arrangement; largely because disk drives are highly standardized and employ a standard connection (i.e., plug and socket) between themselves and the host microcomputer.
![]() |
The floppy disc controller and the computer |
At the microcomputer end of the disk interface, the operating system carries out the applications-oriented transactions such as: create or delete a file, list the contents of a disk's directory, or update a file. The disk file manager, DFM, in the operating system is concerned with the physical organization of files on the disks and is responsible for carrying out the actions requested by the operating system. For example, when the operating system wishes to create a file named ABC.123, the DFM has to find room for the file on the disk and then has to update the directory by putting ABC.123 in the directory of files.
The software primitives in figure 3.12 represent the lowest level of software operations that can be carried out by the system. These primitives are used by the DFM to perform basic operations such as the actual reading or writing of a sector on the disk. At this level, certain error recovery actions may be built in. Suppose the DFM calls a software primitive in order to read a sector of a particular file. If a read error occurs, the primitive may make, say, five attempts at reading the file before reporting an error to the DFM.
The floppy disk controller of figure 3.12 is part of the hardware and is used by the software primitives. The FDC is responsible for moving the read/write head in the disk drive to the appropriate track, and for translating the format of the data between that used by the microprocessor for storage in memory and that required by the disk drive for recording on the disk.
At the lowest level in figure 3.12 is the electrical interface that matches the signals from the FDC to those from the disk drive unit.
Up to now, we have considered only the structure of information stored on disk at the track and sector level. The large scale structure of information on disks belongs to the realm of operating systems—to be described in chapter 10. However, now that we have got so far, it would be churlish to end without saying something about files.
There are many ways of organizing files on disk and each method has its own peculiar advantages and disadvantages. Conceptually, we can imagine that a disk file system might require three data structures: a list of the sectors available for use by the filing system (i.e., the free sectors) a directory or catalogue of files, and the files themselves.
A simple method of dealing with the allocation of sectors to files is to provide a bit-map of free sectors (usually in track 0, sector 1). Each bit of the bit-map represents one of the sectors on the disk and is 0 to indicate a free sector, and 1 to indicate an allocated sector. Free means that the sector can be given to a new file and allocated means that the sector already belongs to a file. If all bits of the bit-map are set, there are no more free sectors and the disk is full. Figure 3.13 illustrates the free sector list. A disk with 80 tracks of 18 sectors has a total of 80 x 18 = 1440 sectors—the free sector list will easily fit within a 512 byte sector..
![]() |
The free sector list |
It isn’t necessary to use a free sector list and allocate a bit to each sector on the disk. Some operating systems associate each bit in the bit-map with a cluster of, say, four sectors. Using a cluster-map rather than a bit-map reduces the number of bits required in the map. Cluster maps are more efficient because they reduces the number of times the operating system has to search the map for new sectors. However, the cluster-map increases the granularity of files because files are forced to grow in minimum increments of a whole cluster (e.g., four sectors). If a sector holds 512 bytes, a 4-sector cluster means that the minimum increment for a file is 4 x 512 bytes = 2 Kbytes. Disks with lots of very small files waste space.
The MS DOS operating system doesn’t maintain a bit-map (or cluster-map) as such. MS DOS maintains a cluster-map in which each 16-bit entry points to the location of the next cluster used by the file containing the current cluster. This data structure is termed a file allocation table, FAT. Entries in the FAT not only specify the location of the next cluster—special values are used as markers. For example, the entry FFFF16 indicates the end of a chain of clusters, the entry FFF716 indicates a bad sector that cannot be used, and the entry 000016 indicates a free cluster. A simplified version of FAT might look like:
FAT word 2 3 4 5 6 7 8 9 A B C D ...
FAT entry 4 6 7 8 A B FFFF
The file can be represented by the clusters:
4 6 7 8 A B
Whenever the disk file manager wishes to create a file, it searches the sector-map for free sectors and allocates them to the file. Similarly, when a file is deleted, its sectors are once more returned to the free pool by clearing the appropriate entries in the bit-map. Note that the sectors comprising the file are not overwritten when the file is deleted by the operating system. For this reason, it is often possible to recover deleted files as long as they have not been overwritten since they were removed from the directory and their sectors returned to the pool of free sectors.
The physical sectors (i.e., actual sectors) on a disk are numbered 1, 2, ... up to the maximum number of sectors per track. Equally, the logical sectors making up a file are also numbered 1, 2, ... etc. At first sight it might seem sensible to make the physical and logical numbering of sectors the same. After all, if a file has logical sector numbers ..., 6, 7, 8, 9,... these sectors can quite happily be mapped onto the contiguous physical sectors numbered, say, ...2, 3, 4, 5... Unfortunately, this simple scheme has a problem. After a sector has been read from disk, the operating system must perform various housekeeping functions (e.g., the calculation of the next sector address, data validation, transferring the data to its destination in main memory, ...). If the logical sectors of a disk are directly mapped onto contiguous physical sectors, by the time physical sector i has been read and processed, the read/write head might be over, say, physical sector i + 2. Consequently, contiguous sectors cannot be read consecutively and almost a complete revolution of the disk takes place between each sector read.
By interleaving the logical sectors, we can greatly reduce access time by arranging that the next logical sector will be the next physical sector to be read. Figure 3.14 demonstrates the effect of an interleaving factor of 1:5.
![]() |
Sector interleaving |
There is little point in storing data on a disk unless it can be accessed with a minimum of effort. To achieve this objective, a data structure called a directory holds information about the nature of each file and where the file can be found. Information in directories varies from the minimum required (the file name plus the location of the first sector of the file) to an extensive description of the file (including attributes such as file ownership or access rights). Figure 3.15 illustrates the 32-byte directory structure used by MS DOS.
![]() |
The file directory structure |
The directory structure of figure 3.15 tells the operating system some of the things it needs to know abut the file, such as its name and when its first cluster is located. The attribute field defines the file’s type; for example, it can be made read-only or “hidden” so that it is not listed in directories of files. Unfortunately, this MS DOS file structure is rather limited by today’s standards (e.g., it supports only 8-character file names).
Note that the first byte of the file’s name is an ASCII character. However, if the first byte has the value is 001, it indicates to the operating system that this directory entry has never be used before. The byte E516, indicates that this directory entry has been erased. If you’ve ever used a deleted file recovery tool, you will discover that erased files can be recovered but the first character of their name has been lost forever (because it was converted to E516).
efore continuing with a discussion of file structures, we need to introduce the concept of a linked list. Figure 3.16 demonstrates a simple linked list in which each sector contains a pointer to the next sector in the list. The final sector contains a null pointer (i.e., 0,0) because it has no next sector to point to. The advantage of a linked list is that the sectors can be randomly organized on the disk (randomization occurs because new files are continually being created and old files deleted). Two bytes are required for each pointer; one for the track number and one for the sector number. The linked list is an important data structure that will make an appearance in other chapters.
![]() |
The linked list |
Figure 3.17 demonstrates how a linked list of sectors might be arranged on a disk. Note how the sectors are distributed almost randomly across the surface disk. This situation, called file fragmentation, occurs when files are created, deleted, created and so on. When a new file is created, it picks up sectors here and there. Fragmented files are slow to access because the read/head has to skip from one track to another. Operating systems often have defragmentation programs that regroup the sectors of a file to make them contiguous and more easy to read.
![]() |
Figure 3.17 Structure of a file on a disk |
Another data structure is the doubly-linked list that has two pointers per element; one pointer that points to the previous element and another pointer that points to the next element. The advantage of the doubly-linked list is that you can move through it in either a forward direction or in a backward direction. Moreover, if one of the links is damaged it is still possible for the operating system to recover the file. If a sector is lost in a single linked list, all successive sectors are lost.
A file created by the type of linked list in figure 3.16 is a sequential access files rather than the random access file. The only way of accessing a particular sector in the file is by reading all sectors of the list until the desired sector is located. Such a sequential access is, of course, highly inefficient. However, sequential access files are very easy to set up and a disk file system designed to implement only sequential files is much easier to design than one that caters for random access files.
An alternative file organization is to maintain a list of sectors belonging to each file—figure 3.18. Each directory entry contains a pointer to the list of sectors making up that file. Once the operating system has read the sector list, it is able to move to any point in the file without reading the file sequentially. Moreover, the operating system can conveniently increase the size of a file or delete part of it merely to updating a file's sector list (and, of course, the disk's sector map). A table of sectors makes it easy to create random access files. Now that we’ve looked at the physical and the software aspects of memory, we’re going to discuss some of the ethical considerations raised by the copying of software.
![]() |
Another possible file structure |
Secondary Storage
The term secondary store was once synonymous with disk drives and tape transports, although magnetic bubble memories challenged the disk drive as a secondary storage device for a time and optical memory is replacing disk and tape drives in many applications.
Magnetizing a Flat Surface
The operating principles of disk drives (both hard and floppy) and tape units are virtually the same: the former records data on a flat platter (i.e., disk) coated with a magnetic material, whereas the latter records data on a thin band of flexible plastic coated with magnetic material. Figure 3 illustrates the generic recording process (we have called it generic because the same model serves both disk and tape systems).
Figure 3 Surface recording

The write head used to write data consists of a ring of high-permeability soft magnetic material with a coil wound round it. High-permeability means that the material offers a low resistance to a magnetic field. The most important feature of the write head is a tiny air-gap in the ring. When a current flows in the coil a magnetic flux is created within the ring. This flux flows round the core, but when it encounters the air-gap, it spreads out into the surrounding air as illustrated in Figure 4.
Figure 4 The air-gap

Because the head is either close to or in contact with the recording medium, the magnetic field round the air gap passes through the magnetic material coating the backing. If this field is strong enough, it causes the magnetic particles (i.e., domains) within the coating to become aligned with the field. Since the magnetic surface is moving, a continuous strip of surface is magnetized as it passed under the write head. If the direction of the current in the coil is changed the field reverses and the magnetic particles in the coating are magnetized in the opposite direction. Figure 5 shows how the domains in the surface material might be magnetized (North-South or South-North) after passing under the write head. We have also plotted the current in the write-head on the same figure.
Figure 5 The magnetized layer

Reading Data
Having recorded data in the form of a magnetized band along a track, we have to reverse the process to retrieve the data. A read head is essentially the same as a write head (sometimes a single head serves as both read and write head). When the magnetized material moves past the gap in the read head, a magnetic flux is induced in the head. The flux, in turn, induces a voltage across the terminals of the coil that is proportional to the rate of change of the flux, rather than the absolute value of the magnetic flux itself. Figure 6 shows the waveforms associated with writing and reading data on a magnetic surface. Only transitions of magnetic flux can be detected. The output from a region of the surface with a constant magnetization is zero, making it difficult to record digital data directly on tape or disk.
Figure 6 Read/write waveforms

As time has passed, engineers have produced greater and greater packing densities (up to about 10 million bits per square inch). Using vertical recording densities of over 15 million bits per square inch are possible. One of the main sources of improvement has been in the composition of the magnetic medium used to store data. The size of the particles has been reduced and their magnetic properties improved. Some tapes employ a thin metallic film, rather than individual particles. Metal oxide coatings are about 800 mm thick with oxide particles approximately 25 mm by 600 mm with an ellipsoidal shape. A thin film coating is typically only 100 mm thick.
Non-return to Zero Encoding
One of the first widely used data encoding techniques was called modified non-return to zero or NRZ1. Each time a logical one is to be recorded, the current flowing in the head is reversed. When reading data each change in flux is interpreted as a logical one. Figure 7 illustrates NRZ1 recording. NRZ1 requires a maximum of one flux transition per bit of stored data, and represents the optimum packing density of 100 percent. The greatest drawback of NRZ1 is that it is not self-clocking and it is impossible to reliably retrieve a long string of 0s (i.e., a period with no signal from the read-head)
Figure 7 Non-return to zero one recording (NRZ1)

Phase Encoding
A recording code that was once widely used by magnetic tape transports is called phase encoding or Manchester encoding. Some of the more modern codes are based on this technique. A flux transition is located at the center of each and every bit cell: a low-to-high transition indicates a one and a high-to-low transition a zero. As there is always a flux transition at the center of each data cell, a clock signal can be derived from the recorded data, and therefore this encoding technique is self-clocking. A stream of alternate 1s and 0s requires one flux transition per bit, whereas a stream of 1s or 0s requires two flux changes per bit.
Figure 8 illustrates how the sequence 01010011 is phase encoded. Phase encoding has a low efficiency of 50 percent because a maximum of two transitions per bit are required. The correlation is 100 percent because there is a maximum difference between 1s and 0s. The bandwidth requirements are good because there is no low frequency component in the recorded signal. However, as up to two flux transitions are required per bit, the maximum recorded frequency is twice that of NRZ1 at an equivalent bit density. The circuit complexity is greater than that of NRZ1, although suitable encoder/decoders are available as single chips. Finally, phase encoding has a good immunity to noise. Because of these attributes phase encoding is widely used in digital data transmission systems as well as magnetic recording systems.
Figure 8 Phase encoded recording

Phase encoding has now been replaced my more efficient recording techniques.
Disk Drive Principles
The hard disk is a flat, circular, rigid sheet of aluminum coated with a thin layer of magnetic material. This disk rotates continually about its central axis in much the same way as a black vinyl disk rotates in a gramophone player (for those old enough to remember the days before the CD). The read/write head is positioned at the end of an arm above the surface of the disk. As the disk rotates, the read/write head follows a circular path or track around the disk. Digital information is stored along concentric tracks round the disk (figure 9). We will soon see that data is written in blocks called sectors along the track. Disks vary in size from 8 in (older mainframes) to 3? and 5? in (personal computers) to 1.3—2? in (laptop portable computers). The rotational speed of disks in personal computers was 3,600 rpm, although 7,200 rpm is now common and some disks rotate at over 10,000 rpm. Track spacing is of the order of 2,500 tracks/in. As time passes, track spacing will probably continue to improve significantly, whereas the speed of rotation will not grow at anything like the same rate. It is possible that glass disks will replace aluminum disks because glass is less temperature sensitive than aluminum and is more durable.
Figure 9 Structure of a disk

Figure 10 illustrates the structure of a disk drive. A significant difference between the audio (gramophone but not CD) and magnetic disks is that the groove on the audio disk is physically cut into its surface, whereas the tracks on a magnetic disk are simply the circular paths traced out by the motion of the disk under the read/write head. Passing a current through the head magnetizes the moving surface of the disk and writes data along the track. Similarly, when reading data, the head is moved to the required track and the motion of the magnetized surface induces a tiny voltage in the coil of the read head.
Figure 10 Principle of the disk drive

A precision servomechanism called an actuator moves the arm holding the head horizontally along a radial from track to track. An actuator is an electromechanical device that converts an electronic signal into mechanical motion. Remember the difference between the magnetic disk and the audio record. In the former the tracks are concentric and the head steps from track to track, whereas in the latter a continuous spiral groove is cut into the surface of the disk and the stylus gradually moves towards the center as the disk rotates.
The characteristics of disk drives vary from manufacturer to manufacturer and are continually being improved on at an immense rate. A high-performance disk drive of the late-1990s had a rotational speed of 5,400 rpm (i.e., 90 revolutions per second), a capacity of 9 Gbytes (approximately 1010 bits), an average seek time of 8 ms (seek time is the time taken to locate a given track), and could transfer data to the computer at over 10 Mbytes per second. Only a decade earlier, a typical hard disk in a PC had a capacity of 20 Mbytes and an access time of over 70 ms. During the 1990s, average disk storage densities were increasing at a rate of about 60% per year compounded (this is a phenomenal rate of growth). However, the improvement in performance (access time and data rate) over the same period grew at a more modest 7% per year.
The parameters of a rigid disk are impressive. The magnetic layer is only 0.01 mm thick (i.e., about 2,000 atoms deep and the read/write head is positioned 0.2 mm above the surface of the platter. On top of the magnetic layer is a lubricating layer of a fluorocarbon that is about one molecule thick. The structure of the heads themselves is quite complex. Not only must they have the correct electrical and magnetic properties (the air-gap in the read/write head may be only 50 mm wide), but the correct mechanical properties. If the head were actually in physical contact with the disk surface, the abrasive magnetic coating would soon wear it out because its velocity over the surface of the disk is of the order of 100 km/hour. The head is mounted in a holder called a slipper that is positioned above the disk at about 0.2 mm from the surface. We cannot directly achieve such a level of precision with current engineering technology. However, by exploiting the head's aerodynamic properties it can be made to fly in the moving layer of air just above the surface of the disk.
When an object moves, the air near its surface, called the boundary layer, moves with it. At some distance above the surface the air is still. Consequently a velocity gradient exists between the surface and the still air. At a certain point above the disk's surface, the velocity of the air flowing over the head generates enough lift to match the pressure of the spring pushing the head towards the disk. At this point, the head is in equilibrium and floats above the disk. Modern slippers fly below 70 x 10-9 m (i.e., 0.07 mm) and have longitudinal grooves cut in them to dump some of the lift. The precision of a modern slipper is so great that the acid in a fingerprint caused by careless handling can destroy its aerodynamic contour.
The height at which the head flies above the surface of the disk is related to the surface finish or roughness of the magnetic coating. If the magnetic material is polished, the surface to head gap can be reduced by 50% in comparison with an unpolished surface.
Occasionally, the head does hit the surface and is said to crash. A crash can damage part of the track and this track must be labeled bad and the lost data rewritten from a back-up copy of the file.
The disk controller (i.e., the electronic system that controls the operation of a disk drive) specifies a track and sector and either reads its contents into a buffer (i.e., temporary store) or writes the contents of the buffer to the disk. Some call a disk drive a random access device because you can step to a given track without having to read the contents of each track. Strictly speaking, disk drives are sequential access devices because it is necessary to wait until the desired sector moves under the head before it can be read.
Operational Parameters
The user of a disk drive is often most interested in three parameters: the total capacity of the system, the rate at which data is written to or read from the disk, and its average access time. In the late 1990s storage capacities ranged from 1000 to over 9000 megabytes, data rates were several megabytes/s and average access times from 8 ms to 12 ms. By the end of the century, data densities will have reached 10 Gbits/in2 and track widths of the order of 1 mm. At the start of 1997, typical PCs were supplied with 2 Gbyte disks. By the beginning of 1998, PCs were being shipped with 9 Gbyte hard disks.
A disk drive's average access time is composed of three parts: the time required to step to the desired track (seek time), the time taken for the disk to rotate so that the sector to be read is under the head (latency), and the time taken to read the data. In practice, the reading time is often left out of published access times.
The average time to step from track to track is quite difficult to determine because the head doesn't move at constant velocity and considerations such as head settling time need to be taken into account. Each seek consists of four distinct phases:
Designing head-positioning mechanisms is not easy. If you make the arm on which the head is mounted very light (in order to make it easy to accelerate the head assembly), the arm might be too flimsy and twist. If you make the arm more stiff, it may be impossible to seek a track without an exorbitantly expensive actuator.
The average number of steps per access depends very much on the arrangement of the data on the disk and on what happens to the head between successive accesses. If the head is parked at the periphery of the disk, it must move further on average than if it is parked at the center of the tracks. Figure 11 shows a file composed of six sectors. Note how they are arranged at random over the surface of the disk. Consequently, the head must move from track to track when the file is read sector by sector.
Figure 11 The arrangement of the sectors of a file

In the absence of any other information, a crude estimate of the average stepping time is one third the number of tracks multiplied by the time taken to step from one track to the adjacent track. This figure is based on the assumption that the head moves a random distance from its current track to its next track each time a seek operation is carried out. If the head were to be retracted to track 0 after each seek, the average access time would be half the total number of tracks multiplied by the track to track stepping time. If the head were to be parked in the middle of the tracks after each seek, the average access time would be ? of the number of tracks multiplied by the track to track stepping time.
Very short seeks (1 to 4 tracks) are dominated by head settling time. Short seeks in the range 200 to 400 tracks are dominated by the constant acceleration (speedup) phase and the seek time is proportional to the square root of the number of tracks to step plus the settle time. Finally, long seeks are dominated by the constant velocity (coast) phase and the seek time is proportional to the number of tracks.
The access time of a disk is made up of the seek time and the time to access a given sector once its track has been reached (the latency). The latency is easy to calculate. If you assume that the head has just stepped to a given track, the minimum latency is zero (the sector is just arriving under the head). The worst case latency is one revolution (the head has just missed the sector and has to wait for it to go round). On average, the latency is ? trev, where trev is the time for a single revolution of the platter. If a disk rotates at 7,200 rpm, its latency is given by:
? x 1/( 7,200 ? 60) = 0.00417 s = 4.17 ms.
Another important parameter is the rate at which data is transferred to and from the disk. If a disk rotates at R revolutions per minute, has s sectors per track, and each sector contains B bits, the capacity of a track is B< >/font> s bits. These B/font> s bits are read (or written) in 60/R seconds. Therefore, the data rate is given by B/font> s/(60/R) = B/font> s/font> R/60 bits/s. This is, of course, the actual rate at which data is read from the disk. Buffering the data in the drive's electronics allows it to be transmitted to the host computer at a different rate.
The length of a track close to the center of a disk is much less than that of a track near to the outer edge of the disk. In order to maximize the storage capacity, some systems use zoning in which the outer tracks have more sectors than the inner tracks.
Modern disk drives must be tolerant to shock (i.e., acceleration caused by movement). This is particularly important for disk drives in portable equipment such as laptop computers. Two shock parameters are normally quoted. One refers to the tolerance to shock when the disk is inoperative and the other to shock while the disk is running. Shock can cause two problems. One is physical damage to the surface of the disk if the head crashes in to it (this is called head slap). The other is damage to data structures if the head is moved to another track during a write operation. Shock sensors can be incorporated in the disk drive to detect the beginning of a "shock event" and disable any write operation in progress.