Operating System Structure
MOST OS TAKE A HYBRID APPROACH IN USING MIXING DIFFERENT APPROACHES
Various ways to structure OS:
- Simple structure – MS-DOS
- More complex – UNIX
- Layered – an abstraction
- Microkernel – Mach
Original UNIX

- UNIX – limited by hardware functionality, the original UNIX operating system had limited structuring.
- The UNIX OS consists of two separable parts
- Systems programs
- The kernel:
- Consists of everything below the system-call interface and above the physical hardware
- Provides the file system, CPU scheduling, memory management, and other operating system functions; a large number of functions for one level
Linux approach

Layered Approach

- The operating system is divided into a number of layers (levels), each built on top of lower layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface.
- With modularity, layers are selected such that each uses functions (operations) and services if only lower-level layers
Micro Kernels

- Moves as much from the kernel into user space
- Mach is an example of microkernel
- Communication takes place between user modules using message passing
Pros:
- Easier to extend a microkernel
- Easier to port the operating system to new architectures
- More reliable (less code is running in kernel mode)
- More secure
Cons:
- Performance overhead of user space to kernel space communication
Loadable Kernel Modules (LKMs)
- OOP approach
- Each core component is separate
- Each talks to the others over known interfaces
- Each is loadable as needed within the kernel
- This is how linux is made
Mac OS and IOS structures

Darwin OS structure

Android
