Microkernels John Criswell University of Rochester 1 Onwards to - - PowerPoint PPT Presentation

microkernels
SMART_READER_LITE
LIVE PREVIEW

Microkernels John Criswell University of Rochester 1 Onwards to - - PowerPoint PPT Presentation

CSC 256/456: Operating Systems Microkernels John Criswell University of Rochester 1 Onwards to user-space! 2 Microkernels 3 Monolithic Kernel (aka Everything and the Kitchen Sink) Application Application Libraries Commands


slide-1
SLIDE 1

CSC 256/456: Operating Systems

Microkernels

John Criswell University of Rochester

1

slide-2
SLIDE 2

Onwards to user-space!

2

slide-3
SLIDE 3

Microkernels

3

slide-4
SLIDE 4

Monolithic Kernel (aka Everything and the Kitchen Sink)

Application Programs Libraries Commands

Device Driver

Application Programs OS System Call Interface

Device Driver Device Driver

Driver Interface

Monolithic Kernel Module

  • Process Management
  • Memory Management
  • File Management
  • Device Mgmt Infrastructure

4

slide-5
SLIDE 5

Monolithic Kernel Limitations

❖ Poor security ❖ Buffer overflow gains access to everything! ❖ Poor reliability ❖ Bug in kernel can affect unrelated subsystems ❖ Difficult to restart faulty subsystem

5

slide-6
SLIDE 6

Processes Don’t Have This Problem

❖ Isolated memory ❖ Communication via ❖ Pipes ❖ Explicitly shared memory ❖ Self-contained programs ❖ No access to irrelevant data

structures

Web Server Email Client MP3 Player

6

slide-7
SLIDE 7

Could kernel components be processes?

7

slide-8
SLIDE 8

Microkernel

❖ Move kernel functionality into user-space processes ❖ File systems ❖ Networking subsystem ❖ Drivers ❖ Kernel provides ❖ Protection ❖ Communication mechanisms

8

slide-9
SLIDE 9

Microkernel

9

File System TCP/IP Ethernet Driver Disk Driver Process Credentials Address Space IPC Terminal Driver Web Server Email Client MP3 Player Page Replacement Video Game Interrupt Handler

User Mode Kernel Mode

slide-10
SLIDE 10

Advantages of Microkernels

❖ Faults are localized ❖ Bug in network code doesn’t corrupt disk data ❖ Easier to improve reliability ❖ Can monitor and restart processes (e.g., filesystem) ❖ Easier to apply security techniques ❖ Randomization and re-randomization (Guiffruida) ❖ Apply memory safety or type-safe language to critical

processes

10

slide-11
SLIDE 11

Disadvantages of Microkernels

❖ Communication overhead ❖ Semantics of message passing affects performance ❖ What is placed in user-space affects performance ❖ User/Kernel boundary crossing overhead ❖ Context switching overhead ❖ Monolithic libraries are always available ❖ User-space service may not have CPU when needed ❖ TLB Flush when switching page table pages 11

slide-12
SLIDE 12

Microkernel Advantages are Not Magic

❖ Reliability must be designed and built ❖ File system process crash still catastrophic ❖ Restart of critical processes must be designed and

built

❖ Security is still an issue ❖ Exploited file system process can access any file ❖ Exploited network process can read all packets

12

slide-13
SLIDE 13

Mach

❖ Developed at Carnegie Mellon University in the 80’s ❖ Memory management design influenced modern OS

design

❖ Goal: separate policy from mechanism

13

slide-14
SLIDE 14

Example: Mach

❖ User-level memory management ❖ trusted/protected by the kernel ❖ kernel provides the basic protection mechanism ❖ user-level memory manager handles page loading; decides replacement policy

14

slide-15
SLIDE 15

Microkernel Failures

❖ Windows NT family ❖ Original Windows NT had microkernel design ❖ By Windows 2000, functionality moved into kernel ❖ Mac OS X ❖ Based on NextStep which is based on Mach + 4.4BSD ❖ BSD sub-systems moved into kernel; live alongside Mach ❖ Essentially two kernels living in the same space

15

slide-16
SLIDE 16

Microkernel Successes

❖ QNX (real-time operating system kernel) ❖ Symbian (mobile operating system) ❖ L4 ❖ Major work to reduce microkernel overheads ❖ Can run Linux with L4Linux ❖ seL4: Fully verified variant

16

slide-17
SLIDE 17

Hypervisors and Virtual Machines

17

slide-18
SLIDE 18

Virtual Machines

❖ Run multiple OS instances ❖ Migrate OS instances from one machine to another ❖ Software compatibility when hardware changes

18

Windows Mac OS X Linux ??? Hardware

slide-19
SLIDE 19

Compiler Translation

❖ Translate binary code (Original VMWare) ❖ Translate virtual code (JVM, OS/360)

19

Windows Mac OS X Linux Original VMWare Hardware

slide-20
SLIDE 20

Para-Virtualizaiton

❖ Modify OS to interface with lower-level hypervisor ❖ Efficient but requires OS changes

20

Windows Mac OS X Linux Original Xen Hardware

slide-21
SLIDE 21

Hardware Virtualization

❖ Hardware provide new privilege layer under OS ❖ Efficient ❖ Compatible ❖ Requires new hardware

21

Windows Mac OS X Linux Xen, Hyper-V Hardware

slide-22
SLIDE 22

Credits

❖ Some slides based on slides from previous year ❖ Slides only to be used for instruction at the University of

Rochester

22