Components of an OS

Process Operations

OS provides the following kinds of operations:

Memory Management

primary memory is directly accessible to the CPU.

OS must:

I/O

Device Drivers

Routines that interact with specific device types. Encapsulate the details of the device.

Note: Windows has ~35,000 device drivers.

File Systems

A nice abstraction on top of physica storage device drivers. Provides the usual list of operations (open, close, read, write, seek, etc.), but also higher level operations on the fs itself:

Structure

Monolith:

+----------------------+
|    User Programs     |
+----------------------+
|      Everything      |
|      Else in OS      |
+----------------------+
|     Device Driver/   |
|     hardware stuff   |
+----------------------+

advantages: - cost of module interaction is low (procedure call)

disadvantages: - hard to maintain - hard to extend

Layering

Dikjstra's "THE" multiprogramming system:

Each layer presents a "virtual machine" to the layer above it. Each layer only uses the services of the layer below it.

Each layer can be tested and verified independently.

Hardware Abstraction Layer

Goal: seperate hardwarte-specific routines from the "core" OS. Provides protability and improves readability.

Microkernels

Introduced in the late 80s, early 90s. Goal: minimize the kernel, move as much as possible into user space.

Results in: - better reliability (isolation between components) - better portability (less code to port) - better extensibility (easier to add new features)

OS is split into two parts:

Probably slower than monolithic kernel because of all the expensive context switches.