COMP 3400 Lecture 2: OS Overview Part 2

[ previous | schedule | next ]

Operating System Structures

We've looked at major computer system structures that support operating system functionality. Now let's consider major OS functions and design considerations.

OS Responsibilities

OS is very complex, its responsibilities can be grouped into logical categories. Each is introduced in turn.

Process management
Memory management
File System management
Mass Storage management
I/O device management
Network communication
Overarching design issue: mechanism versus policy
All the management responsibilities need to be designed so that policy is separated from mechanism.

User Interaction

System services, calls, and programs

System services

OS provides a number of basic and advanced services to its users: loading and running programs, storing programs and data, operating I/O devices, providing communication, providing protection.

OS also provides services that benefit mostly its own operation and system administration: efficient resource allocation, accounting, security.

System calls

Processes interface with the OS through system calls. Put another way, the OS provides sets of system calls through its API (Application Programmer Interface) to those who will develop software to run on it.

There are many different system calls, grouped into the same categories as OS responsibilities listed above (process management, file management, etc). The textbook contains a nice outlined list in Figure 2.8.

System programs
These are programs provided by the OS to the interactive user. Some simply invoke system calls on the user's behalf, others are much more complex.

Ways of structuring an OS

All OS's are complex software systems and so need to be structured in some way. Modern OS's have a layered structure. Textbook figures 2.12 through 2.16 illustrate layered structures used by different OS's. Each is clearly distinct from the others, showing there is no consensus on how layers should be structured. Here are a few approaches.

Original Unix: kernel and system programs

There are a small number of layers. The first layer above the hardware is the OS kernel. The kernel refers to the most essential modules of the OS, those that need to be memory resident at all times. The kernel primarily fulfills process, memory and file responsibilities. System calls are the interface of the kernel to programmers. The next layer is the system programs. Criticized for being too monolithic with too much kernel functionality.

Mach, NT: microkernel

Idea is to keep the kernel as small as possible. This allows OS overall to be more extendable and portable. Also simplifies protection. Kernel may contain only partial process, file, and communication management. Communication is through message passing. NT uses a client-server approach in which both are user mode but communication between them must go through kernel. Thus significant portion of the OS itself operates in user mode.

OS/2: highly layered
This can be visualized with OS layers as concentric circles or boxes surrounding hardware. Each layer provides services to the layers that surround it and is implemented using only the services provided by the layers it encloses. This approach is highly modular and easier to maintain, but performance suffers due to the multiple layers and it is difficult to decide which OS services belong in which layer. OS/2 and the first version of Windows NT were highly layered.
Modern Unix: kernel modules
More object-oriented. Core kernel and dynamically loadable kernel modules. Modern Unix variations: Solaris, Linux, Mac OS X, employ this. Has advantage of microkernel w/o disadvantage of message passing. Has protection advantage of layered w/o disadvantage of strict hierarchy (modules can call each other).
VMWare: virtual machines
The other OS architectures all have a kernel layer directly interfacing with hardware. Another strategy is to place an additional OS layer called the virtual machine between the kernel and the hardware. The virtual machine does not provide any functionality to the kernel but instead provides an identical interface as that of the hardware itself. The kernel thinks it is interacting directly with bare hardware. Advantage is that each process can have its own kernel (or OS) and different processes can use different OS's concurrently on the same hardware - even simple single user OS's.

VMWare and Virtual PC (Microsoft) are application programs that provide this capability. Java's JVM (Java Virtual Machine) and .NET's CLR (Common Language Runtime) also follow the virtual machine concept to provide "managed execution".
[ COMP 3400 | Peter Sanderson | Math Sciences home page | Otterbein ]

Last updated:
Peter Sanderson (PSanderson@otterbein.edu)