Dr. Christian Vecchiola Postdoctoral Research Fellow [email protected] Cloud Computing and...
-
Upload
carl-masden -
Category
Documents
-
view
219 -
download
2
Transcript of Dr. Christian Vecchiola Postdoctoral Research Fellow [email protected] Cloud Computing and...
Dr. Christian VecchiolaPostdoctoral Research Fellow
Cloud Computing and Distributed Systems (CLOUDS) Lab
Dept. of Computer Science and Software Engineering
The University of Melbourne
Operating System Architectureand Distributed Systems
Most concepts aredrawn from Chapter 6© Pearson Education
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sOutline
Introduction OS / Kernel Models
– Monolithic Operating Systems– Layered Systems– Traditional Operating Systems– Micro-kernel Operating Systems
Micro-kernel Operating Systems– Observations– Architecture– Client Server Model– Comparison
Hybrid Approaches Summary
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sIntroduction
Why Operating Systems?– OSes are a fundamental component of today’s
computing systems.– They offer a set of services for:• Managing the hardware resources of devices• Scheduling the execution of the applications• Simplifying the development of applications
– OSes constitute a common sub-stratus for• (almost) all the applications ….• …. even distributed system middleware
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sIntroduction
A little bit of history…– Pre-OS software development (before 60s)• Single task model (one application running)• Developers had to:
– Program the system from booting the hardware up..– Manage every aspect of the system
• Assembly language• Very challenging • Model:
Machine + Program + Data = Application
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sIntroduction
A little bit of history…– The OS era (60s onwards)• Evolution from single task to multi-tasking• There exist a common program that
– .. is loaded before any other program– .. manages the hardware resources of the machine– .. schedules the execution of user applications (one or more)– .. provides a higher level interface to the system
• Development of compilers• Model:
Application + OS +Machine = Execution
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sIntroduction
What does an OS do?– Manages the hardware resources
• Memory• CPU• Disks
– Provides access to connected devices (drivers)• Printers• Cameras• Scanners…
– Manages and Schedules applications• Simple user applications• Services
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sIntroduction
Ehy… are we studying DS…?– OSes are a fundamental component in DS– They provide the basic services for what
concerns• Network connectivity• Machine resources management• Concurrency and IPC• Access to the file system
– Distributed Systems are based on middleware• it is “just another” application for the OS• it might be a fundamental part of the OS
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sIntroduction
DS-wanted features of an OS– Let us look into 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
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sIntroduction
DS-wanted features of an OS– An open DS should make it possible to:
• Run only that system software on each computer that is necessary for its particular role in the system architecture:– Avoiding redundant modules on capability-limited devices.– Optimizing the behavior of specific components in different scenarios
(server, client, ….)
• Allow the software (and the computer) implementing any particular service to be changed independent of other facilities.
• Allow for alternatives of the same services to be provided, when this is required to suit different users or applications.
• Introduce new services without harming the integrity of existing ones.
–Which features are required by an OS to expose these properties?
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sIntroduction
A Guiding principle of OS design
– 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.
Separation of fixed resource management “mechanisms“ from resource management “policies”, which vary from application to application and service to service.
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sOS / Kernel Models
Main Design Principles– The two key examples of kernel design
approaches are:• Monolithic• Microkernel
– Key difference: what does belong to the kernel?– Three main models:
• Monolithic OS• Layered OS• Microkernel-based OS
– The first two can be considered monolithic.
The chambers 20th century dictionary definition of monolithic is: a pillar, column, of a single stone: anything that resembling a monolithic, massiveness.
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
s Monolithic Kernel vs Micro-Kernel
OS / Kernel Models
Monolithic Kernel Micro-Kernel
Server:
Dynamically loaded server program:
Kernel code and data:
.......
.......
.......S2 S3 S4
S1
S2 S3 S4S1
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sOS / Kernel Models
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.
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sOS / Kernel Models
Monolithic Kernels
– Better application performance– Hard to extend– Example: MS-DOS
ApplicationPrograms
System Services
Hardware
User Mode
Kernel Mode
ApplicationPrograms
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sOS / Kernel Models
Layered Operating Systems
User Mode
Kernel Mode
Memory & I/O Device Mgmt
Process Scheduler
ApplicationPrograms
ApplicationPrograms
System Services
Hardware
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
s Traditional Operating Systems
OS / Kernel Models
OS Designer
OS
User Mode
Kernel Mode
ApplicationPrograms
ApplicationPrograms
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sMicro-Kernel Operating Systems
Observations–Monolithic Operating Systems are:• Massive: they perform all basic OS functions and
take up in the order of megabytes of code and data.• Undifferentiated: they are coded in a non-modular
way (traditionally) although modern ones are much more layered.• Intractable: altering any individual software
component to adapt it to changing requirements is difficult.
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sMicro-Kernel Operating Systems
Observations– New trend in Operating System Design
User Mode
Kernel Mode
Hardware
Microkernel(very basic functions)
ServersApplicationPrograms
ApplicationPrograms
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sMicro-Kernel Operating Systems
Micro-Kernel Operating Systems– Compared to monolithic, microkernel design provides
only the most basic abstractions, • principally address space, threads and local IPC.
– All other system services are provided by servers that are dynamically loaded precisely those computers in the DS that require them.
– Clients access these system services using the kernel’s message based invocation mechanisms.
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sMicro-Kernel Operating Systems
Client Server Model
– Tiny OS kernel providing basic primitive (process, memory, IPC)– Traditional services becomes subsystems– OS = Microkernel + User Subsystems– Examples: Mach, PARAS, and Chorus
ClientApplication
OS Emulators
FileServer
NetworkServer
DisplayServer
Microkernel
Hardware
User
Kernel
SendReply
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sMicro-Kernel Operating Systems
Architecture– Micro-Kernels are a layer between H/W and system
systems. If performance is goal, rather than portability, then middleware may use facilities of the kernel directly.
– Micro-Kernels support middleware as subsystems.
Middleware
Languagesupport
subsystem
Languagesupport
subsystem
OS emulationsubsystem ....
Microkernel
Hardware
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sMicro-Kernel Operating Systems
Examples of Micro-Kernels–MACH, CMU• It supports different OS emulators (Unix and OS/2).• (Mach only) base for OS X
– PARAS, C-DAC– Chorus– QNX, – (Windows NT) • combination of layered and microkernel..• .. but massive code.
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sMicro-Kernel Operating Systems
Comparison–Micro-Kernel main advantages:• Extensibility and its ability to enforce modularity
behind memory protection boundaries• A relative small kernel is more likely to free of bugs
than one that is larger and complex.
–Monolithic OS main advantage:• 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.
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sHybrid Approaches
Which is the trend today?–Many modern OS follow hybrid approach in OS
structure. E.g., Windows NT.– Pure microkernel OSs such as Chorus & Mach
have changed over a 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 used event-based model as a mechanism for interaction between modules grafted into the kernel address space.
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sSummary
What did we learn?– Operating system provides various types of
facilities to support middleware for distributed system: • encapsulation, • protection, • concurrent access • management of node resources.
– New OS designs provide flexibility in terms of separating mechanisms from policies.
Ope
rati
ng S
yste
m A
rchi
tect
ure
and
Dis
trib
uted
Sys
tem
sD
istr
ibut
ed S
yste
ms
Pri
ncip
les
and
Para
digm
sAdditional References
Tanenbaum, A.S, Modern Operating Systems, 2nd /3rd Editions, Prentice Hall, ISBN 013-031-3580 / 0136-006-639.
Silbershatz, A., Galvin, P.B., Gagne, Modern Operating Systems, 8th Editions, Wiley, ISBN 0470-128-720.