You are on page 1of 5

Operating Systems Implementation System Structures 2

COMP3300 As modern operating systems are large and complex careful


engineering is required. The complexities of operating system
design helped give birth to software engineering, this was
Operating System Structures embraced in Brook's famous book 'The mythical man month'.
The basic approaches to OS design include:

Department of Computer Science A monolithic system,


The Australian National University Modular,
Microkernel (or Extensible Nucleus),
Eric McCreath Layered, and
Object oriented.
2004

Partitioned OS 3 OS Key Functions 4

When on operating system is partitioned into small Key system components include :
components each component should be well defined in terms Process management,
of :
File management,
portion of the system,
Memory management,
inputs,
IO System Management,
outputs, and
Networking,
functionality.
Protection system, and
User Interface.
MS-DOS 5 UNIX 6

Some operating systems do not have a well defined structure. The original UNIX operating system also had limited structure.
An example of this is MS-DOS. It was composed of two separate parts: the kernel and the
system programs.
Application Programs Users
File system
System Programs CPU scheduling
Resident System Programs System call interface Memory management
: :
Kernel : :
MS-DOS Device Drivers Hardware

System calls define the programmer's interface.


ROM BIOS Device Drivers A standard set of system programs provide the user interface.

UNIX 7 Layered Approach 8

Some versions of UNIX separate the kernel on functional One approach to designing operating systems is to break up the
boundaries. eg AIX system into a number of layers or levels.
Mach reduces the kernel to a small set of core functions. This is
Layer n = User Programs
called a microkernel.
Layer n-1
System V Release 4(SVR4) is a clean but complex kernel. It :
included a number of new features such as real-time processing Layer 2
Layer 1
support, virtual file system, and a preemptive kernel.
Layer 0 = Hardware
The Berkely Software Distribution BSD series was influential.
New features often appeared first in BSD.
The layered approach to operating system design provides
modularity.
This provides a way of hiding information(data structures,
operations and hardware).
Layered Approach 9 Layered Approach - Venus 10

'THE' was the first operating system to use the layered The 'Venus' operating system also used a layered approach.
approach.
Interestingly the lower layers where in microcode!
Layer 5 : user programs
Layer 4 : buffering for input and output devices Layer 6 : user programs
Layer 3 : operator-console device driver Layer 5 : device drivers and schedulers
Layer 2 : memory management Layer 4 : virtual memory
Layer 1 : CPU scheduling Layer 3 : I/O channel
Layer 0 : hardware Layer 2 : CPU scheduling
Layer 1 : instruction interpreter
Layer 0 : hardware

Layered Approach - Problems 11 DOS to W2000 12

The Microsoft empire opened up the power of computers to a


There are some problems with the layered approach: large number of people. Yet it could be argued that their
It can be difficult to define and order layers. monopoly has slowed down operating system development.
And it all began with 4000 lines of assembly code.
Also layers tend to produce a less efficient operating system
than other methods of implementation. 1981 DOS1.0 8K floppy disk OS that ran on an 8086 flat directory
structure with a maximum of 64 files.
In recent years there has been a back lash against layering. This
1983 DOS2.0 directory, hard disk, and IO redirection.
has produced operating systems with less layers and more
functionality in each layer. Number of new features such a networking, but
1984 DOS3.X
An example of this is Windows NT which had a layered it did not use the full capabilities of the 80286.
oriented organization. Due to poor performance layers were 1990 Windows 3.0 Ran on top of DOS competed with Mac GUI.
reduced and more closely integrated in Windows NT 4.0.
OS/2 Failed new OS between IBM and MS.
1993 Windows NT Used the power of the new processor, and
was a multitasking and single/multi user.
This formed the basis of Windows 2000.
Windows 2000 13 Virtual Machines 14

Applications
A virtual-machine uses software to simulate hardware upon
Services - replicator alerter, RPC event logger
which an operating system and user programs may run.
System processes - service controller, winlogon, session manager
Environment Subsystem - POSIX, OS/2, Win32 This strongly embraces the layered approach.
User Mode IBM's VM operating system made use of this approach.
Kernel Mode System Thread Recently this has come back into vogue with:
JVM - Java Virtual Machine.
Executive – IO management, file systems, LPC facility, cache
management, security reference monitor, firtual memory, windows manager Virtual machines on top of native processors.

Device drivers Microkernel

HAL (Hardware abstraction layer)


Gives a uniform view of buses, I/O, DMA,
interrupts, timers, clocks, etc.

Virtual Machines 15 Mechanisms and Policies 16

Some advantages of using virtual machines include: The separation of mechanisms and policies is an important
portability, design principle for operating systems.

added security, Mechanisms are how something is to be done.

useful for developing operating systems, and Policies decide what will be done.

reliability. For example there may be a mechanism that limits the amount
of disk space each user has. However, it is a policy decision to
The main disadvantage of this approach is reduced efficiency. determine what level this should be set to.
General mechanisms are desirable as they allow a large class of
policies to be applied. Hence, when a policy change is made,
only a few parameters need to be changed, not the underling
mechanism.
Implementation 17 System Generation 18

Traditionally operating systems have been implemented in System generation involves creating a system for a particular
assembly language, however, this is generally no longer the machine configuration.
case. This may be performed in a variety of ways:
For example UNIX, OS/2, and Windows NT are mainly from recompiling the entire operating system for a particular
written in C. configuration,
There are many advantages in using a higher level language, to including all possible configurations in the operating
these include : shorter development time, improved execution system and then setting parameters when it is installed.
times, more compact code, easier debugging, the operating
system is more portable, and easier to understand.
There may even be a move to object oriented languages! (What
are the implications of this?)

You might also like