
Introduction
We all know that an operating system is the most important software that runs on a computer. It manages the computer's memory, processes, software, and hardware. It acts as the interface between the user and the computer system and helps the user to communicate with the computer. OS can be classified into many types based on its architecture. In this blog, we will discuss two important architectures: monolithic and layered OS. We will also see what these are and the key differences between them.
Also see, Multiprogramming vs Multitasking And Open Source Operating System
What is a Monolithic Operating System?
In this operating system, all the major components of the OS are located in the kernel space( it is a computer program at the core of OS). The kernel controls all the major features like memory management, process management, file management, and device management. It is a straightforward and vintage operating system that was first introduced in 1970. It was then used for small work like batch processing and time-sharing. Now let's discuss its architecture.
There are mainly three layers in a monolithic operating system: hardware, application, and monolithic kernel. As discussed above, the kernel handles the OS services like CPU scheduling, memory management, etc. The application requests services from the kernel; system calls do it. When an application requests a service hardware address space, the application switches to the hardware address of the OS; these operating systems also have a high-level virtual interface over computer hardware. Now let's discuss what its advantages and disadvantages are:
Advantages
Fast
Monolithic operating systems are fast. Thus, they provide better process scheduling, memory management, file management, etc.
Direct Interaction between Components
All the components and the kernel can directly interact. It also helps in gaining a better speed.
Easy and Simple
Its structure is easy and simple as all the components are located in the same address space.
Better for Smaller Tasks
Monolithic OS works better for handling smaller tasks.
Disadvantages
Prone to Errors
Monolithic OS can generate errors and bugs in the system. It is because user programs use the same address space as the kernel.
Difficult to Update
In monolithic OS, all the OS code is in a single big chunk; therefore, it is difficult to add or remove features in the OS.
Not Portable
The code written in monolithic OS is difficult to carry with or transfer to another system: this is because all the code works in a big chunk only, and you have to move it all.
You can also read about the Multilevel Feedback Queue Scheduling.