OS

System structure

Simple structure
There are several commercial system that don‘t have a well- defined structure such operating systems begins as small, simple & limited systems and then grow beyond their original scope. MS-DOS is an example of such system. It was not divided into modules carefully. Another example of limited structuring is the UNIX operating system.
System structures

Layered approach
In the layered approach, the OS is broken into a number of layers (levels) each built on top of lower layers. The bottom layer (layer o ) is the hardware & top most layer (layer N) is the user interface.
The main advantage of the layered approach is modularity.

  • The layers are selected such that each users functions (or operations) & services of only lower layer.
  • This approach simplifies debugging & system verification, i.e. the first layer can be debugged without concerning the rest of the system. Once the first layer is debugged, its correct functioning is assumed while the 2nd layer is debugged & so on.
  • If an error is found during the debugging of a particular layer, the error must be on that layer because the layers below it are already debugged. Thus the design & implementation of the system are simplified when the system is broken down into layers.
  • Each layer is implemented using only operations provided by lower layers. A layer doesn‘t need to know how these operations are implemented; it only needs to know what these operations do.
  • The layer approach was first used in the operating system. It was defined in six layers


The main disadvantage of the layered approach is:

  • The main difficulty with this approach involves the careful definition of the layers, because a layer can use only those layers below it. For example, the device driver for the disk space used by virtual memory algorithm must be at a level lower than that of the memory management routines, because memory management requires the ability to use the disk space.
  • It is less efficient than a non layered system (Each layer adds overhead to the system call & the net result is a system call that take longer time than on a non layered system).