Operating-system structure refers to the organization of an operating system's components and how they interact with each other. Over the years, operating system structures have evolved from simple designs to more modular, complex ones, each with trade-offs regarding performance, maintainability, and flexibility.
The design structure is often influenced by the target platform, goals of the OS (e.g., performance, security, extensibility), and the hardware it is designed to run on.
2.7.1 Simple Structure
In the early days of computing, many operating systems were designed with a simple and monolithic structure. These systems often lacked well-defined separation between system components, which led to limited functionality and poor security.
Example: MS-DOS MS-DOS (Microsoft Disk Operating System) is an example of an operating system with a simple structure. MS-DOS had minimal separation between user programs and the operating system kernel. As a result, applications could directly access hardware resources, which was both a strength and a weakness:
- Strength: This provided fast access to hardware for programs.
- Weakness: There were few protections against user programs causing system crashes or corrupting the system, as there was little distinction between user space and kernel space.
MS-DOS Layer Structure:
- The system was a single layer, with no distinct separation between user-level processes and the kernel. Applications had direct access to I/O operations and hardware resources, making it easier to develop but prone to errors and system crashes when user programs failed.
2.7.2 Layered Approach
To address the limitations of simple structures, the layered approach was introduced. In this design, the operating system is divided into layers or modules, each of which has a specific responsibility. This results in a more organized structure, improving maintainability and stability.
Benefits:
- Modularity: Layers can be developed and tested independently.
- Better Control: With appropriate hardware support, the OS can better control applications and system resources.
- Flexibility: The system is easier to maintain, and changes in one layer typically don't affect others.
Example: In a layered operating system:
- The lowest layer might interact directly with hardware.
- Higher layers provide services like file management, user interface, and network communication.
This approach, however, may have a slight performance overhead due to additional abstraction layers between hardware and user applications.
2.7.3 Microkernels
The microkernel architecture is a design where the operating system kernel is reduced to its minimal functionality. The kernel only handles essential services such as memory management, process scheduling, and communication between processes. Other services, like device drivers, file systems, and networking, are implemented in user space.
Benefits:
- Modularity: Non-essential services run as user-space processes, making it easier to update or replace them without modifying the core kernel.
- Stability and Security: If a user-space process crashes, it does not affect the kernel, which ensures better stability.
- Isolation: It provides a stronger isolation between services, leading to fewer security risks.
Challenges:
- Performance: The overhead of inter-process communication (IPC) between the kernel and user-space services can reduce system performance compared to monolithic kernels.
Example: The Mach microkernel used in macOS and other systems is a popular implementation of the microkernel architecture. Mach provides essential services like memory management, thread scheduling, and IPC, while other system services (such as device drivers and file systems) run outside the kernel in user space.
2.7.4 Modules
The modular kernel design has become a popular approach, combining the advantages of microkernels and monolithic kernels. In this approach, the kernel consists of a small core with the ability to load additional modules or services dynamically during runtime.
Benefits:
- Flexibility: New functionality can be added without recompiling the entire kernel. For example, you can load new drivers or features as modules when needed.
- Performance: Core kernel functions remain in a monolithic structure, which offers better performance compared to a microkernel, but additional services can be loaded dynamically to maintain modularity.
Examples:
- Linux: The Linux kernel uses a modular approach where additional features, such as device drivers or filesystems, are implemented as loadable kernel modules.
- Windows: Windows also supports loadable kernel modules to extend its functionality without modifying the core kernel.
2.7.5 Hybrid System
Hybrid systems combine features from different operating-system structures to balance performance, flexibility, and security. They might incorporate the efficiency of monolithic kernels with the modularity of microkernels, allowing for a more tailored solution depending on the operating system's needs.
Benefits:
- Performance: The monolithic parts of the kernel provide high performance.
- Modularity and Extensibility: The modular aspects allow for dynamic extensions and flexibility.
Examples of hybrid systems include:
- Linux: It is generally a monolithic kernel, but it supports loadable modules, making it hybrid in nature.
- Windows: Windows is primarily monolithic but also includes elements of microkernel-like subsystems that run in user mode, such as the Windows Subsystem for Linux (WSL).
Structure of three hybrid systems: the Apple Mac OS X operating system and the two most prominent mobile operating systems—iOS and Android.
2.7.5.1 Mac OS X
Mac OS X uses a hybrid operating system structure, combining elements of the Mach microkernel and BSD UNIX kernel. The architecture includes several layers:
- User Interface Layer: The Aqua graphical user interface (GUI) sits on top and includes the Cocoa environment for Objective-C programming.
- Kernel Layer:
- Mach: Handles memory management, thread scheduling, and communication between processes.
- BSD: Provides networking, file system, and POSIX APIs.
- Device Drivers: Managed by an I/O kit for device driver development.
- Dynamic Modules: The system supports dynamically loadable kernel extensions (e.g., device drivers).
Mac OS X is an example of a hybrid system where the Mach microkernel and BSD components work together to offer a robust and flexible system. The combination allows for powerful, efficient kernel functionality while providing a user-friendly interface and modularity for extensibility.

2.7.5.2 iOS
iOS, like macOS, is based on a hybrid kernel architecture, leveraging the Darwin kernel (a derivative of BSD and Mach). However, it is specifically optimized for mobile devices:
- iOS uses a monolithic kernel for better performance on limited mobile resources, while providing support for user-space components such as application services and device drivers.
- The kernel includes Mach for process management and memory, while BSD provides file system and network services.
2.7.5.3 Android
Android is based on a hybrid operating system model that uses the Linux kernel as its core. Android combines elements of monolithic and modular design:
- The Linux kernel provides basic services such as hardware abstraction, memory management, and process scheduling.
- Android adds higher-level services and APIs on top of the kernel, such as the Dalvik Virtual Machine (DVM) (now replaced by ART, Android Runtime) for running applications, and application frameworks that provide functionality like activity management, telephony services, and graphics.
Android's architecture uses a monolithic kernel for core services but builds a modular user-space layer for device management, apps, and communication with external hardware.

Conclusion
The structure of operating systems has evolved significantly over the years, from simple, monolithic systems like MS-DOS to sophisticated hybrid structures that combine elements of microkernels, monolithic kernels, and modular components.
The design choices depend on the operating system's target use cases, with trade-offs between performance, security, flexibility, and ease of maintenance.
Modern systems such as Linux, macOS, iOS, and Android combine different structural models to optimize performance and functionality, creating hybrid systems that balance efficiency and modularity.