Page 48 - DCAP403_Operating System
P. 48
Unit 3: Operating System Structure
Layer 4 was where the user programs were found. They did not have to worry about process, Notes
memory, console, or I/O management.
The system operator process was located in layer 5.
Figure 3.8: MS - DOS Layer Structure
Application program
Resident system program
MS DOS device drivers
ROM BIOS device drivers
In MS-DOS, the interfaces and levels of functionality are not well separated. For instance,
application programs are able to access the basic I/O routines to write directly to the display
and disk drives. Such freedom leaves MS-DOS vulnerable to errant (or malicious) programs,
causing entire system crashes when user programs fail. Of course, MS-DOS was also limited
by the hardware of its era. Because the Intel 8088 for which it was written provides no dual
mode and no hardware protection, the designers of MS-DOS had no choice but to leave the base
hardware accessible.
The main advantage of the layered approach is modularity. The layers are selected such that
each uses functions (operations) and services of only lower level layers. This approach simplifi es
debugging and system verifi cation. The first layer can be debugged without any concern for
the rest of the system, because, by definition, it uses only the basic hardware (which is assumed
correct) to implement its functions. Once the first layer is debugged, its correct functioning can
be assumed while the second layer is worked on, and so on. If an error is found during the
debugging of a particular layer, we know that the error must be on that layer, because the layers
below it are already debugged. Thus, the design and implementation of the system is simplifi ed
when the system is broken down into layers.
Each layer is implemented using only those operations provided by lower level layers. A layer
does not need to know how these operations are implemented; it needs to know only what these
operations do. Hence, each layer hides the existence of certain data structures, operations, and
hardware from higher-level layers.
The layer approach to design was first used in the operating system at the Technische Hogeschool
Eindhoven. The system was defined in six layers. The bottom layer was the hardware. The next
layer implemented CPU scheduling. The next layer implemented memory management; the
memory-management scheme was virtual memory. Layer 3 contained device driver for the
operator’s console. Because it and I/O buffering (level 4) were placed above memory management,
the device buffers could be placed in virtual memory. The I/O buffering was also above the
operator’s console, so that I/O error conditions could be output to the operator’s console.
LOVELY PROFESSIONAL UNIVERSITY 41