Lecture 2 -- Design Principles

Services & general user outlook depends on the concepts around which the OS was created, giving it a certain `feel'.

Most OS share a few common concepts.

The Process

We need to distinguish between a program and a process.

A program is a collection of computer instructions plus some data that resides on some medium, waiting to be called into action.

A process is a program during execution. It is in memory, taking input, manipulating it and producing output. See Lecture [*] for more details.

Ten people may have editing processes in a machine, but there is only one editing program on the disk. A very important concept.

Memory

Memory is the set of locations where a process' instructions and memory are stored.

Usually thousands or millions in a computer.

Accessed by reading/writing a memory location, which has an integer address.

Memory location have a particular number of bits, depending on the hardware.

Locations often have a hardware protection, allowing/preventing read/writes. Usually, a process can only read/write the set of locations given to it by the OS.

Files

Files are storage areas for programs, source code, data, documents etc.

They can be accessed by processes, but don't disappear when processes die, or the machine is turned off.

The OS provides mechanisms for file manipulation: open, close, create, read, write.

The OS maps files onto areas on disks and tapes. Easier on the users.

Some OS don't expect any file structure or types. Others distinguish between file types and structures, e.g Pascal source, text documents, machine code, data etc.

The OS sets file permissions, allowing file access to authorised users only.

Directories may exist to allow related files to be collected. There are several possible directory organisations: no directory, flat, hierachial.

Operating System Structure

As varied as the number of systems, but several often occurring types.

Monolithic

``The big mess'', all the bits of the OS run in privileged mode, and the OS created by compiling all the bits together into one huge program. Example: Unix.

Layered Model

Organise the OS into a hierarchy of layers, each constructed on the one below. Much more modular. Example: The THE system.

Virtual Machine

Break the OS into 2 sections, one handling the hardware, the other the abstract OS concepts. Used by VM/370, and nowadays in Mach.

Makes porting the OS to a new hardware platform easier. The lower layer makes the hardware look the same regardless of the actual hardware.

Client-Server Model

Implement most of the OS services as privileged user processes called servers. User processes clients send requests in the form of messages to the servers, which do the work and return a reply.

There must be a layer in the OS that does message passing. This model can be adapted to a network or distributed system where the processes run on several machines.

Operating System Paradigms

Most OS (except the monolithic ones) try to separate policy from mechanism.

This allows the policies that control the OS behaviour to be altered, while keeping the mechanisms to perform the policies unchanged.

In many cases, the policies can be changed while the OS is running.

Warren Toomey wkt@cserve.cs.adfa.oz.au