Designing a large system is very difficult and also problematic. If the system is divided into components, it makes the system much more effective and separates the tasks. Each part should be a well-defined component. We will now learn the different approaches on which of the components are kept separate and attached to the kernel.
Simple Structure
This was the initially designed structure of the operating system and it was not a well-defined structure. An example of this was the MS-DOS structure where the levels of functionalities which are called modules were not well separated.
This kind of structure was vulnerable to error because if one program crashes, it will cause the whole system to crash.
Layered Structure
In this structure, the operating system is divided into a number of layers from 0 to N. Level 0 contains the hardware, and level n contains the user interface. In a layered structure, each level has its own functionality and can be configured individually. It also removes the problem that was occurring in the previous approach when crashing a program was making the whole system crash.
One of the main advantages of the layered approach is the ease of debugging. As a level is only using the functions of the lower level and upper levels has no effect on it, this makes the debugging easy. Level 0 can be easily debugged because it only involves hardware debugging. Similarly, level 1 can also be easily debugged because as we already checked level 0 has no errors, now we need to only check for level 1 and so other levels can also be easily debugged.
But, this approach also involves some disadvantages. The first one is that designing is a bit complex. Because careful planning is required for designing as each level should only use the functionalities of its lower level. Another disadvantage is that if a system call is made for the lower level then the system call is passed through layers in a top-down approach.
Microkernels
This method involves removing all the components from the kernel and implementing them as system and user-level programs. As a result of this, the kernel becomes small. This small kernel is called a microkernel.
One of the advantages of this approach is that load is removed from the kernel and services are added to the user space. The microkernel also provides more reliability. Also, if a service fails the rest of the system remains untouched.
But still, this model had a disadvantage in that the microkernel suffers performance degradation due to increased system overhead.
Modular Approach
This is the most currently used approach to operating systems.
Here, the kernel contains the set of core components and links to other services of the operating system. Implementing this type of approach allows the kernel to contain the core services as well as other services are implemented dynamically.
For example, the other services are connected to the core kernel in the Solaris operating system as described in the figure below –
So, in this article, we learned about the different designing approaches of the operating system along with their advantages and disadvantages.