Structure of Operating Systems
Structure of Operating Systems
Structure of
Operating Systems
Operating Systems Structures
• Structure/Organization/Layout of OSs:
1. Monolithic (one unstructured program)
2. Layered
3. Microkernel
4. Virtual Machines
• The role of
Virtualization
2
Monolithic Operating System
3 A. Frank - P. Weisberg
Monolithic OS – basic structure
4
MS-DOS System Structure
• MS-DOS – written to provide the most
functionality in the least space:
– not divided into modules (monolithic).
– Although MS-DOS has some structure, its
interfaces and levels of functionality are not well
separated.
5 A. Frank - P. Weisberg
MS-DOS Layer Structure
6 A. Frank - P. Weisberg
UNIX System Structure
• UNIX – limited by hardware functionality, the
original UNIX OS had limited structuring.
• The UNIX OS consists of two separable parts:
1. Systems Programs:
2. The Kernel:
– Consists of everything below the system-call
interface and above the physical hardware.
– Provides the file system, CPU scheduling,
memory management, and other operating-system
functions; a large number of functions for one
level.
7
Traditional UNIX System Structure
8 A. Frank - P. Weisberg
Traditional UNIX Kernel
9 A. Frank - P. Weisberg
LINUX Kernel Components
10 A. Frank - P. Weisberg
Layered Approach
11
Layered Operating System
12
An Operating System Layer
13 A. Frank - P. Weisberg
General OS Layers
14
Operating System Layers
15 A. Frank - P. Weisberg
Structure of the THE operating system
16 A. Frank - P. Weisberg
Older Windows System Layers
17
OS/2 Layer Structure
18 A. Frank - P. Weisberg
Microkernel System Structure (1)
• Move as much functionality as possible from
the kernel into “user” space.
• Only a few essential functions in the kernel:
– primitive memory management (address space)
– I/O and interrupt management
– Inter-Process Communication (IPC)
– basic scheduling
• Other OS services are provided by processes
running in user mode (vertical servers):
– device drivers, file system, virtual memory…
19
Layered vs. Microkernel Architecture
20 A. Frank - P. Weisberg
Microkernel System Structure (2)
• Communication takes place between user
modules using message passing.
• More flexibility, extensibility, portability and
reliability.
• But performance overhead caused by replacing
service calls with message exchanges between
processes.
21 A. Frank - P. Weisberg
Microkernel Operating System
22 A. Frank - P. Weisberg
Benefits of a Microkernel Organization (1)
• Extensibility/Reliability
– easier to extend a microkernel
– easier to port the operating system to new
architectures
– more reliable (less code is running in kernel mode)
– more secure
– small microkernel can be rigorously tested.
• Portability
– changes needed to port the system to a new
processor is done in the microkernel, not in the
23 other services.
Benefits of Microkernel Organization (2)
25
Mac OS X Structure
26 A. Frank - P. Weisberg
Structure of the MINIX 3 system
27 A. Frank - P. Weisberg
Windows NT Client-Server Structure
28 A. Frank - P. Weisberg
Windows NT 4.0 Architecture
29
Windows XP Architecture
30 A. Frank - P. Weisberg
Windows 7.0 Architecture
31 A. Frank - P. Weisberg
The Neutrino Microkernel
32
Kernel Modules
• Most modern operating systems implement
kernel modules:
– Uses object-oriented approach.
– Each core component is separate.
– Each talks to the others over known interfaces.
– Each is loadable as needed within the kernel.
• Overall, similar to layers but with more
flexibility.
33
Solaris Modular Approach
34 A. Frank - P. Weisberg
Virtual Machines (1)
36
VM Implementation on Bare Machine
37 A. Frank - P. Weisberg
VM Implementation on Host OS
38 A. Frank - P. Weisberg
Advantages/Disadvantages of VMs
41 A. Frank - P. Weisberg
Integrating two Operating Systems
42 A. Frank - P. Weisberg
The Role of Virtualization
44
Architectures of Virtual Machines (2)
• An interface consisting of system calls
as offered by an operating system.
• An interface consisting of library calls:
– generally forming what is known as
an Application Programming Interface
(API).
– In many cases, the aforementioned
system calls are hidden by an API.
45
Architectures of Virtual Machines (3)
49 A. Frank - P. Weisberg
Hypervisor/VMM (Virtual Machine Monitor)
51 A. Frank - P. Weisberg
Types of Hypervisors
53 A. Frank - P. Weisberg
VMware Architecture
54 A. Frank - P. Weisberg
Para-Virtualization
• Presents guest with system similar but not
identical to hardware.
• Guest must be modified to run on specialized
para-virtualized hardware.
• Guest can be an OS, or in the case of Solaris 10
applications running in containers.
55
Solaris 10 with Two Containers
56