OS Structure
OS Structure
OS Structure
• OS Structures
– Monolithic Systems
– Layered Systems
– Micro kernels
– Client – Server Models
– Virtual Machines
OS Structure
Monolithic Systems
• The entire OS runs as a single program in kernel mode
• The OS is written as a collection of procedures, linked together
into a single large executable binary program
• A basic structure
– A main program that invokes the requested service procedure.
– A set of service procedures that carry out the system calls.
• For each system call there is one service procedure that takes care of it and executes
it
– A set of utility procedures that
• Help the service procedures.
• Do things that are needed by several service procedures (e.g fetch data)
• Ex: OS/2, Windows NT, Vista and Unix (describe the system, do not
build the system)
09/28/2023 Module A - Introduction 8/40
OS Structure
Microkernels
• OS Kernels have problems
– 10bugs/ 1000 lines code (buggy, bring down the system)
– All the layers went in the kernel (complexity, large, and
difficult to manage)
OS Structure
Microkernels
• Microkernels
– Remove all nonessential components from the kernel, and implement
them on user mode (splitting the OS into small, well-defined modules)
– Running each task as an independent (separate) process → resist crashing
the entire system
– The modules run user mode → protection against bugs
– Making a minimal kernel by put the mechanism for doing something in the
kernel but not the policy (scheduling with highest priority process)
– Provide a communication facility using message passing between the client
program and the various series in user mode
• Disadvantages
– How to define the components are nonessential or essential? (depending on
the design ideas or requirements)
– Performance overhead of user space to kernel space communication
• Advantages
– Easy of extending and port the operating system to new architectures
– Advance security and reliability (less code is running in kernel mode)
• Ex: Symbian, Apple MacOS X Server
OS Structure
•
Client – Server Model
Server provides some service that satisfy the client’s request
• Client uses the server’s services
• Message passing is used to communication
• Can run on different or same computers
VMWare Architecture
OS Structure
Virtual Machines (VM)
JVM
OS Structure
Exokernels
• Is a program running in kernel mode
• Giving each user a subset of the resource (instead of exact
copying entire of underlying real machine)
• Allocate resources to virtual machines and ensure the
protection of them.
• Moreover, exokernels make the VM thinking that it has its
own disk (0 to maximum size of partition area)
• Advantages
– The exokernel scheme is saved a layer mapping
– Need keep track of which virtual machine has been assigned
which resource
– Separate the multiprogramming in user mode (protection from
real machine)
– Less overhead because they keep the VM out of each other’s hair
OS Structure
Exokernels – Example
Summary
• Operating System Concepts
• System Calls
• OS Structures
Q&A
Operating system design
Principles:
- Easy to write, easy to debug, easy to
upgrade.- Easy to install, easy to maintain,
efficient, (no bugs)
- Easy to use, easy to learn, safe, highly
reliable and fast to implement
- A SYSGEN (System Generation) program is
required to collect hardware-related information
to configure the operating system to suit each
computer.
09/28/2023 Module A - Introduction 19/40
Next Lecture
• Processes
• structure, mechanism, implementation, …
• Threads
• structure, mechanism, implementation, vs. Processes
• IPC
• How, comparatives, protection of processes/ threads