Generic Operating System Structure

Contents
Simple view
Kernel
Distinguished applications
Command interpreter
Simple view
An Operating System is the layer between the hardware and software, as
in
An Operating System is responsible for the following functions
-
Device management using device drivers
-
Process management using processes and threads
-
Inter-process communication
-
Memory management
-
File systems
In addition, all operating systems come with a set of standard utilities.
The utilities allow common tasks to be performed such as
-
being able to start and stop processes
-
being able to organise the set of available applications
-
organise files into sets such as directories
-
view files and sets of files
-
edit files
-
rename, copy, delete files
-
communicate between processes
Kernel
The kernel of an operating system is the part responsible for all
other operations. When a computer boots up, it goes through some initialisation
functions, such as checking memory. It then loads the kernel and switches
control to it. The kernel then starts up all the processes needed to communiate
with the user and the rest of the environment (e.g. the LAN)
The kernel is always loaded into memory, and kernel functions always
run, handling processes, memory, files and devices.
The traditional structure of a kernel is a layered system, such
as Unix. In this, all layers are part of the kernel, and each layer can
talk to only a few other layers. Application programs and utilities live
above the kernel.
The Unix kernel looks like
Most of the Operating Systems being built now use instead a
micro
kernel, which minimises the size of the kernel. Many traditional services
are made into user level services. Communication being services is often
by an explicit
message passing mechanism.
The major micro-kernel Operating System is Mach. Many others use the
concepts of Mach.
Some systems, such as Windows NT use a mixed approach
Distinguished applications
An Operating System has been described as an ``application
with no top'' (B. Meyer, ``Object-oriented Software Construction'').
Other
applications interact with it, through a large variety of entry points.
In order to use an O/S, you need to be supplied with at least some applications
that already use these entry points.
All Operating Systems come bundled with a set of ``utilities'' which
do this. For example
-
Windows95 has a shell that allows programs to be started from the Start
button. There is a standard set of applications supplied
-
MSDOS starts up with COMMAND.COM to supply a command line prompt,
and a set of utilities
-
Unix has a set of command line shells and a huge variety of command line
utilities
-
X-Windows supplies a login shell (xdm). Others supply file managers,
session managers, etc which can be used to provide a variety of interfaces
to the underlying Unix/POSIX system.
Command interpreter
When a user interacts with an Operating System
they always do so through the intermediary of a command interpreter. This
responds to user input in the following ways
-
It starts applications
-
It stops applications
-
It allows the user to switch control between applications
-
It may allow control over communication between an application and other
applications or the user.
The command interpreter may be character-based, as in the MSDOS
COMMAND.COM
or the Unix shells.
The interpreter may be simple, or can have the power of a full programming
language. It may be imperative (as in the Unix shells), use message passing
(as in AppleScript) or use visual programming metaphors such as drag-and-drop
for object embedding (as in Microsoft's OLE).
It is important to distinguish between the command interpreter and the
underlying Operating System. The command interpreter may only use a subset
of the capabilities offered by the Operating System; it may offer them
them in a clumsy or sophisticated way; it may require complex skills or
be intended for novices