Professional Documents
Culture Documents
Lecture 2
Lecture 2
Lecture 2
Week 1
Overview
Motivation: Why talk about structure? Kernel structures
Monolithic kernels Open systems Microkernels Kernel Extensions (Tuesday) Virtual Machines (Tuesday)
CSC469
Week 1
Motivation
Lets review what OS provides
Abstraction layers Protection boundaries Resource allocators Resource schedulers
Its complicated!
CSC469
Week 1
Monolithic OS
Apache
libc libpthread
Mozilla
libc libpthread
Emacs
libc
CPU Scheduling
Kernel
CSC469
Week 1
Disadvantages?
CSC469
Open Systems
Mozilla
Kernel and Applications
Apache
Emacs Networking
CPU
Network
Memory
Disk
CSC469
Week 1
Very good performance, very extensible, works well for single-user OS No protection btwn kernel and/or apps, not very stable, composing extensions can lead to unpredictable behavior
Week 1
Disadvantages?
Microkernel OS
Mozilla libc libpthread Apache libc libpthread
Microkernel
Networking
Emacs libc
File System
Interprocess Communication
CPU Scheduling
Security
CPU
CSC469
Network
Memory
Disk
Week 1
Properties of Microkernels
Design Philosophy: protected kernel code provides minimal small, clean, logical set of abstractions
Tasks and threads Virtual memory Interprocess communication
Everything else is a server process running at user-level Examples: Mach, Chorus, QNX, GNU Hurd Mixed results
CSC469 Week 1
Microkernel Advantages
Extensible: add a new server to add new OS functionality Kernel does not determine operating system environment
Allows support for multiple OS personalities Need an emulation server for each system (e.g. Mac, Windows, Unix) All applications run on same microkernel Applications can use customized OS (e.g. for databases)
CSC469 Week 1
More Advantages
Mostly hardware agnostic
Threads, IPC, user-level servers dont need to worry about underlying hardware
Strong protection
Even of the OS against itself (i.e., the parts of the OS that are implemented as servers)
CSC469
Week 1
Microkernel Disadvantages
Performance
System calls can require a lot of protection mode changes (next slide)
CSC469
Week 1
Application
UNIX Personality
Microkernel
Week 1
Step 1: Proof of Concept Take BSD 4.1 and fix VM, threads, IPC Step 2: Microkernel and single-server Unix emulation Take unix kernel and saw it in half Step 3: Microkernel and multiple servers (for FS, paging, network, etc.) Servers glued together by modules that catch system calls
Week 1
CSC469
Mach
Reality:
Proof of concept completed in 1989 Unix server, SMP support, kernel threads, 5 HW architectures Commercial deployment: Encore Multimax, Convex Exemplar, OSF/1, NeXT (and eventually to OS X) Microkernel and single-server completed and deployed to 10s of machines Multi-server never fully completed
CSC469
Week 1
Ports
Message origin / destination Have access rights (embodied as capabilities) Essentially an object reference mechanism Basis of all communication in Mach
Messages
Network servers
Mach Multiprocessor
Network
Thread Processor
Network Kernel
Week 1
Next Time
OS Extensions The Exokernel Virtual machines
CSC469
Week 1