Tuesday, 4 August 2020

What are the Operating System (OS) Structures?

Structure of Operating System:

The structure of operating system consists of four layers. These are hardware, software, system programs and application programs.  The following figure depicts the structure of OS.


Structure of OS


The hardware part consists of CPU, main memory, IO devices, secondary storage etc. The software includes routines for process management, memory management, IO control, file management. The system program layer consists of compilers, assemblers, linker etc. The application programs depend on the users.


Simple Structure:

 

Simple structure OS consist of small, simple and limited systems. Their structure is not well defined. For ex. MS - DOS is a simple structure OS.

 

It was initially written to provide the most functionality in the least space. The system started as a small and grew beyond its original scope. Levels were not well separated and as such programs could access IO devices directly. There was no dual user or kernel mode.

 Following figure shows MS-DOS layered structure:


MS-DOS Layered Structure

Layered Approach:

 

At the bottom layer is the hardware layer having a layer number 0.  The topmost layer (layer N) is the user interface.  An OS could be structured to contain many layers.  Each layer uses the interface provided by the layer below it and provides a more intelligent interface to the layer above it.

 

Layered structure provides good modularity. Each layer of the OS forms a module with a clearly defined functionality and interface with the rest of the OS. It simplifies debugging, system verification and provides facility of information hiding.

 

All the data and program are hidden from other module.  Debugging is done at first layer. While debugging, if any error is found, the error must be on that layer because the layers below it are already debugged.  Each layer hides the existence of certain data structures, operations and hardware from higher level layers.

 

Layered approach required careful definition of the layers because a layer can use only those layers below it. Problem with layered implementations is that they tend to be less efficient than other types.

 The following figure shows a layered kernel:


Layered Kernel



No comments:

Post a Comment