Java
1
Operating System Architecture
and Distributed Systems
Some concepts are
drawn from Chapter 7
© Pearson Education
Dr. Rajkumar Buyya
Redmond Barry Distinguished Professor
Cloud Computing and Distributed Systems (CLOUDS) Laboratory
School of Computing and Information Systems
The University of Melbourne, Australia
http://www.cloudbus.org/652
http://www.buyya.com/microkernel/chap2.pdf
http://www.buyya.com/microkernel/chap2.pdf
2
Operating System Architecture and
Distributed Systems (DS)
◼ Explore the architecture of a kernel
suitable for a distributed system.
◼ A key principle of DS is openness and
with this in mind, let us examine the
major kernel architectures:
◼ Monolithic kernels
◼ Layered architecture-based kernels
◼ Micro-kernels
3
Open DS and System Software
◼ A open DS should make it possible to:
◼ Run only that (“specific” components of) system
software at each computer that is necessary for its
particular role in the system architecture.
◼ For example, system software needs of laptops and
dedicated servers are different and loading redundant
modules wastes memory resources.
◼ Allow the software implementing any particular
service to be changed independent of other facilities.
◼ Allow for alternatives of the same service to be
provided, when this is required to suit different users
or applications.
◼ Introduce new services without harming the integrity
of existing ones.
4
Separating Mechanisms and Policies
in OS and DS
◼ A Guiding Principle of OS design:
◼ The separation of fixed resource management “mechanisms“
from resource management “policies”, which vary from
application to application and service to service.
◼ For example, an ideal scheduling system would provide
mechanisms that enable a multimedia application such as
videoconferencing to meet its real-time demands while
coexisting with a non-real-time application such as web
browsing.
◼ That is kernel would provide only the most basic
mechanisms upon which the general resource
management tasks at a node are carried out.
◼ Server modules would be dynamically loaded as
required, to implement the required RM policies for the
currently running applications.
5
OS/Kernel Architecture
◼ The two key examples of kernel design
approaches are:
◼ Monolithic
◼ Microkernel
◼ These two designs differ primarily in the
decision as to what functionality belongs in the
kernel and what is left to server processes that
can be dynamically loaded to run on top of it.
◼ In literature, we find predominantly 3 types of
OSs:
◼ Monolithic OS
◼ Layered OS
◼ Microkernel-based OS
6
Monolithic kernel and microkernel
Monolithic Kernel Microkernel
Server: Dynamically loaded server program:Kernel code and data:
.. …. .
.. …. .
Key:
S4
S1 .. …. .
S1 S2 S3
S2 S3 S4
7
Operating System Models
◼ Serve as frameworks that unify capabilities,
services and tasks to be performed
◼ Three approaches to building OS….
◼ Monolithic OS
◼ Layered OS
◼ Microkernel based OS
◼ Client server OS
◼ Suitable for distributed systems
◼ Simplicity, flexibility, and high performance are
crucial for OS.
8
Application
Programs
Application
Programs
System Services
Hardware
User Mode
Kernel Mode
Monolithic Operating System
Better application Performance
Difficult to extend Ex: MS-DOS
9
Layered OS
Easier to enhance
Each layer of code access lower level interface
Low-application performance
Application
Programs
System Services
User Mode
Kernel Mode
Memory & I/O Device Mgmt
Hardware
Process Schedule
Application
Programs
Ex : UNIX
10
Traditional OS
OS Designer
OS
Hardware
User Mode
Kernel Mode
Application
Programs
Application
Programs
11
Disadvantages of Monolithic OS
◼ It is massive:
◼ It performs all basic OS functions and takes up in
the order of megabytes of code and data
◼ It is undifferentiated:
◼ It is coded in a non-modular way (traditionally)
although modern ones are much more layered.
◼ It is intractable:
◼ Altering any individual software component to adapt
it to changing requirements is difficult.
12
New trend in OS design: Separating
mechanisms and policies
User Mode
Kernel Mode
Hardware
Microkernel
(very basic functions)
ServersApplication
Programs
Application
Programs
13
Micro-kernel
◼ Compared to monolithic, microkernel design
provides only the most basic abstractions,
◼ address space, threads and local IPC.
◼ All other system services are provided by
servers that are dynamically loaded precisely on
those computers in the DS that require them.
◼ Clients access these system services using the
kernel’s message-based invocation
mechanisms.
14
Microkernel/Client Server OS
Tiny OS kernel providing basic primitive (process, memory, IPC)
Traditional services becomes subsystems
OS = Microkernel + User Subsystems
Client
Application
OS
Emulators
File
Server
Network
Server
Display
Server
Microkernel
Hardware
User
Kernel
Send
Reply
Ex: Mach, QNX, Windows NT!
15
The role of the microkernel (MK)
◼ MK appears as a layer between H/W and a
layer of major system components
(subsystems). If performance, rather than
portability is goal, then middleware may use
facilities of MK directly.
Middleware
Language
support
subsys tem
Language
support
subsys tem
OS emulation
subsys tem
….
Microkernel
Hardware
The microkernel supports middleware via subsystems
16
Few Popular Microkernel Systems
MACH, CMU (Carnegie Mellon University)
supports OS emulators such as Unix and OS/2.
PARAS (C-DAC, India) for PARAM Supercomputers
ChorusOS (Sun, USA) Realtime OS (RTOS)
seL4 (created by NICTA/Data61, Australia)
QNX – Unix-like RTOS (Canada, BlackBerry)
used in a variety of devices including cars and mobile
phones (e.g., BlackBerry).
Intel x86, MIPS, PowerPC, StrongARM..
Windows NT – original design.
https://www.google.com/search?client=firefox-b&q=Intel+8088&stick=H4sIAAAAAAAAAONgVuLQz9U3MC4vyQUAUn3XQgwAAAA&sa=X&ved=2ahUKEwjglaqJlpHdAhWO7mEKHUXVC44QmxMoATAaegQICxAp
https://www.google.com/search?client=firefox-b&q=x86&stick=H4sIAAAAAAAAAONgVuLQz9U3sDDPSAEAapLnegwAAAA&sa=X&ved=2ahUKEwjglaqJlpHdAhWO7mEKHUXVC44QmxMoAjAaegQICxAq
https://www.google.com/search?client=firefox-b&q=MIPS&stick=H4sIAAAAAAAAAONgVuLQz9U3MDWMTwcAi8cOhQwAAAA&sa=X&ved=2ahUKEwjglaqJlpHdAhWO7mEKHUXVC44QmxMoAzAaegQICxAr
https://www.google.com/search?client=firefox-b&q=PowerPC&stick=H4sIAAAAAAAAAONgVuLQz9U3MDMySAMAwpGfAAwAAAA&sa=X&ved=2ahUKEwjglaqJlpHdAhWO7mEKHUXVC44QmxMoBDAaegQICxAs
https://www.google.com/search?client=firefox-b&q=StrongARM&stick=H4sIAAAAAAAAAONgVuLQz9U3MLc0ygUATKKSEQwAAAA&sa=X&ved=2ahUKEwjglaqJlpHdAhWO7mEKHUXVC44QmxMoBjAaegQICxAu
seL4: Made in Australia!
17
18
Comparison: Monolithic and
Micro-kernel OS Design
◼ The main advantages of a MK-based OS:
◼ A relative small kernel is more likely to be free of
bugs than one that is larger and complex.
◼ Extensibility and its ability to enforce modularity
behind memory protection boundaries
◼ The advantage of a monolithic OS:
◼ Relative efficiency with which operations can be
invoked is high because even invocation to a
separate user-level address space on the same node
is more costly.
19
Hybrid Approaches
◼ Many modern OSs follow hybrid approach in OS
structure. E.g., Windows NT.
◼ Pure microkernel OSs such as Chorus & Mach
have changed over time to allow servers to be
loaded dynamically into the kernel address
space or into a user-level address space.
◼ Some OSs (such as SPIN) use event-based
model as a mechanism for interaction between
modules grafted into the kernel address space.
20
Summary
◼ OSs provide various types of facilities/services
to support middleware for distributed system:
◼ encapsulation, protection, and concurrent access
and management of node resources.
◼ Three types of OS:
◼ Monolithic OS
◼ Layered OS
◼ Microkernel-based OS
◼ New OS designs provide flexibility in terms of
separating mechanisms from policies.
◼ Microkernel based systems are flexible
◼ Quite popular model for OS design for embedded systems
◼ New Emerging optimized Kernels like nanokernel or picokernel
Additional References
◼ Rajkumar Buyya, The Design of PARAS
Microkernel, Centre for Development of
Advanced Computing (C-DAC), 1998.
◼ http://www.buyya.com/microkernel/chap2.pdf
◼ Gernot Heiser, Gerwin Klein, June Andronick,
seL4 in Australia: From Research to Real-World
Trustworthy Systems, Communications of the
ACM, April 2020.
◼ https://cacm.acm.org/magazines/2020/4/243
641-sel4-in-australia/fulltext
21
http://www.buyya.com/microkernel/
http://www.buyya.com/microkernel/chap2.pdf
https://cacm.acm.org/magazines/2020/4/243641-sel4-in-australia/fulltext