Hardware Reference
In-Depth Information
Track Sector Number of
sectors
in hole
Sector
Tr a ck
0
1
2
3
4
5
6
7
8
9 10 11
0
0
1
1
2
2
2
3
3
4
0
6
0
11
1
3
7
0
9
3
5
6
10
1
1
3
5
3
3
8
0
1
2
3
4
0
0
1
0
1
0
0
0
0
1
0
0
1
0
1
0
0
0
1
0
0
0
0
1
0
1
0
0
1
0
0
0
1
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
(b)
(a)
Figure 6-22. Two ways of keeping track of available sectors. (a) A free list.
(b) A bit map.
to get to the start of an allocation unit, it is far better to read 8 KB (about 80 μ sec)
than 1 KB (about 10 μ sec), since reading 8 KB as eight 1-KB units may require
eight seeks. Transfer efficiency argues for large units. Of course, as solid-state
disks become cheaper and more common, this argument ceases to hold, since these
devices have no seek time at all.
Also arguing for large allocation units is the fact that having small allocation
units means having many of them. Having, many allocation units, in turn, means
large file indices or large linked-list tables in memory. As a historical note, MS-
DOS started out with the allocation unit being one sector (512 bytes) and 16-bit
numbers being used to identify sectors. When disks grew beyond 65,336 sectors,
the only way to use all the space on the disk and still use 16-bit numbers to identify
the allocation units was to use bigger and bigger allocation units. The first release
of Windows 95 had the same problem, but a subsequent release used 32-bit num-
bers. Windows 98 supported both sizes.
However, arguing in favor of small allocation units is the fact that few files
occupy exactly an integral number of allocation units. Therefore, some space will
be wasted in the last allocation unit of nearly every file. If the file is much larger
than the allocation unit, the average space wasted will be half an allocation unit.
The larger the allocation unit, the larger the amount of wasted space. If the aver-
age file is much smaller than the allocation unit, most of the disk space will be
wasted.
For example, on an MS-DOS or Windows 95 release 1 disk partition of 2 GB,
the allocation units were 32 KB, so a 100-character file wasted 32,668 bytes of
disk space. Storage efficiency argues for small allocation units. Due to the ever-
decreasing price of large disks, efficiency in time (i.e., faster performance) tends to
be the most important factor nowadays, so allocation units tend to be increasing
over time and the wasted disk space simply accepted.
Search WWH ::




Custom Search