SlideShare a Scribd company logo
1 of 10
B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar
Operating System
KCS – 401
OS Structure
Dr. Pankaj Kumar
Associate Professor – CSE
SRMGPC Lucknow
Outline of the Lecture
B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar
OS Structure
Simple Structure
Monolithic Structure
Layered Structure
Micro Kernal
Modules
Operating System Structure
B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar
Since the operating system is such a complex structure, it should be created with utmost care so it
can be used and modified easily. An easy way to do this is to create the operating system in parts.
Each of these parts should be well defined with clear inputs, outputs and functions.
Operating system can be implemented with the help of various structures. The structure of the OS
depends mainly on how the various common components of the operating system are
interconnected and melded into the kernel. Depending on this we have following structures of the
operating system:
Simple Structure
Monolithic Strcuture
Layered Structure
Micro Kernal
Modules
Simple Structure
B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar
Such operating systems do not have well defined
structure and are small, simple and limited systems. The
interfaces and levels of functionality are not well
separated. MS-DOS is an example of such operating
system. It was written to provide the most functionality
in the least space, so it was not divided into modules
carefully..
In this structure the interfaces and levels of functionality are not well separated. For instance application
programs are able to access the basic I/O routine 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.
Monolithic Structure
B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar
It consists of two separable parts: the kernel and the
system programs.
The kernel is further separated into a series of
interfaces and device drivers, which have been added
and expanded over the years as UNIX has evolved.
Everything below the system call interface and above
the physical hardware is the kernel. The kernel
provides the file system, CPU scheduling, memory
management, and other operating-system functions
through system calls. Taken in sum, that is an
enormous amount of functionality to be combined
into one level. This monolithic structure was difficult
to implement and maintain.
Layered Structure
B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar
With proper hardware support, operating systems can be broken into
pieces that are smaller and more appropriate than those allowed by
the original MS-DOS or UNIX systems. The operating system can
then retain much greater control over the computer and over the
applications that make use of that computer.
In this structure the OS is broken into number of layers (levels). The
bottom layer (layer 0) is the hardware and the topmost layer (layer N)
is the user interface. These layers are so designed that each layer uses
the functions of the lower level layers only.
• This allows implementers to change the inner workings, and increases modularity.
• As long as the external interface of the routines don’t change, developers have more freedom
to change the inner workings of the routines.
• With the layered approach, the bottom layer is the hardware, while the highest layer is the
user interface.
Layered Structure
B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar
This approach simplifies debugging and system verification.
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
debugged, and 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 and implementation of the
system is simplified.
Each layer is implemented with 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 major difficulty with the layered approach involves appropriately defining the various
layers. Because a layer can use only lower-level layers, careful planning is necessary.
Micro Kernel Structure
B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar
This structure designs the operating system by
removing all non-essential components from the
kernel and implementing them as system and user
programs. This result in a smaller kernel called the
micro-kernel.
• Generally they provide minimal process and
memory management, and a communications
facility.
• Communication between components of the OS is
provided by message passing.
Advantages of this structure are that all new services
need to be added to user space and does not require the
kernel to be modified. Thus it is more secure and
reliable as if a service fails then rest of the operating
system remains untouched. Mac OS is an example of
this type of OS.
Main disadvantage is poor performance due to
increased system overhead from message
passing.
Module Structure
B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar
It is considered as the best approach for an OS. It
involves designing of a modular kernel. The kernel has
only set of core components and other services are
added as dynamically loadable modules to the kernel
either during run time or boot time. It resembles
layered structure due to the fact that each kernel has
defined and protected interfaces but it is more flexible
than the layered structure as a module can call any
other module. For example Solaris OS
Such a design allows the kernel to provide core
services yet also allows certain features to be
implemented dynamically. For example, device and
bus drivers for specific hardware can be added to the
kernel, and support for different file systems can be
added as loadable modules.
Queries
???????
B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar

More Related Content

More from Shri Ram Swaroop Memorial College of Engineering & Management

More from Shri Ram Swaroop Memorial College of Engineering & Management (12)

Operating System Sheduling
Operating System ShedulingOperating System Sheduling
Operating System Sheduling
 
Operating System Deadlock
Operating System DeadlockOperating System Deadlock
Operating System Deadlock
 
Operating System: process
Operating System: processOperating System: process
Operating System: process
 
Operating System: Process and synchronization
Operating System: Process and synchronizationOperating System: Process and synchronization
Operating System: Process and synchronization
 
Operating System: Semaphor
Operating System: SemaphorOperating System: Semaphor
Operating System: Semaphor
 
Operating System: interprocess Communication
Operating System: interprocess CommunicationOperating System: interprocess Communication
Operating System: interprocess Communication
 
Operating System - Introduction
Operating System - IntroductionOperating System - Introduction
Operating System - Introduction
 
Classification of Operating System
Classification of Operating SystemClassification of Operating System
Classification of Operating System
 
Aspect 0f Operating System
Aspect 0f Operating SystemAspect 0f Operating System
Aspect 0f Operating System
 
Services of Operating System
Services of Operating SystemServices of Operating System
Services of Operating System
 
Function of Operating System
Function of Operating SystemFunction of Operating System
Function of Operating System
 
Operating System - Overview
Operating System - OverviewOperating System - Overview
Operating System - Overview
 

Structure of Operating System

  • 1. B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar Operating System KCS – 401 OS Structure Dr. Pankaj Kumar Associate Professor – CSE SRMGPC Lucknow
  • 2. Outline of the Lecture B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar OS Structure Simple Structure Monolithic Structure Layered Structure Micro Kernal Modules
  • 3. Operating System Structure B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar Since the operating system is such a complex structure, it should be created with utmost care so it can be used and modified easily. An easy way to do this is to create the operating system in parts. Each of these parts should be well defined with clear inputs, outputs and functions. Operating system can be implemented with the help of various structures. The structure of the OS depends mainly on how the various common components of the operating system are interconnected and melded into the kernel. Depending on this we have following structures of the operating system: Simple Structure Monolithic Strcuture Layered Structure Micro Kernal Modules
  • 4. Simple Structure B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar Such operating systems do not have well defined structure and are small, simple and limited systems. The interfaces and levels of functionality are not well separated. MS-DOS is an example of such operating system. It was written to provide the most functionality in the least space, so it was not divided into modules carefully.. In this structure the interfaces and levels of functionality are not well separated. For instance application programs are able to access the basic I/O routine 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.
  • 5. Monolithic Structure B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar It consists of two separable parts: the kernel and the system programs. The kernel is further separated into a series of interfaces and device drivers, which have been added and expanded over the years as UNIX has evolved. Everything below the system call interface and above the physical hardware is the kernel. The kernel provides the file system, CPU scheduling, memory management, and other operating-system functions through system calls. Taken in sum, that is an enormous amount of functionality to be combined into one level. This monolithic structure was difficult to implement and maintain.
  • 6. Layered Structure B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar With proper hardware support, operating systems can be broken into pieces that are smaller and more appropriate than those allowed by the original MS-DOS or UNIX systems. The operating system can then retain much greater control over the computer and over the applications that make use of that computer. In this structure the OS is broken into number of layers (levels). The bottom layer (layer 0) is the hardware and the topmost layer (layer N) is the user interface. These layers are so designed that each layer uses the functions of the lower level layers only. • This allows implementers to change the inner workings, and increases modularity. • As long as the external interface of the routines don’t change, developers have more freedom to change the inner workings of the routines. • With the layered approach, the bottom layer is the hardware, while the highest layer is the user interface.
  • 7. Layered Structure B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar This approach simplifies debugging and system verification. 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 debugged, and 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 and implementation of the system is simplified. Each layer is implemented with 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 major difficulty with the layered approach involves appropriately defining the various layers. Because a layer can use only lower-level layers, careful planning is necessary.
  • 8. Micro Kernel Structure B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar This structure designs the operating system by removing all non-essential components from the kernel and implementing them as system and user programs. This result in a smaller kernel called the micro-kernel. • Generally they provide minimal process and memory management, and a communications facility. • Communication between components of the OS is provided by message passing. Advantages of this structure are that all new services need to be added to user space and does not require the kernel to be modified. Thus it is more secure and reliable as if a service fails then rest of the operating system remains untouched. Mac OS is an example of this type of OS. Main disadvantage is poor performance due to increased system overhead from message passing.
  • 9. Module Structure B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar It is considered as the best approach for an OS. It involves designing of a modular kernel. The kernel has only set of core components and other services are added as dynamically loadable modules to the kernel either during run time or boot time. It resembles layered structure due to the fact that each kernel has defined and protected interfaces but it is more flexible than the layered structure as a module can call any other module. For example Solaris OS Such a design allows the kernel to provide core services yet also allows certain features to be implemented dynamically. For example, device and bus drivers for specific hardware can be added to the kernel, and support for different file systems can be added as loadable modules.
  • 10. Queries ??????? B.Tech – CS 2nd Year Operating System (KCS- 401) Dr. Pankaj Kumar