Skip to main content

Layered Operating System

 

Layered Operating System

Layered Structure is a type of system structure in which the different services of the operating system are split into various layers, where each layer has a specific well-defined task to perform. It was created to improve the pre-existing structures like the Monolithic structure ( UNIX ) and the Simple structure ( MS-DOS ).

Example – The Windows NT operating system uses this layered approach as a part of it.

Design Analysis :
The whole Operating System is separated into several layers ( from 0 to n ) as the diagram shows. Each of the layers must have its own specific function to perform. There are some rules in the implementation of the layers as follows.

  1. The outermost layer must be the User Interface layer.
  2. The innermost layer must be the Hardware layer.
  3. A particular layer can access all the layers present below it but it cannot access the layers present above it. That is layer n-1 can access all the layers from n-2 to 0 but it cannot access the nth layer.

Thus if the user layer wants to interact with the hardware layer, the response will be traveled through all the layers from n-1 to 1. Each layer must be designed and implemented such that it will need only the services provided by the layers below it.

Layered OS Design

1. Monolithic architecture

2.    Layerd archtecture.

3.     Virtual machine architecture

4.     Exokernel architecture

5.    Client server architecture 

6.     Micro kernel architecture

Advantages :
There are several advantages to this design :

  1. Modularity :
    This design promotes modularity as each layer performs only the tasks it is scheduled to perform.
  2. Easy debugging :
    As the layers are discrete so it is very easy to debug. Suppose an error occurs in the CPU scheduling layer, so the developer can only search that particular layer to debug, unlike the Monolithic system in which all the services are present together.
  3. Easy update :
    A modification made in a particular layer will not affect the other layers.
  4. No direct access to hardware :
    The hardware layer is the innermost layer present in the design. So a user can use the services of hardware but cannot directly modify or access it, unlike the Simple system in which the user had direct access to the hardware.
  5. Abstraction :
    Every layer is concerned with its own functions. So the functions and implementations of the other layers are abstract to it.

Disadvantages :
Though this system has several advantages over the Monolithic and Simple design, there are also some disadvantages as follows.

  1. Complex and careful implementation :
    As a layer can access the services of the layers below it, so the arrangement of the layers must be done carefully. For example, the backing storage layer uses the services of the memory management layer. So it must be kept below the memory management layer. Thus with great modularity comes complex implementation.
  2. Slower in execution :
    If a layer wants to interact with another layer, it sends a request that has to travel through all the layers present in between the two interacting layers. Thus it increases response time, unlike the Monolithic system which is faster than this. Thus an increase in the number of layers may lead to a very inefficient design.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.


Comments

Popular posts from this blog

Functions of Operating System

  Functions of operating system   5.                     protection and security : ·                       another important functions of an operating system is to protect itself from the user process and to protect different users processes from one another in a syatem. ·                       In a multi programming environment, where several users process reside in main memory at the same time, the may interface with OS or with each other. ·                       Thus, protection mechanism controls the access of users, programs and processes used by various applications. ·                       A total approach to computer security involves both external and internal security.   6.                     Networking: ·           Networking is used for exchanging    information among different computer that are distributed across various location. ·           Distributed system consist of multiple processors and each processor has its own memory and clock ·           This results in compu

OS its Resource Manager and its Function

  Operating system as resource manager:   ·           A computer system usually has many hardware and software resources such as processor , memory, disk printer, I/O devices etc. ·           The task of resources management becomes essential in multi-user operating system where different user compute for the same resource.   Operating system manages resources in two ways : 1.         Time multiplexing : it defines the sharing of resources on the basis of fixed time slices. For example, the operating system allocate the resources, such as CPUto program A for fixed time slice. 2.         Space timing:  it defines the concurrent sharing of resources among different programs.for example, sharing of hard disk and main memory is space multiplexing.     FUNCTION OF OPERATING SYSTEM     The primary function of an operating system is to provide an environment for excecution of users program . the various function of operating system are: 1.         process management 2.         main memory man

Defination of OS(operating system) and its concepts

    What do you mean by operating system?     Definition :  An operating system is a program that act as an interface between the user of a computer and the                                      Computer hardware. Operating system is a first program that gets loaded into the memory through a process called booting. Concepts of operating system : ·                       The purpose of operating system is to provide an environment in which a user can execute program in a convenient and efficient manner. ·                       Operating system is an integrated set of program that manages the various hardware resources such as processor, memory, I/O Devices , communication devices and overall operation of a computer system. ·                       Operating systems also acts as a platform on which various applications programs such as word processor and excel are executed. ·                       The most common operating system are the window family of operating system (windows 98, window

Multitasking System

  Multitasking system ·           Technically , multitasking is same as multi programming ·           In a multitasking operating system, s single user can execute multiple programs at the same time ·           We can also say, multitasking is the system capability to work on more than one job or process at the same time. ·           It means that whenever a job needs to perform I/O operation, the cpu can be used for execting some other job                                                        diagram of multi tasking     ·           There are two type of multitasking : 1.         Cooperative multitaskin g 2.         Preemptive multitasking   ·            Co operative multitasking    in cooperative multitasking , program can aquire the cpu for the required amount of time a program canshare CPU with any other program that is executing simultaneously, if it does not currently require the CPU.   ·           Preemptive multitasking . In preemptive multitasking the operating system allocat

Classification of Operating System

  Classification of operating systems The operating systems may be classified into different types depending upon the nature of interaction between the user and his/her program. The various types of operating system are : 1.       single user operating system    2.        Multi user operating system   3.         Batch processing operating system 4.        Multi programming operating system   5.       Multi tasking operating system   6.         Multiprocessing operating system 7.         Time sharing operating system 8.       Real time system      Distributed system Multi threading operating system       Single user operating system ·                       In single user operating system, a single user can access the computer at a particular time. ·                       The computer, that are based on the operating system have only single processor and execute only a single program at all the time   ·                       Single user is of two type : 1.         single user, single-tas