This section defines
terms related to both the physical and the logical organization
of disks.
Logical Organization of a Disk The smallest addressable
unit of information on a disk is a block. Files--11 On-Disk Structures
define a block to consist of 512 8-bit bytes. Blocks can be treated
as units for transfer between a Files-11 disk volume and memory.
Files--11 ODS, however, views a disk as an array of blocks, and
is generally not concerned with individual blocks.
Blocks are
logically grouped into clusters,
which are the basic units by which disk space is allocated. You determine
the number of blocks in a cluster when a given disk, known as a volume, is first prepared
for use (initialized). Cluster sizes vary for different media types.
The smaller cluster sizes in the range are usually more practical.
In general, a disk with a relatively small number of blocks is given
a smaller cluster size, while larger disks are given larger cluster
sizes to minimize the overhead for disk space allocation.
Contiguous clusters allocated
to a particular file are called extents.
An extent can contain all or part of a file. If enough contiguous
area is available on the disk, the entire file is allocated as a
single extent. Sometimes, however, not enough contiguous area is
available to hold the entire file, or, when you create a file initially,
you might not want to reserve the entire required amount of space.
When the file is eventually extended, it is unlikely that the adjacent
clusters will still be unallocated. If the adjacent clusters are
already allocated to another file, the extension does not occur
contiguously.
If a file is divided into two or more parts, each part is
an extent. Thus, a file can consist of multiple extents located
in separate areas on the disk, as shown in
File Extents. Note that the file extensions are done automatically.
Figure 1 File Extents
Physical
Organization of a Disk The smallest unit discernible
to the Files-11 structure is the sector;
for most Files-11 disks, a sector is equivalent to a block, which
is 512 bytes. Other basic terms
related to disks are track and cylinder.
A track is the collection of sectors (or blocks, on Files-11 structures)
at a single radius on one recording surface of a disk. It is accessible
to a given read/write head position on the disk device. A cylinder
consists of all tracks at the same radius on all recording surfaces
of a disk.
Because access to any of the blocks in a given cylinder does
not require any movement of the disk's read/write heads, it is generally
advantageous to keep related data blocks in the same cylinder. For
this reason, when choosing a cluster size for a large-capacity disk,
you should usually select a cluster size that divides evenly into
the cylinder size.