Depending on the study, we have the following structures in the operating system:
Simple
It is the most basic and poorly defined operating system structure, and it is only suitable for tiny and constrained systems. Because the interfaces and functional levels are clearly divided in this structure, programs can access I/O routines, which may lead to unauthorized access to I/O routines. One example of such an operating system is MS-DOS. Application programs can access the basic I/O routines in MS-DOS. If one of the user programs on these kinds of operating systems malfunctions, the entire system crashes.
Advantages
- Easy Development: Development is simple in systems with few interfaces and a simple operating system, especially when only a small number of functionalities are required.
- Better Performance: Compared to other kinds of operating systems, such a system can perform better because it has fewer layers and interacts directly with hardware.
Disadvantages
- Frequent System Failures: An inadequately thought out system lacks resilience. The operating system crashes when one program malfunctions. System failures are therefore rather common in basic operating systems.
- Poor Maintainability: Because operating systems’ layers are all closely related, changes made to one can have a significant effect on others and eventually render code unmanageable.
Monolithic Structure
An operating system (OS) on a computer is powered by its kernel. All other components of the system receive fundamental services from the kernel. It acts as the main point of contact between the hardware and the operating system. In systems that are monolithic, kernels have direct access to all operating system resources, including hardware components such as keyboards and mice.
The monolithic operating system is also known as the monolithic kernel. By multiprogramming, batch processing and time-sharing optimize a processor’s usability. By operating on top of the operating system and managing every piece of hardware, the monolithic kernel performs the functions of a virtual machine. This antiquated operating system, which allows multiple users at different terminals to access the Operating System, was utilized in banks to carry out insignificant tasks like batch processing and time-sharing.
Advantages
- 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 has direct access to the hardware, it performs better.
Disadvantages
- Crash Prone: As Kernel is responsible for all functions, if one function fails the 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 Structure
The operating system is designed by the Micro-Kernel structure, which eliminates all of the kernel’s unnecessary parts. These optional kernel parts are implemented as user programs and systems. These systems are therefore referred to as micro-kernels.
Every Micro-Kernel is created separately and kept apart from the others. As a result, the system is more trustworthy and secure. When a Micro-Kernel malfunctions, the rest of the operating system is unaffected and continues to function normally.
Advantages
- It makes the operating system portable to various platforms.
- As microkernels are small so these can be tested effectively.
Disadvantages
- Increased level of inter module communication degrades system performance.
Hybrid-Kernel Structure
The components of both monolithic and microkernel structures are combined in a hybrid kernel structure. A tiny microkernel at the center of the hybrid kernel handles crucial functions like inter-process communication (IPC), memory management, and process scheduling. Additional operating system services are implemented as user space modules.
This strategy seeks to combine the benefits of a microkernel’s stability and modularity with the performance advantages of a monolithic kernel.
Advantages
- It offers good performance as it implements the advantages of both structures in it.
- It supports a wide range of hardware and applications.
- It provides better isolation and security by implementing a micro-kernel approach.
- It enhances overall system reliability by separating critical functions into micro-kernel for debugging and maintenance.
Disadvantages
- It increases the overall complexity of a system by implementing both structure (monolithic and micro) and making the system difficult to understand.
- The layer of communication between the micro-kernel and other components increases time complexity and decreases performance compared to monolithic kernels.
Also Read: OS Interview Questions
Exo-Kernel Structure
An operating system kernel known as an exokernel only offers the most fundamental functions, like memory management and communication. User-level processes handle the provision of all other services. Because of this, exokernel systems are very flexible and modular, but they are also difficult to implement.
An alternative operating system architecture that differs greatly from conventional monolithic or microkernel architectures is the exokernel structure. An exokernel is a kernel that exposes hardware resources directly to applications and offers a minimal interface for those applications to manage.
Advantages
- Support for improved application control.
- Separates management from security.
- It improves the performance of the application.
- A more efficient use of hardware resources is made possible by accurate resource allocation and revocation.
- It is simpler to test and create new operating systems.
- Each user-space program is allowed to use a custom memory management system.
Disadvantages
- A decline in consistency.
- Exokernel interfaces have a complex architecture.
Layered Structure
The operating system is separated into levels or layers in this kind of structure. The user interface is on layer N, the top layer, and the hardware is on layer 0, or the bottom layer. The top-level layers of these layers utilize the functionalities of their lower-level levels in a hierarchical arrangement.
Each layer’s functionalities are separated in this method, and abstraction is also offered. Since layered structure is a hierarchical model, debugging is made simpler by checking the upper layer after all lower-level layers have been debugged. Thus, only the current layer needs to be checked; all other layers have already been examined.
Modular Structure
An operating system that has a modular structure is separated into a number of separate modules. Every module is in charge of a particular function, like device drivers, process scheduling, or memory management. Modules can dynamically load and unload as required.An operating system that has a modular structure is separated into a number of separate modules. Every module is in charge of a particular function, like device drivers, process scheduling, or memory management. Modules can dynamically load and unload as required.
Virtual Machines
Multiple operating systems can run concurrently on a single physical machine thanks to a technology called virtual machines, or VMs. With its own operating system and set of apps, every virtual machine functions as a separate, isolated system.