Monolithic structure in the operating system
The monolithic operating system is an extremely simple operating system in which the kernel is completely responsible for managing files, memory, devices, and processes. The kernel has access to all of the system's resources. In monolithic systems, the kernel houses all of the operating system's components. The 1970s marked the introduction of operating systems with a monolithic architecture.
Alternatively called the monolithic kernel, the monolithic operating system has both names. A modest operation like batch processing or time-sharing in banks is carried out using this outdated operating system. Each piece of hardware is managed by the monolithic kernel, which functions as a virtual machine. Unlike a microkernel, which can only do certain functions, it is different. User space and kernel space are the two compartments of a microkernel. IPC (inter-process communication) is the method used by both components to talk to one another. The benefit of a microkernel is that if one server crashes, the other server takes over.
Monolithic kernel:
Monolithic kernels are a different classification of kernels. The only difference between this one and the microkernel is that user services and kernel services are implemented in the same address space. This one manages system resources between software and hardware. The kernel's expansion causes the operating system's size to increase as well. This kernel provides elements of the operating system such as memory management, file management, CPU scheduling, and others via system calls. Operating system execution is sped up because both services are implemented inside the same address area.
Advantages of the monolithic kernel:
There are several advantages of the monolithic kernel. Some main advantages of the monolithic kernel are as follows:
- The monolithic kernel runs relatively quickly because all services, including memory management, file management, process scheduling, etc., are implemented inside the same address area.
- In the monolithic kernel, a process operates entirely in a single address space.
- A static, single-binary file serves as the monolithic kernel.
Disadvantages of the monolithic kernel:
There are several disadvantages of the monolithic kernel. Some main disadvantages of the monolithic kernel are as follows:
- This kernel's disadvantage is that if any service fails, the entire system crashes. If the user adds a new service, the complete operating system has to be changed.
- Should the user need to create a new service. The user must do so to change the operating system as a whole.
Monolithic kernel Architecture:
The operating system architecture's monolithic design does not specifically account for the unique characteristics of the operating system. Although the architecture follows to the separation of concerns, no effort is taken to limit the privileges assigned to the various components of the operating system. Maximum privileges are granted for the complete operating system to operate. The monolithic operating system has the same, generally minimal communication overhead as any other piece of software.
- The application area and system variables are where the 16-bit address space in CP/M begins. CCP (Console Command Processor), BDOS (Basic Disc Operating System), and BIOS (Basic Input Output System) are the final three components of the operating system.
- The array of interrupt vectors and the system variables are the first two things in DOS's 20-bit address space. The resident DOS portion and the application area are the third and fourth, while the memory block utilized by the video card and BIOS is the last thing in the address space.
Advantages of monolithic kernel architecture:
There are several advantages of the monolithic kernel architecture. Some main advantages of the monolithic kernel architecture are as follows:
- Simple, straightforward construction.
- Faster execution because all services are directly accessible.
Disadvantages of monolithic kernel architecture:
There are several disadvantages of the monolithic kernel architecture. Some main disadvantages of the monolithic kernel architecture are as follows:
- It's quite tough to add new features or get rid of old ones.
- Security errors are always present because there is no separation between the many servers that are present in the kernel.
Key differences between monolithic kernel and monolithic kernel architecture are:
- System services: All system services in a monolithic kernel operate in kernel space, whereas in a microkernel, only the most fundamental services (such as memory management and process scheduling) do so, with all other services operating in user space.
- Performance: Due to the lack of a cost involved with transferring data between kernel space and user space, monolithic kernels are typically quicker and more effective than microkernels.
- Microkernels are more modular than monolithic kernels due to the division of services into distinct processes that operate in user space. It makes it simpler to add or delete services without having an impact on other system components.
- Micro kernels are typically thought of as being more secure than monolithic kernels since a flaw or vulnerability in a service that runs in user space is less likely to have an impact on the entire system.
- Because all system services are included and share the same memory space, designing a monolithic kernel is typically easier and quicker than developing a microkernel.
Monolithic system:
Modularity in operating systems occurs at the binary level rather than the architectural level. It's critical to distinguish between server-client operating systems and structurally modular monolithic operating systems, which make use of microkernels and servers. Hybrid kernels are a common name for these variations. In terms of practicality, restarting with a different operating system image is just a less flexible method of handling the operating system image during runtime. The modules make it straightforward to add functionality to operating systems as needed. Dynamically loadable modules incur some cost as compared to integrating the module into the operating system image.
Features of the monolithic system:
There are several features of the monolithic system. Some main features of the monolithic system are as follows:
- Simple architecture: The architecture of this type of operating system is simple. The kernel already includes every part required for processing.
- Functions well for smaller jobs: It performs better for smaller tasks because it can manage few resources.
- All of the components are capable of direct communication with both the kernel and each other.
- Faster operating system: Fast and reliable code is used to create monolithic kernels.
A monolithic kernel and a microkernel differ in the following ways:
An operating system kernel type that enables customization is the microkernel. It operates in privileged mode and offers inter-process communication (IPC) and low-level address space management. The microkernel is also topped by OS services, including the file system, virtual memory management, and CPU scheduler. It needs its own address space to make each service secure. In addition, each application has its own address space. As a result, programs, OS Services, and kernels are all protected.
One more category for the kernel is monolithic. Each program has its own address space in monolithic kernel-based systems. Although user services and kernel services are implemented inside the same address space, this kernel controls system resources between applications and hardware. As a result, the operating system's size also grows, as does the kernel.
Micro kernels are distinguished by their modularity, simplicity, and security, whereas monolithic kernels are distinguished by their tight integration of system functions and excellent performance. The particular demands and specifications of the operating system that is being created determine whether the monolithic or microkernel architecture should be used.
Head-to-head comparison between Monolithic Kernel and Microkernel
Features | Monolithic Kernel | Microkernel |
Definition | Operating systems can have a form of kernel called a monolithic kernel, which houses all of the system's code in the kernel area. | For the purpose of implementing an operating system, a microkernel is a form of kernel that offers low-level thread management, address space management, and inter process communication. |
Security | Because the OS and the user were in the same address space when the process or service crashed, the entire system crashed. | There is no impact on microkernel development if the service crashes. |
Address space | The same address space is used by kernel services as well as user services in a monolithic kernel. | Services in the microkernel are stored in distinct address spaces from kernel services. |
Size | Since the OS and the user share the same address space, the size is larger. | Smaller |
Customization | It is challenging to integrate new features into the monolithic kernel. As a result, it cannot be modified. | The microkernel can accommodate new features more easily. It may be customized considerably as a result. |
OS Services | In a system with a single monolithic kernel, the OS services are built into the kernel. | The kernel and OS services are separated in a system with a microkernel. |
Code | A monolithic kernel may be written with less code. | A microkernel has to be written with more code. |
Extendible | Complex to extend | Easily extendible |
Platform independence | Direct hardware access results in less portability. | More transportable since the majority of drivers and services operate in user space. |
Example | Linux, FreeBSD, OpenBSD, NetBSD, Microsoft Windows (95, 98, Me), Solaris, HP-UX, DOS, OpenVMS, XTS-400, etc. | QNX, Symbian, L4L.inux, Singularity, K42, Mac OS X, Integrity, PikeOS, HURD, Minix, and Coyotos. |
Performance | The performance of the monolithic kernel is high since there is minimal overhead and direct function calls. | The microkernel's performance is lower because of message forwarding and increased overhead. |