r a
HOW
MUCH CAN
ONE DISK HOLD?
(What the Computer
writes in
a
Disk File)
Your disk is divided into thousands of equal-sized
units. Each unit is
a "byte." One of these bytes can
hold one character. Thus, the word
STRAW
will
consume five bytes of disk space.
An empty disk contains 161,280 bytes.
4,608
of
them house the directory. This leaves you
156,672
for your disk files.
Note: A
disk
contains
35
tracks. Each track
contains
18 256-byte sectors, or 18x256
=
4,608 bytes. One
of
the tracks is
for
the directory. This leaves
156,672
bytes (4,608 bytes
per track
x 34
tracks).
Does this mean
you
can
use the entire 156,672
bytes for data? Possibly. There are two
factors
which will determine this.
The first has to do with the way the Computer
allocates
space
for
a
disk
file.
It stores a file in clus-
ters. (We call
them
granules.) Each granule
con-
tains
2,304
bytes.
Because of this, all of your disk files will
contain
a multiple of
2,304
bytes. If your file contains
2,305 bytes of data, for example, the Computer
will
allocate 2 granules
for it, or
4,608
bytes
(2,304
x2).
The Computer allocates file
space
in
this manner
because it's the
most efficient
way to create a file.
It is very tricky
to
change
this and is something
that only very
technical
people would want to do.
(See
Chapter
11, Technical Information, for addi-
tional information.)
The second
factor
which
affects
how much data
you can put in a disk file
is your
program.
Some
disk programs are very efficient.
Others
put a
lot
of
overhead
and empty space in the file.
In the next two chapters,
we're
going
to
compare
eight
different types of programs. Each will store
the
same data
—
5,
'TEN;'
-
16,
and "PAPER"
—
in
a
disk
file named "OFFICE/DAT." The amount
of overhead
and empty space each program will
put
in
"OFFICE/DAT" will vary greatly.
41