Structures of Operating System

Structures of Operating System

Operating System Structures Overview

Introduction to Operating System Structures

  • The lecture focuses on the structures of operating systems, building upon previous discussions about multi-programming and multitasking systems.
  • Operating systems are complex systems that require careful engineering for proper functionality and ease of modification.
  • Various structures have been used in designing operating systems over time, which will be explored along with their advantages and disadvantages.

Simple Structure of Operating Systems

  • The simple structure was prevalent in early operating systems, characterized by a lack of well-defined architecture.
  • An example is MS-DOS, which follows a simple structure where ROM BIOS device drivers form the base hardware layer.
  • In this structure, application programs can directly access basic hardware without going through intermediary layers, leading to potential vulnerabilities.

Limitations of Simple Structure

  • The direct access to hardware by application programs means that if one program fails, it can crash the entire system due to lack of protection.
  • This vulnerability arises because all layers above the base hardware have unrestricted access, making it poorly structured and defined.
  • MS-DOS was developed on Intel 8088 architecture, which lacked dual mode or hardware protection mechanisms.

Monolithic Structure in Unix Systems

  • Transitioning from simple structures, monolithic structures were adopted by earlier Unix operating systems.
  • In a monolithic structure, all functionalities are packed into one kernel level beneath user interfaces like shells and commands.
  • The kernel encompasses various functions such as CPU scheduling and file system management but suffers from implementation challenges due to its complexity.

Challenges with Monolithic Structure

  • Having too many functions within a single kernel complicates maintenance; changes often require modifications across the entire kernel.

Understanding Operating System Structures

Monolithic Structure

  • The monolithic structure has disadvantages, such as difficulty in adding new features due to its packed nature. This structure is simple and limited, exemplified by earlier operating systems like Unix.

Layered Structure

  • To address the disadvantages of monolithic structures, a layered structure was introduced, dividing the operating system into multiple layers for better organization.
  • In this layered approach, the lowest layer (layer zero) consists of hardware, with subsequent layers up to the user interface at the top. This separation allows for distinct functionalities within each layer.
  • One major advantage of the layered structure is ease of implementation and debugging; issues can be isolated to specific layers rather than requiring a comprehensive review of the entire system.
  • However, designing a layered structure poses challenges; careful consideration is needed to determine which layers interact with one another effectively.
  • Efficiency can also be an issue since requests from higher layers must traverse through all lower layers sequentially before reaching hardware services, potentially causing delays.

Advantages and Disadvantages of Layered Structure

  • A key benefit is that hardware access is protected from upper layers; unlike in monolithic systems where direct access may occur, here it requires passing through several protective layers.

Microkernel Approach

  • The microkernel architecture aims to reduce kernel size by removing non-essential components and implementing them as user-level programs instead.
  • The microkernel focuses on core functionalities while delegating other services like device drivers and file servers to user-level programs above it.

Microkernel and Modular Operating System Design

Microkernel Approach

  • The microkernel architecture allows client programs to request services, with the microkernel facilitating communication between these clients and system programs that provide the requested services.
  • Communication in this model is achieved through message passing, which will be explored in detail later in the lecture series.
  • Most functions operate in user mode rather than kernel mode, reducing the risk of a complete system crash if a program fails while executing.
  • If a program crashes in user mode, it does not affect the entire system; however, failures in kernel mode can lead to total system failure. This highlights an advantage of the microkernel approach.
  • A disadvantage of microkernels is potential performance degradation due to increased overhead from message passing required for inter-process communication.

Advantages and Disadvantages of Microkernels

  • While microkernels enhance stability by running most functionalities in user mode, they may suffer from decreased performance due to constant message passing overhead.

Modular Operating System Design

Overview of Modules

  • The modular approach structures operating systems using object-oriented programming techniques, creating a modular kernel with core functionalities and additional features as loadable modules.
  • Functionalities such as device drivers, scheduling classes, file systems, and more can be dynamically loaded into the kernel at boot or runtime as needed.

Comparison with Layered Systems

  • The modular structure resembles layered approaches but offers greater flexibility since any module can directly communicate with others without traversing intermediary layers.
  • In layered systems, communication requires going through all intervening layers (e.g., layer one must go through layers two and three to reach layer four), whereas modules can interact directly via the core kernel.

Advantages Over Microkernels

  • Unlike microkernels that rely on message passing for inter-module communication (leading to overhead), modules are loaded directly into the core kernel when necessary, eliminating this overhead.
Video description

Operating System: Structures of Operating System Topics discussed: STRUCTURES OF OPERATING SYSTEM: 1. Simple Structure. 2. Monolithic Structure. 3. Layered Structure. 4. Microkernels. 5. Modules. Follow Neso Academy on Instagram: @nesoacademy (https://bit.ly/2XP63OE) Contribute: http://bit.ly/3EpZgBD Memberships: https://bit.ly/2U7YSPI Discord: https://bit.ly/3HiGtJr WhatsApp: https://whatsapp.com/channel/0029Va9B1Bq4tRru0nqgtx3h Books: https://bit.ly/4cZYQil Website ► https://www.nesoacademy.org/ App ► https://play.google.com/store/apps/details?id=org.nesoacademy Facebook ► https://www.facebook.com/nesoacademy Twitter [X] ► https://x.com/nesoacademy Music: Axol x Alex Skrindo - You [NCS Release] #OperatingSystemByNeso #os #OperatingSystem #OperatingSystemStructure