Information Technology Reference
In-Depth Information
To keep track of what file begins where, the computer maintains
a table for each disk. The table contains an entry for each file; the
entry contains such information as the name of the file, its length,
and the track and sector at which it begins. Such a table is called a
directory or a folder . With such a directory, the retrieval of file in
formation proceeds in two steps: First, the computer consults the di
rectory to determine the starting location of the file, and second, the
computer begins reading the file at the designated track and sector
on the disk. When saving a new file, the computer finds free space,
makes a directory entry indicating this starting location, and then
stores the file in the identified location.
If there are many files, storing them all in a single directory may
be cumbersome, and subdirectories may be utilized. In such a case,
file entries will be stored in tables for subdirectories, subdirectories
will be stored in their own track and sector, and a main directory
will contain entries for each subdirectory.
All of this allows the process of reading files on a disk to begin
nicely, as long as the computer can find the main directory for the
disk. The main directory is placed in a standard location (e.g., sec
tor 0 of the inside track); thus, when a disk is inserted within a ma
chine, the computer can first read the main directory from its pre
scribed location to find entries regarding all subdirectories and
other files that the disk might contain.
Although this discussion resolves where each file begins, it does
not address where latter parts of large files might reside. The prob
lem is that, as processing proceeds in a computer, files are stored
and then removed, and the removal of files leaves free spaces within
a disk. It is analogous to having a line of 15 checkers on a checker
board and randomly removing 6, leaving yourself with irregular
gaps throughout your line. As time progresses, a disk typically has
free space spread over all of its tracks rather than being grouped to
gether in contiguous blocks. As a result, it may not be possible to
find several sectors grouped together to hold a new, large file. Even
if such space could be found, the computer might have to search
through a large number of sectors to find an adequate group of con
tiguous sectors for a file.
With these difficulties, computers normally do not even attempt
to find contiguous space when storing files. Instead, when storing
data for a file, a computer finds a sequence of available sectors—
Search WWH ::




Custom Search