Harmonization of speed and cache data exchange
When data is always a challenge to harmonize speed. For example, if one user
process produces some of the data and transmit them to another user through the
process of RAM, in general, the speed of data generation and reading do not
match. Harmonization speed is usually achieved by buffering data in RAM and
synchronization of processes to access the buffer.
In the I / O subsystem to coordinate the exchange rate is also commonly used
data buffering in memory. In those specialized operating systems, which provide
high-speed I / O is a priority (Real-time services network file services, etc.),
much of RAM are not under the code of applications, and by buffering data. But
buffering only on the basis of RAM in the I / O subsystem is not is the
difference between the exchange rate and operational memory, which processes
data processing facilities, and the speed of external devices often too large to
a temporary buffer could be operational memory-volume may simply not enough. For
such cases should be special measures, and is often used as a buffer disk file,
also called spul- file (from the spool - spool, the same buffer, only to train).
A typical example of an organization spulinga output to the printer. To print
documents in dozens of megabytes is not unusual, therefore, for temporary
storage (and print any document takes a few minutes to tens of minutes) of RAM
is not enough.
Another solution to this problem is to use a large buffer memory controllers
external devices. This approach is especially useful when placing data on disk
too slow exchange (or the data displayed on the disc itself). For example, the
graphics display controllers used buffer memory, commensurate with the volume of
operational, and it has accelerated withdrawal schedules on the screen.
Buffering data not only agree on the speed of the processor and external devices,
but also to other tasks, reduce the number of actual I / O operations through
data caching. The disk cache is a feature I / O subsystems virtually all
operating systems, significantly reducing time access to the stored data.
Sharing devices and data between processes
I / O devices can be processes in a monopoly, and the joint use of (shared).
This OS should provide access control by the same means as in access to other
resources of computer systems by testing a user or group of users on whose
behalf a process to carry out an operation of the device. For example, a
particular group of users allowed to capture the serial port of monopoly
ownership, and other users is prohibited.
The operating system can control access not only to the device as a whole, but
to individual portion of data stored or displayed this device. The disc is a
typical example of the device for which it is important to control access to the
device is not as a whole and to individual directories and files. In finding
information on graphic display windows of the screen are also a resource, which
must be a kind of ongoing access to the system processes. It is for each portion
of the device or data may be put to the right, not directly connected with
access to the device as a whole. For example, the file system, usually for each
directory and file can be set individual access rights. Obviously, joint access
to parts of the device or the data stored on it, a prerequisite for the job is a
shared device as a whole.
The same device in different time periods can be used as shared, and monopoly
regimes. Nevertheless, there are devices, which are usually characterized by one
of these regimes, such as sequential alphanumeric ports and terminals are used
in the monopoly regime, and drive-line sharing. The operating system should
provide the devices in both modes, providing tracking procedures capture and
release devices used monopoly, in the case of sharing of optimizing the sequence
of I / O operations for the various processes to improve overall productivity,
if possible. For example, data from several processes disc can be streamlined so
the sequence of operations that unproductive time on the movement of heads
significantly reduced (although for some of the processes may slow I / O
operations).
In the division between devices may be needed in distinguishing portion of the
two processes from each other. Normally such a need arises to share the so-called
serial devices, data which, unlike direct access devices not addressed. Typical
representatives of such devices is a printer that is not allocated in the
possession of monopoly power, and at the same time each document will be
published as a coherent set of pages. For these devices is organized mainly by
finding jobs, each job is a portion of data that can break, such as paper for
printing. To keep jobs queue used spul- file, which both agree on the speed of
the printer and memory and provides logical segmentation data portion. As spul-
file is shared direct access devices, the processes can simultaneously output to
the printer, placing data in its section spul- file.
Providing convenient logical interface between devices and the rest of the
system
Variety of I / O devices made especially urgent as a masking OS logical
interface between peripheral devices and applications. Virtually all modern
operating systems support as a basis for such an interface file model of
peripheral devices when any device looks for a consistent set of application
programmer bytes, which is working with the unified system calls (for example,
read and write), asking the name of the device and the debug output log file
shifting from the start byte. To sustain such an interface I / O subsystem lot
of work to be done, given the difference in data operations, such as the hard
disk and graphics terminal.
The attractiveness of the model debug output log file device is its simplicity
and uniformity to the devices of any kind, but in many cases for programming
some of Input / Output devices, it is too poor. Therefore, the model is often
used as the only basis on which I / O subsystem builds more content model device
type. I / O subsystem provides, as a rule, a specific interface to display
graphical information on the screen or printer, for programming operations
networking, etc. This specific interface developer can always build on the
existing base interface.
|