Javatpoint Logo
Javatpoint Logo

Monolithic Structure of Operating System

The monolithic operating system is a very basic operating system in which file management, memory management, device management, and process management are directly controlled within the kernel. The kernel can access all the resources present in the system. In monolithic systems, each component of the operating system is contained within the kernel. Operating systems that use monolithic architecture were first time used in the 1970s.

The monolithic operating system is also known as the monolithic kernel. This is an old operating system used to perform small tasks like batch processing and time-sharing tasks in banks. The monolithic kernel acts as a virtual machine that controls all hardware parts.

It is different from a microkernel, which has limited tasks. A microkernel is divided into two parts, kernel space, and user space. Both parts communicate with each other through IPC (Inter-process communication). Microkernel's advantage is that if one server fails, then the other server takes control of it.

Monolithic kernel

A monolithic kernel is an operating system architecture where the entire operating system is working in kernel space. The monolithic model differs from other operating system architectures, such as the microkernel architecture, in that it alone defines a high-level virtual interface over computer hardware.

A set of primitives or system calls implement all operating system services such as process management, concurrency, and memory management. Device drivers can be added to the kernel as modules.

Advantages of Monolithic Kernel

Here are the following advantages of a monolithic kernel, such as:

  • The execution of the monolithic kernel is quite fast as the services such as memory management, file management, process scheduling, etc., are implemented under the same address space.
  • A process runs completely in single address space in the monolithic kernel.
  • The monolithic kernel is a static single binary file.

Disadvantages of Monolithic Kernel

Here are some disadvantages of the monolithic kernel, such as:

  • If any service fails in the monolithic kernel, it leads to the failure of the entire system.
  • The entire operating system needs to be modified by the user to add any new service.

Monolithic System Architecture

A monolithic design of the operating system architecture makes no special accommodation for the special nature of the operating system. Although the design follows the separation of concerns, no attempt is made to restrict the privileges granted to the individual parts of the operating system. The entire operating system executes with maximum privileges. The communication overhead inside the monolithic operating system is the same as that of any other software, considered relatively low.

Monolithic Structure of Operating System

CP/M and DOS are simple examples of monolithic operating systems. Both CP/M and DOS are operating systems that share a single address space with the applications.

  • In CP/M, the 16-bit address space starts with system variables and the application area. It ends with three parts of the operating system, namely CCP (Console Command Processor), BDOS (Basic Disk Operating System), and BIOS (Basic Input/Output System).
  • In DOS, the 20-bit address space starts with the array of interrupt vectors and the system variables, followed by the resident part of DOS and the application area and ending with a memory block used by the video card and BIOS.

Advantages of Monolithic Architecture:

Monolithic architecture has the following advantages, such as:

  • Simple and easy to implement structure.
  • Faster execution due to direct access to all the services

Disadvantages of Monolithic Architecture:

Here are some disadvantages of monolithic architecture:

  • The addition of new features or removal of obsolete features is very difficult.
  • Security issues are always there because there is no isolation among various servers present in the kernel.

Modular Monolithic Systems

Modular operating systems and most modern monolithic operating systems such as OS-9 OpenVMS, Linux, BSD, SunOS, AIX, and MULTICS can dynamically load (and unload) executable modules at runtime.

This modularity of the operating system is at the binary level and not at the architecture level. Modular monolithic operating systems are not confused with the architectural level of modularity inherent in server-client operating systems (and its derivatives sometimes marketed as the hybrid kernel) that use microkernels and servers.

Practically, dynamically loading modules is simply a more flexible way of handling the operating system image at runtime instead of rebooting with a different operating system image. The modules allow easy extension of the operating systems' capabilities as required. Dynamically loadable modules incur a small overhead when compared to building the module into the operating system image.

However, in some cases, loading modules dynamically helps keep the amount of code running in kernel space to a minimum. For example, to minimize operating system footprint for embedded devices or those with limited hardware resources. Namely, an unloaded module need not be stored in scarce random access memory.

Limitations of Monolithic System

The monolithic operating system has the following limitations, such as:

  • Code written in this operating system (OS) is difficult to port.
  • Monolithic OS has more tendencies to generate errors and bugs. The reason is that user processes use the same address locations as the kernel.
  • Adding and removing features from monolithic OS is very difficult. All the code needs to be rewritten and recompiled to add or remove any feature.

Features of Monolithic System

The monolithic operating system provides the following features to the users, such as:

  1. Simple structure: This type of operating system has a simple structure. All the components needed for processing are embedded into the kernel.
  2. Works for smaller tasks: It works better for performing smaller tasks as it can handle limited resources.
  3. Communication between components: All the components can directly communicate with each other and also with the kernel.
  4. Fast operating system: The code to make a monolithic kernel is very fast and robust.

Difference between Monolithic Kernel and Microkernel

A kernel is the core part of an operating system, and it manages the system resources. A kernel is like a bridge between the application and hardware of the computer. The kernel can be classified further into two categories, Microkernel and Monolithic Kernel.

The microkernel is a type of kernel that allows customization of the operating system. It runs on privileged mode and provides low-level address space management and Inter-Process Communication (IPC). Moreover, OS services such as file system, virtual memory manager, and CPU scheduler are on top of the microkernel. Each service has its own address space to make them secure. Besides, the applications also have their own address spaces. Therefore, there is protection among applications, OS Services, and kernels.

A monolithic kernel is another classification of the kernel. In monolithic kernel-based systems, each application has its own address space. Like microkernel, this one also manages system resources between application and hardware, but user services and kernel services are implemented under the same address space. It increases the size of the kernel, thus increases the size of the operating system as well.

Monolithic Structure of Operating System

This kernel provides CPU scheduling, memory management, file management, and other system functions through system calls. As both services are implemented under the same address space, this makes operating system execution faster. Below are some more differences between Microkernel and Monolithic kernel, such as:

Terms Monolithic Kernel microkernel
Definition A monolithic kernel is a type of kernel in operating systems where the entire operating system works in the kernel space. A microkernel is a kernel type that provides low-level address space management, thread management, and interprocess communication to implement an operating system.
Address space In a monolithic kernel, both user services and kernel services are kept in the same address space. In microkernel user services and kernel, services are kept in separate address spaces.
Size The monolithic kernel is larger than the microkernel. The microkernel is smaller in size.
Execution It has fast execution. It has slow execution.
OS services In a monolithic kernel system, the kernel contains the OS services. In a microkernel-based system, the OS services and kernel are separated.
Extendible The monolithic kernel is quite complicated to extend. The microkernel is easily extendible.
Security If a service crashes, then the whole system crashes in a monolithic kernel. If a service crashed, it does not affect the working of the microkernel.
Customization It is difficult to add new functionalities to the monolithic kernel. Therefore, it is not customizable. It is easier to add new functionalities to the microkernel. Therefore, it is more customizable.
Code Less coding is required to write a monolithic kernel. A microkernel is required more coding.
Example Linux, FreeBSD, OpenBSD, NetBSD, Microsoft Windows (95, 98, Me), Solaries, HP-UX, DOS, OpenVMS, XTS-400, etc. QNX, Symbian, L4L.inux, Singularity, K42, Mac OS X, Integrity, PikeOS, HURD, Minix, and Coyotos.






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA