C++ CSS HTML Java JavaScript MySQL Oracle PERL PHP SQL Unix VBScript XHTML XML Сети
Storage Addressing Concepts
 

5.2. Storage Addressing Concepts

is not sufficient; in order to use this storage capacity, we must have some method of giving addresses to uniform-sized parts of the available storage.

their circumference also varies. Therefore, if storage was addressed only to the track level, each track would have different amounts of data — track 0 (being near the center of the platter) might hold 10,827 bytes, while track 1,258 (near the outside edge of the platter) might hold 15,382 bytes.

The solution is to divide each track into multiple sectors or blocks; consistently-sized (often 512 bytes) segments of storage. The result is that each track contains a set number[1] of sectors.

A side effect of this is that every track contains unused space — the space between the sectors. Because of the constant number of sectors in each track, the amount of unused space varies — relatively little unused space in the inner tracks, and a great deal more unused space in the outer tracks. In either case, this unused space is wasted, as data cannot be stored on it.

However, the advantage offsetting this wasted space is that effectively addressing the storage on a mass storage device is now possible. In fact, there are two methods of addressing — geometry-based addressing, and block-based addressing.

5.2.1. Geometry-Based Addressing

The term geometry-based addressing refers to the fact that mass storage devices actually store data at a specific physical spot on the storage medium. In the case of the devices being described here, this refers to three specific items that define a specific point on the device's disk platters:

The following sections describe how a hypothetical address can describe a specific physical location on the storage medium.

5.2.1.1. Cylinder

other cylinders, reducing our search to only one track for each surface in the mass storage device.

CylinderHeadSector
1014XX

Table 5-1. Storage Addressing

In Table 5-1, the first part of a geometry-based address has been filled in. Two more components to this address — the head and sector — remain undefined.

5.2.1.2. Head

with a specific head. In fact, the device's underlying electronics actually select one head and — deselecting the rest — only interact with the selected head for the duration of the I/O operation. All other tracks that make up the current cylinder have now been eliminated.

CylinderHeadSector
10142X

Table 5-2. Storage Addressing

In Table 5-2, the first two parts of a geometry-based address have been filled in. One final component to this address — the sector — remains undefined.

5.2.1.3. Sector

By specifying a particular sector, we have completed the addressing, and have uniquely identified the desired block of data.

CylinderHeadSector
1014212

Table 5-3. Storage Addressing

In Table 5-3

5.2.1.4. Problems with Geometry-Based Addressing

It is true that each geometry-based address uniquely identifies one specific data block, but that only applies if the numbering scheme for the cylinders, heads, and sectors is not changed. If the numbering scheme changes (such as when the hardware/software interacting with the storage device changes), then all bets are off.

Because of this potential for ambiguity, a different approach to addressing was developed. The next section describes it in more detail.

5.2.2. Block-Based Addressing

Block-based addressing is much more straightforward than geometry-based addressing. With block-based addressing, every data block is given a unique number. This number is passed from the computer to the mass storage device, which then internally performs the conversion to the geometry-based address required by the device's control circuitry.

Because the conversion to a geometry-based address is always done by the device itself, it will always be consistent, eliminating the problem inherent with giving the device geometry-based addressing.

Notes

[1]

While early mass storage devices used the same number of sectors for every track, later devices divided the range of cylinders into different "zones," with each zone having a different number of sectors per track. The reason for this is to take advantage of the additional space between sectors in the outer cylinders, where there is more unused space between sectors.

Главная