Basic I/O Access Methods - HP 3000 III Series Manual

Table of Contents
I/O System
FILE SYSTEM
I/O
PRIVILEGED
I/O
PROCESS
r--~~
FilE
SYSTEM
I/O
SYSTEM
I/O
SYSTEM
Figure 7-1.
Basic I/O Access Methods
7-2. FILE SYSTEM OPERATION
Figure 7-2
illustrates the
function of the
I/O
system in
the
overall handling
of files.
The I/O system,
as shown,
is part
software and part hardware.
Several peripheral devices are shown
connected to
the I/O system,
each of which has
some capability
for handling files;
entering files, storing files, or both.
Of
particular
interest in this discussion are the
files stored
on
disc. (Several physical disc units might be used.) Each disc file
is broken up into one or more extents. (Disc extents are composed
of a number of blocks.)
When the file system causes the I/O sys-
tem to transfer data to or from the disc, it does so one block at
a time.
As noted previously, the blocks are further
subdivided
into
records and then into individual words.
When the file sys-
tem processes user file requests, it does
so
on
the
basis
of
records.
The memory management routine is also shown in figure 7-2 (dotted
line) since it frequently makes its own requests to the I/O
sys-
tem.
Memory
management calls the I/O system in order to bring
code and data segments into Main Memory where
they
can
be
ac-
cessed by user processes.
In a typical operation, a user process
might request the file system to read
a
file
using
the
FREAD
intrinsic
(I).
(Refer to the MPE Intrinsics Reference Manual for
a discussion of the FREAD intrinsic.) The file system
reads
the
stack
associated
with
the
user process (3). Note that in this
example, no input/output has taken place.
This
is
because
the
named
record
is
already present in a buffer (BUFFER O)
in Main
Memory.
Assume another case in which the requested record is not present.
In this case,
the file system makes a request to the
I/O system
(A) to read the block containing the particular record.
The I/O
system accordingly
reads this block from the disc
(B) and loads
it into one of the buffers (BUFFER
I) allocated to the named file
(C).
(When you open a file,
you specify how many buffers should
7-2
Table of Contents
loading

Table of Contents