CIS 307: Views, Components, and Architectures of Operating Systems
Here is a possible definition of an Operating System (paraphrased from
Brinch Hansen):
An Operating System is a set of manual and automatic procedures that enable
a group of people to use a computer installation efficiently.
The word Efficiently is very ambiguous. What are the Objective
Functions to be used to evaluate efficiency? Here are some possibilities:
- Functionality
- Performance: Time (Response Time=Turnaround Time, Latency), Utilization (CPU, Memory, I/O, Communication Channels, ..)
- Convenience
Of course these objective functions may not all agree. For example, cost and
functionality may conflict, as well as response time and utilization.
We can think of an operating system as a Resource Manager.
Here are some of the resources managed by the OS:
- Processors, Main memory, Secondary Memory, Devices, Information.
While managing these resources the OS is concerned with general issues like:
- Efficiency, Protection, Security, Privacy, Reliability.
Virtual Machine
We can think of an operating system as a Virtual Machine standing
between our programs and the bare hardware, thus providing a more convenient,
extended machine.
or alternatively
We can think of an operating system as a Reactive System answering
requests coming from user programs (supervisory calls+exceptions) and from
devices (interrupts).
Here are the basic components of an OS:
- Process Management: Create/Delete/Suspend/Resume Processes, Inter
Process Communication (IPC)
- Memory Management: Allocate and Deallocate Physical Memory
- Virtual Memory Management: Maintain mapping from virtual to physical
memory, decide on size of memory to allocate to processes, enforce
replacement policy
- I/O Management: definition of Device Drivers providing a uniform interface
to devices
- Secondary Storage Management: allocation and deallocation of blocks,
recovery block management.
- File Management: naming, directories, creation, use, and deletion of files,
locks, protection, backups, accounting.
- Network Services: support for various protocols and communication
facilities.
- Command Language Interpreter(CLI): interface to operator and users that
gives them the ability to give commands to the OS.
- Information Services: Show/Set commands
- Accounting Services: Quotas, usages, and Costs.
Some functionality, such as Protection, Security, Privacy, Reliability
are realized across many components.
Monolithic Architecture
The oldest architecture used for operating systems is the Monolithic
Kernel
A monolithic kernel can be easy to implement if we are ready to accept very
high latency [i.e. we service requests withour worrying about the urgency of
other requests], otherwise it may be with a structure that is very difficult
to understand. Monolithic kernels are an architecture whose time has come
and gone.
Dijkstra introduced the Layered Architecture for operating systems when
he developed in the 60's the THE operating system.
It is not always easy to have a truly layered architecture since some
functionalities are naturally described as mutually dependent.
In addition a layered
architecture is often inefficient since it requires a high number of
traversals of interfaces.
This architecture creates a virtual 370 machine for each "user"
and the user can choose which OS to run on that virtual machine.
The virtal machine architecture is elegant, but it does not deal with the
questions of resource management, or of responsiveness.
A very modern architecture (Mach, OSF, and NT) is the
Micro-Kernel Architecture.
The micro-kernel architecture strives to take out of the kernel as much
functionality as possible, so as to limit the code executed in privileged mode
and to allow easy modifications and extensions.
The micro-kernel architecture allows us to build a number of different
operating systems all using the same micro-kernel, Each operating system will
make use of different system processes. Notice that little is in the kernel.
But what is there has great importance. Interactions between processes involve
kernel intervention. Thus the efficiency of the transfer from user to
kernel mode and back must be very high.
Many believe that the micro-kernel architecture
is inherently inefficient and that the use of a more extensive but
pre-emptible kernel is preferable. The idea here is to do things almost as in
the monolithic kernel, but now allowing concurrency, and preemption, within
the kernel itself. The argument for this change is made on the basis of
efficiency. All the context switches required in the micro-kernel
architecture to go from kernel to system tasks and back are replaced by
subroutine calls within the kernel itself, with great saving in time.
Of course, writing the kernel becomes substantially more difficult because
now within a single address space and mode we can have more than one
concurrent action. Sun Solaris, for example, uses this architecture.
[Notice that if we think in terms of preemption (control
is taken away suddenly form an executing activity), we see that
the multithreaded kernel provides preemption both within processes and
the kernel. Traditional kernel provide provide preemption, if at all,
only at the user level.]
http://www.cis.temple.edu/~ingargio/cis307/readings/intro.html
ingargiola.cis.temple.edu