0% found this document useful (0 votes)
3 views

Operating System arcitecture

The document outlines the architecture and services of operating systems, emphasizing the roles of the kernel and shell, as well as various architectures like monolithic, micro-kernel, and layered systems. It details the advantages and disadvantages of each architecture type, along with the essential services provided by operating systems, such as program execution, memory management, and security. The document serves as a comprehensive overview of how operating systems function and their structural designs.

Uploaded by

Manpreet Kaur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Operating System arcitecture

The document outlines the architecture and services of operating systems, emphasizing the roles of the kernel and shell, as well as various architectures like monolithic, micro-kernel, and layered systems. It details the advantages and disadvantages of each architecture type, along with the essential services provided by operating systems, such as program execution, memory management, and security. The document serves as a comprehensive overview of how operating systems function and their structural designs.

Uploaded by

Manpreet Kaur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Operating System - Architecture

An operating system allows the user application programs to interact with the system hardware. Since the
operating system is such a complex structure, its architecture plays an important role in its usage. Each
component of the Operating System Architecture should be well defined with clear inputs, outputs and
functions.
Import Terms
In operating system Architecture, we've two major terms which defines the major components of the
operating systems.
• Kernal − Kernal is the central component of an operating system architecture in most of the
implementation. A kernal is responsible for all major operations and interaction with the hardware.
A kernal manages memory, processor, input/output devices and provides interface to application
programs to interact with hardware components.
• Shell − Shell is an interface of an operating system. It can be command line interface or a graphical
user interface. User interacts with an operating system using shell. Application programs can also
use shell interface to interact with underlying operating system.
• System Softwares − System softwares are the programs which interact with Kernal and provides
interface for security managment, memory management and other low level activities.
• Application Programs − Application softwares/Programs are the one using which a user interacts
with the operating system. For example a word processor to create a document and save it on the
file system, a notepad to create notes etc.
Popular Architectures
Following are various popular implementations of Operating System architectures.
• Simple Architecture
• Monolith Architecture
• Micro-Kernel Architecture
• Exo-Kernel Architecture
• Layered Architecture
• Modular Architecture
• Virtual Machine Architecture
1. Simple Architecture
There are many operating systems that have a rather simple structure. These started as small systems and
rapidly expanded much further than their scope. A common example of this is MS-DOS. It was designed
simply for a niche amount for people. There was no indication that it would become so popular.
Few operating systems have a simple yet powerful architecture, for example, MS-DOS. That would lead to
greater control over the computer system and its various applications. The simple architecture allows the
programmers to hide information as required and implement internal routines as they see fit without
changing the outer specifications.
Advantages
Following are advantages of a simple operating system architecture.
• Easy Development - In simple operation system, being very few interfaces, development is easy
especially when only limited functionalities are to be delivered.
• Better Performance - Such a sytem, as have few layers and directly interects with hardware, can
provide a better performance as compared to other types of operating systems.
Disadvantages
Following are disadvantages of a simple operating system architecture.
• Frequent System Failures - Being poorly designed, such a system is not robust. If one program
fails, entires operating system crashses. Thus system failures are quiet frequent in simple operating
systems.
• Poor Maintainability - As all layers of operating systems are tightly coupled, change in one layer
can impact other layers heavily and making code unmanageable over a period of time.
2. Monolith Architecture
In monolith architecture operating system, a central piece of code called kernel is responsible for all major
operations of an operating system. Such operations includes file management, memory management, device
management and so on. The kernal is the main component of an operating system and it provides all the
services of an operating system to the application programs and system programs.
The kernel has access to the all the resources and it acts as an interface with application programs and the
underlying hardware. A monolithic kernel architecture promotes timesharing, multiprogramming model
and was used in old banking systems.

Advantages
Following are advantages of a monolith operating system architecture.
• Easy Development - As kernel is the only layer to develop with all major functionalities, it is easier
to design and develop.
• Performance - As Kernel is responsible for memory management, other operations and have direct
access to the hardware, it performs better.
Disadvantages
Following are disadvantages of a monolith operating system architecture.
• Crash Prone - As Kernel is responsible for all functions, if one function fails entire operating
system fails.
• Difficult to enhance - It is very difficult to add a new service without impacting other services of
a monolith operating system.
3. Micro-Kernel Architecture
As in case monolith architecture, there was single kernel, in micro-kernel, we have multiple kernels each
one specilized in particular service. Each microkernel is developed independent to the other one and makes
system more stable. If one kernel fails the operating sytem will keep working with other kernel's
functionalities.

Advantages
Following are advantages of a microkernel operating system architecture.
• Reliable and Stable - As multiple kernels are working simultaneously, chances of failure of
operating sytem is very less. If one functionlity is down, operating system can still provide other
functionalities using stable kernels.
• Maintainability - Being small sized kernels, code size is maintainable. One can enhance a
microkernel code base without impacting other microkernel code base.
Disadvantages
Following are disadvantages of a microkernel operating system architecture.
• Complex to Design - Such a microkernel based architecture is difficult to design.
• Performance Degradation - Multi kernel, Multi-modular communication may hamper the
performance as compared to monolith architecture.
4. Exo-Kernel Architecture
Exo-Kernal Architecture operating system was designed and developed at MIT. The aim of this design was
to keep Kernel size minimal while allowing the application programs to manage hardware resources
directly. The purpose of removing abstraction of operating system for hardware resources was to enable
application programmer to write high performance code while exo-kernel handles other operations.
Advantages
Following are advantages of a exo-kernel operating system architecture.
• High Performance - As application program can allocate memory, a better designed code can
make optimal use and perform better.
• Application Control - As resource management is not secured by operating system, application
program has more control over system resources and can write custom operations on system
resources.
Disadvantages
Following are disadvantages of a exo-kernel operating system architecture.
• Unreliable and Unsafe - As security is in application program level, a poorly written code can ruin
the system.
• Complex Design - Exo-Kernel designing is complicated.
5. Layered Architecture
One way to achieve modularity in the operating system is the layered approach. In this, the bottom layer is
the hardware and the topmost layer is the user interface.
An image demonstrating the layered approach is as follows −

As seen from the image, each upper layer is built on the bottom layer. All the layers hide some structures,
operations etc from their upper layers.
One problem with the layered architecture is that each layer needs to be carefully defined. This is necessary
because the upper layers can only use the functionalities of the layers below them.
Advantages
Following are advantages of a layered operating system architecture.
• High Customizable - Being layered, each layer implmentation can be customized easily. A new
functionality can be added without impacting other modules as well.
• Verifiable - Being modular, each layer can be verified and debugged easily.
Disadvantages
Following are disadvantages of a layered operating system Architecture.
• Less Performant - A layered structured operating system is less performant as compared to basic
structured operating system.
• Complex designing - Each layer is to planned carefully as each layer communicates with lower
layer only and a good design process is required to create a layered operating system.
6. Modular Architecture
Modular architecture operating system works on the similar princhiple as a monolith but with better design.
A central kernal is responsible for all major operations of operating system. This kernal has set of core
functionality and other services are loaded as modules dynamically to the kernal at boot time or at runtime.
Sun Solaris OS is one of the example of Modular structured operating system.
Advantages
Following are advantages of a modular operating system architecture.
• High Customizable - Being modular, each module implmentation can be customized easily. A new
functionality can be added without impacting other modules as well.
• Verifiable - Being modular, each layer can be verified and debugged easily.
Disadvantages
Following are disadvantages of a modular operating system architecture.
• Less Performant - A modular architecture operating system is less performant as compared to
basic structured operating system.
• Complex designing - Each module is to planned carefully as each module communicates with
kernal. A communication API is to be devised to facilitate the communication.
7. Virtual Machine Architecture
In this kind of architecture, hardware like CPU, memory, hard disks are abstracted into virtual machines.
User can use them with actually configure them using execution contexts. Virtual machine takes a good
amount of disk space and is to be provisioned. Muliple virtual machines can be created on a single physical
machine.
Advantages
Following are advantages of a virtual machine-based operating system architecture.
• High Customizable - Being virtual, functionality are easily accessible, can be customized on need
basis.
• Secure - Being virtual, and no direct hardware access, such systems are highly secured.
Disadvantages
Following are disadvantages of a virtual machine-based operating system architecture.
• Less Performant - A virtual structured operating system is less performant as compared to modular
structured operating system.
• Complex designing - Each virtual component of the machine is to planned carefully as each
component is to abstract underlying hardware.
What is a Microkernel?
A microkernel is an operating system structure that aims to keep the kernel as small and
lightweight as possible. It provides only essential services, such as process scheduling
and inter-process communication, while moving most non-essential services, like device
drivers, into user space.

What is a Hybrid Kernel?


• A hybrid kernel combines features of both monolithic and microkernels. It includes a
small kernel that handles essential services and basic hardware interactions, while
additional services, such as file systems and device drivers, run in kernel mode but
outside the core kernel.
Operating System Services

In operating system is software that acts as an intermediary between the user and
computer hardware. It is a program with the help of which we are able to run various
applications. It is the one program that is running all the time. Every computer must have
an operating system to smoothly execute other programs.
The OS coordinates the use of the hardware and application programs for various users.
It provides a platform for other application programs to work. The operating system is a
set of special programs that run on a computer system that allows it to work properly. It
controls input-output devices, execution of programs, managing files, etc.

Services of Operating System

1. Program execution
2. Input Output Operations
3. Communication between Process
4. File Management
5. Memory Management
6. Process Management
7. Security and Privacy
8. Resource Management
9. User Interface
10. Networking
11. Error handling
12. Time Management

1. Program Execution

It is the Operating System that manages how a program is going to be executed. It loads
the program into the memory after which it is executed. The order in which they are
executed depends on the CPU Scheduling Algorithms. A few are FCFS, SJF, etc. When
the program is in execution, the Operating System also handles deadlock i.e. no two
processes come for execution at the same time. The Operating System is responsible for
the smooth execution of both user and system programs. The Operating System utilizes
various resources available for the efficient running of all types of functionalities.

2. Input Output Operations

Operating System manages the input-output operations and establishes communication


between the user and device drivers. Device drivers are software that is associated with
hardware that is being managed by the OS so that the sync between the devices works
properly. It also provides access to input-output devices to a program when needed.
3. Communication Between Processes

The Operating system manages the communication between processes. Communication


between processes includes data transfer among them. If the processes are not on the
same computer but connected through a computer network, then also their
communication is managed by the Operating System itself.

4. File Management

The operating system helps in managing files also. If a program needs access to a file, it
is the operating system that grants access. These permissions include read-only, read-
write, etc. It also provides a platform for the user to create, and delete files. The Operating
System is responsible for making decisions regarding the storage of all types of data or
files, i.e, floppy disk/hard disk/pen drive, etc. The Operating System decides how the
data should be manipulated and stored.

5. Memory Management

Let’s understand memory management by OS in simple way. Imagine a cricket team with
limited number of player . The team manager (OS) decide whether the upcoming player
will be in playing 11 ,playing 15 or will not be included in team , based on his
performance . In the same way, OS first check whether the upcoming program fulfil all
requirement to get memory space or not ,if all things good, it checks how much memory
space will be sufficient for program and then load the program into memory at certain
location. And thus , it prevents program from using unnecessary memory.

6. Process Management

Let’s understand the process management in unique way. Imagine, our kitchen stove as
the (CPU) where all cooking(execution) is really happen and chef as the (OS) who uses
kitchen-stove(CPU) to cook different dishes(program). The chef(OS) has to cook
different dishes(programs) so he ensure that any particular dish(program) does not take
long time(unnecessary time) and all dishes(programs) gets a chance to cooked(execution)
.The chef(OS) basically scheduled time for all dishes(programs) to run kitchen(all the
system) smoothly and thus cooked(execute) all the different dishes(programs) efficiently.

7. Security and Privacy

Security : OS keep our computer safe from an unauthorized user by adding security layer
to it. Basically, Security is nothing but just a layer of protection which protect computer
from bad guys like viruses and hackers. OS provide us defenses like firewalls and anti-
virus software and ensure good safety of computer and personal information.
Privacy : OS give us facility to keep our essential information hidden like having a lock
on our door, where only you can enter and other are not allowed . Basically , it respect
our secrets and provide us facility to keep it safe.

8. Resource Management

System resources are shared between various processes. It is the Operating system that
manages resource sharing. It also manages the CPU time among processes using CPU
Scheduling Algorithms. It also helps in the memory management of the system. It also
controls input-output devices. The OS also ensures the proper use of all the resources
available by deciding which resource to be used by whom.

9. User Interface

User interface is essential and all operating systems provide it. Users either interacts with
the operating system through the command-line interface or graphical user interface or
GUI. The command interpreter executes the next user-specified command.
A GUI offers the user a mouse-based window and menu system as an interface.

10. Networking

This service enables communication between devices on a network, such as connecting


to the internet, sending and receiving data packets, and managing network connections.

11. Error Handling

The Operating System also handles the error occurring in the CPU, in Input-Output
devices, etc. It also ensures that an error does not occur frequently and fixes the errors. It
also prevents the process from coming to a deadlock. It also looks for any type of error
or bugs that can occur while any task. The well-secured OS sometimes also acts as a
countermeasure for preventing any sort of breach of the Computer System from any
external source and probably handling them.

12. Time Management

Imagine traffic light as (OS), which indicates all the cars(programs) whether it should be
stop(red)=>(simple queue), start(yellow)=>(ready queue),move(green)=>(under
execution) and this light (control) changes after a certain interval of time at each side of
the road(computer system) so that the cars(program) from all side of road move smoothly
without traffic.

You might also like