”;
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
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.
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.
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.
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.
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.
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.
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.
”;