Index

Operating System

Operating System Structure

2.1 Operating-System Services


Figure 2.1 - A view of operating system services

OSes provide environments in which programs run, and services for the users of the system, including:

Other systems aid in the efficient operation of the OS itself:

2.2 User Operating-System Interface

2.2.1 Command Interpreter

2.2.2 Graphical User Interface, GUI

2.2.3 Choice of interface

2.3 System Calls


Figure 2.5 - Example of how system calls are used.


The use of APIs instead of direct system calls provides for greater program portability between different systems. The API then makes the appropriate system calls through the system call interface, using a table lookup to access specific numbered system calls, as shown in Figure 2.6:


Figure 2.6 - The handling of a user application invoking the open( ) system call


Figure 2.7 - Passing of parameters as a table

2.4 Types of System Calls

Six major categories, as outlined in Figure 2.8 and the following six subsections:


2.4.1 Process Control


Figure 2.9 - MS-DOS execution. (a) At system startup. (b) Running a program.


Figure 2.10 - FreeBSD running multiple programs

2.4.2 File Management

2.4.3 Device Management

2.4.4 Information Maintenance

2.4.5 Communication

2.4.6 Protection

2.5 System Programs

2.6 Operating-System Design and Implementation

2.6.1 Design Goals

2.6.2 Mechanisms and Policies

2.6.3 Implementation

2.7 Operating-System Structure

For efficient performance and implementation an OS should be partitioned into separate subsystems, each with carefully defined tasks, inputs, outputs, and performance characteristics. These subsystems can then be arranged in various architectural configurations:

2.7.1 Simple Structure

When DOS was originally written its developers had no idea how big and important it would eventually become. It was written by a few programmers in a relatively short amount of time, without the benefit of modern software engineering techniques, and then gradually grew over time to exceed its original expectations. It does not break the system into subsystems, and has no distinction between user and kernel modes, allowing all programs direct access to the underlying hardware. ( Note that user versus kernel mode was not supported by the 8088 chip set anyway, so that really wasn't an option back then. )


Figure 2.11 - Linux system structure

The original UNIX OS used a simple layered approach, but almost all the OS was in one big layer, not really breaking the OS down into layered subsystems:


Figure 2.12 - Traditional UNIX system structure

2.7.2 Layered Approach


Figure 2.13 - A layered operating system

2.7.3 Microkernels


Figure 2.14 - Architecture of a typical microkernel

2.8 Operating-System Generation

2.9 System Boot

The general approach when most computers boot up goes something like this: