Operating System Architecture - Windows, Linux and MacOS


Next >>

Architecture of Linux OS

Linux architecture has kernel mode and user mode. Linux has a monolithic Kernel layer which interacts with the hardware. There are other system libraries and device drivers. System libraries help Software applications to pass instructions to the Kernel or the Device drivers. Device drivers are softwares that interact (take input or provide output or both) with the firmware of the particular device. User mode has applications or tools which in turn interact with Kernel directly or indirectly via system libraries, device drivers. Kernel space is part of the RAM where the Kernel is loaded. Kernel has code which is unique to the hardware platform and code common to all platforms. Kernel also has an interface to handle system calls from user layer.

How does the OS start?

When OS is installed, it is stored on the hard disk, a non-volatile memory. Bootloader is a program that loads the kernel into RAM when the compter is started. Bootloader or bootstrap loader is stored in Read-only-Memory (ROM), EPROM or Flash memory. Bootloader is stored on the ROM on the motherboard. Firmware: Every device such as keyboard, mouse, disk drives have firmwares stored in its own ROM storage. Firmware is a type of logic that hardwires the devices and provides software, an interface to interact with hardware device.

Architecture of Windows NT OS

Windows NT has hybrid Kernel architecture. It has the ability to handle Uni Processor and Symmetric Multi Processors(SMP). In the kernel mode, Windows NT architecture has a Hardware Abstraction Layer(HAL), a simple kernel, and a collection of services called Executive Services. In the user mode, windows NT architecuture has environment subsytem and Integral subsystem.
Environment subsytem
  • In the older versions of Windows NT, Environment subsystem had Win32 subsystem, OS/2 subsystem, and POSIX subsystem.
  • In the newer versions of Windows NT, Environment subsystem has Win32 subsytem and Windows Subsystem for Linux (WSL)
Integral subsystem
  • Integral subsystem has security subsystem, workstation service and server service.
  • Security subsystem grants or denies users access to file or other resources and takes care user login authentication and logout.
  • Workstation service lets the OS to access file and printer across the network.
  • Server service lets the files and printers and resources in the machine to be accessed by external systems

How does windows architecture differs from windows NT architecture?

  • Windows (Windows 1,2,3, Windows 95,Windows 98 and Windows ME) architecture had a monolithic kernel architecture.
  • Windows NT (windows 2000, Windows XP, Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10) has a hyrbid architecture. Hybrid architecture tries to get the best features of both monolithic kernel as well as microkernel.

Architecture of MacOS

macOS has a hybrid kernel. OS has the following components - Kernel and Device Drivers, Core OS, Core Services, Media and Cocoa Application. Kernel and Device drivers include handling the hardware, RAM, disk drives, file system, networking, POSIX thread support and BSD sockets.
Core OS include
  • Graphics,
  • image processing,
  • Information about Users / Groups / Printers and Network computers,
  • handling mounting and unmouting storage volumes,
  • parallel processing,
  • increasing performance of processes and
  • sharing of system resources to other machines across the network and
  • accessing shared resources over the network.

Architecture of Android

Androd OS includes the following components:

  • Linux Kernel
  • Hardware Abstraction Layer
  • Android Runtime
  • Native C/C++ libraries
  • Java API framework
  • System Apps
Linux Kernel
Android has modified Linux kernel which has several hardware drivers one for each device: keypad, camera, audio, bluetooth, WiFi, Display, USB, Shared memory, flash memory, IPC driver and Power management

Hardware Abstraction Layer
HAL provides a way for developers to link Android OS to access the hardware of choice. Developers must implement HAL and device drivers
HAL is for each of the devices - Camera HAL, Automative HAL, TV HAL, Bluetooth HAL, Input HAL, Storage HAL, Digital Rights Management (DRM) HAL, Audio HAL, Graphics HAL, Sensors HAL, Storage HAL and other HAL.

Android Runtime
Android Runtime (ART) is the application runtime of the Android operating system. ART converts the bytecode into native instructions. Android runtime takes care of Ahead-of-time(AOT) compilation, Garbage collection, Support for development, debugging, and detailed exception and crash reports

Native C/C++ libraries
Android runtime and Android system components are written in Native Libraries. Android provides
  • Java Framework API to expose these Native Libraries
  • Android NDK which is C/C++ API to access these Native Libraries
Using Android NDK, you can directly access Native platform libary.

Java API framework
  • View System - to create UI components like text box, list
  • Resource Manager - to provide access non-code resources and static content like images and strings
  • Notification Manager - to display notifications in the status bar
  • Activity Manager - manages lifecyle of apps and keeps a stack of activities
  • Content Providers- enables apps to access data from other apps
  • System Apps - apps placed under /system/app folder. These apps provide functionalities like contacts, SMS, Email, voice call. These system apps cannot be uninstalled. Most system apps do not have special preference over other apps meaning any app providing the functionality can be the default app. For example, you can have a third-party contact manager, third party sms app, third party file manager, third party email manager

Architecture of Symbian OS

Symbian is no longer in development. Symbian was the most popular mobile operating system until 2010 until the smartphones came in the market. Symbian OS was used on Nokia, Samsung, Motorola, Sony Ericsson, Fujitsu, Sharp and Mitsubhishi. Symbian OS had a microkernel architecture.

Architecture of Fuchsia

Google Fuchsia is a operating system which is currently in development and can be a mobile operating system or may develop into a desktop operating system which is yet to be seen.
  • Fuchsia is based on a derived version of Little Kernel named Zircon. Zircon is a microkernel.
  • Fuchsia OS has support for Flutter framework, Android Framework and Python to run various applications that use the respective framework.
  • Fuchsia OS code is maintained in GitHub repository.


Next >>