15 UKernel

Information about 15 UKernel

Published on May 2, 2008

Author: Techy_Guy

Source: authorstream.com

Content

Micro-Kernels:  Micro-Kernels Ref: Liedtke paper The “Linux is obsolete” Debate [1992] (from http://www.oreilly.com/catalog/opensources/book/appa.html):  The “Linux is obsolete” Debate [1992] (from http://www.oreilly.com/catalog/opensources/book/appa.html) Andy Tanenbaum: “As a result of my occupation, I think I know a bit about where operating [systems] are going in the next decade or so. Two aspects stand out: MICROKERNEL VS MONOLITHIC SYSTEM Most older operating systems are monolithic, that is, the whole operating system is a single a.out file that runs in 'kernel mode.' This binary contains the process management, memory management, file system and the rest. Examples of such systems are UNIX, MS-DOS, VMS, MVS, OS/360, MULTICS, and many more. The alternative is a microkernel-based system, in which most of the OS runs as separate processes, mostly outside the kernel. They communicate by message passing. The kernel's job is to handle the message passing, interrupt handling, low-level process management, and possibly the I/O. Examples of this design are the RC4000, Amoeba, Chorus, Mach, and the not-yet-released Windows/NT. While I could go into a long story here about the relative merits of the two designs, suffice it to say that among the people who actually design operating systems, the debate is essentially over. Microkernels have won. The only real argument for monolithic systems was performance, and there is now enough evidence showing that microkernel systems can be just as fast as monolithic systems (e.g., Rick Rashid has published papers comparing Mach 3.0 to monolithic systems) that it is now all over but the shoutin'. MINIX is a microkernel-based system. The file system and memory management are separate processes, running outside the kernel. The I/O drivers are also separate processes (in the kernel, but only because the brain-dead nature of the Intel CPUs makes that difficult to do otherwise). LINUX is a monolithic style system. This is a giant step back into the 1970s. That is like taking an existing, working C program and rewriting it in BASIC. To me, writing a monolithic system in 1991 is a truly poor idea.” The “Linux is obsolete” Debate (cont.):  The “Linux is obsolete” Debate (cont.) Andy Tanenbaum: “PORTABILITY Once upon a time there was the 4004 CPU. When it grew up it became an 8008. Then it underwent plastic surgery and became the 8080. It begat the 8086, which begat the 8088, which begat the 80286, which begat the 80386, which begat the 80486, and so on unto the N-th generation. In the meantime, RISC chips happened, and some of them are running at over 100 MIPS. Speeds of 200 MIPS and more are likely in the coming years. These things are not going to suddenly vanish. What is going to happen is that they will gradually take over from the 80x86 line. They will run old MS-DOS programs by interpreting the 80386 in software. (I even wrote my own IBM PC simulator in C, which you can get by FTP from ftp.cs.vu.nl = 192.31.231.42 in dir minix/simulator.) I think it is a gross error to design an OS for any specific architecture, since that is not going to be around all that long. MINIX was designed to be reasonably portable, and has been ported from the Intel line to the 680x0 (Atari, Amiga, Macintosh), SPARC, and NS32016. LINUX is tied fairly closely to the 80x86. Not the way to go. Don't get me wrong, I am not unhappy with LINUX. It will get all the people who want to turn MINIX in BSD UNIX off my back. But in all honesty, I would suggest that people who want a **MODERN** "free" OS look around for a microkernel-based, portable OS, like maybe GNU or something like that.” “Linux is obsolete” (cont.):  “Linux is obsolete” (cont.) Linus Torvalds: >1. MICROKERNEL VS MONOLITHIC SYSTEM True, linux is monolithic, and I agree that microkernels are nicer. With a less argumentative subject, I'd probably have agreed with most of what you said. From a theoretical (and aesthetical) standpoint linux looses. If the GNU kernel had been ready last spring, I'd not have bothered to even start my project: the fact is that it wasn't and still isn't. Linux wins heavily on points of being available now. > MINIX is a microkernel-based system. [deleted, but not so that you > miss the point ] LINUX is a monolithic style system. If this was the only criterion for the "goodness" of a kernel, you'd be right. What you don't mention is that minix doesn't do the micro-kernel thing very well, and has problems with real multitasking (in the kernel). If I had made an OS that had problems with a multithreading filesystem, I wouldn't be so fast to condemn others: in fact, I'd do my damndest to make others forget about the fiasco. [ yes, I know there are multithreading hacks for minix, but they are hacks, and bruce evans tells me there are lots of race conditions ] “Linux is obsolete” (cont.):  “Linux is obsolete” (cont.) Linus Torvalds: >2. PORTABILITY "Portability is for people who cannot write new programs" -me, right now (with tongue in cheek) The fact is that linux is more portable than minix. What? I hear you say. It's true - but not in the sense that ast means: I made linux as conformant to standards as I knew how (without having any POSIX standard in front of me). Porting things to linux is generally /much/ easier than porting them to minix. I agree that portability is a good thing: but only where it actually has some meaning. There is no idea in trying to make an operating system overly portable: adhering to a portable API is good enough. The very /idea/ of an operating system is to use the hardware features, and hide them behind a layer of high-level calls. That is exactly what linux does: it just uses a bigger subset of the 386 features than other kernels seem to do. Of course this makes the kernel proper unportable, but it also makes for a /much/ simpler design. An acceptable trade-off, and one that made linux possible in the first place. Approaches to OS Organization:  Approaches to OS Organization Macro-Kernels (aka Monolithic kernels) High-level interface over hardware System calls to provide services for process management, concurrency, memory management that all run in supervisor mode Tightly integrated code, all parts of kernel operate under one address space; can be made highly efficient But an error in one module can bring entire system down Examples: BSD Unix, Linux, older systems (e.g., OS/360) Micro-Kernels Low-level interface over hardware System calls implement minimal amount of functionality, rest is implemented outside the kernel via servers What does this mean? Return to this later Servers operate in different address spaces Examples: Mach, Spring OS (Sun) Micro- vs. Macro-Kernel:  Micro- vs. Macro-Kernel Micro-kernels offer More modular structure (though monolithic kernels can also be modular) Fault isolation: fault in one server does not bring down other services (just like user processes) System more flexible and tailorable - different strategies implemented in different servers (with different APIs) can co-exist within the same system Disadvantages of Micro-kernels (conventional wisdom) Slower (e.g., due to more address space changes) Not sufficiently flexible Liedtke argues this is not the case What is in the Micro-Kernel?:  What is in the Micro-Kernel? Functionality should determine this, not performance Traditional performance bottlenecks can be eliminated, e.g., author reports 22x faster IPC than Mach micro-kernel Put in microkernel only if leaving it outside (allowing competing implementations) would prevent implementing required OS functionality Independence between subsystems: must be able to implement an arbitrary subsystem S so that it cannot be disturbed or corrupted by another subsystem S’ Integrity: Must be a way for S1 to address S2 and establish a communication channel that can neither be corrupted nor eavesdropped by S’ Based on this principal, kernel should implement only three things Address spaces (independence) Threads and IPC (independence and integrity) Unique identifiers (integrity) Address Spaces:  Address Spaces Fundamental concepts: Initial address space that represents physical memory, three operations to implement protected address spaces above it Map Owner of address space A maps page into another address space B Page can be accessed in both address spaces Receipient has to agree Mapper can only map pages it can already access Grant Like map, but owner gives up access to the page Used in specialized cases: when a server is an intermediary passing on pages Flush If A flushes a page, the page is removed from address spaces that received the page from A through a (direct or indirect) grant or map Example Address Space Use:  Example Address Space Use A memory manager is just a process (server) managing the initial address space, entirely outside the kernel Standard pager process maps pages to memory manager process Memory managers can be stacked: one can grant parts of the physical memory to a second manager, other parts to a third memory manager [e.g., to help implement virtual machines] A pager can be a totally separate server, communicating through IPC Of course, it could also be integrated in a memory manager Allows one to easily implement specialized policies (e.g., real-time) Threads and IPC:  Threads and IPC Thread is an activity executing inside an address space Thread = registers, PC, SP, State, address space in which it executes Thread management must be part of the kernel. Why? Thread may modify (corrupt) address space For protection reasons, kernel must control accesses to a thread’s address space Follows that cross-address space communication (IPC) must also be within kernel IPC enforces rules (agreements between sender and receiver) for communications Needed for grant and map address space operations Interrupt can be viewed as hardware “threads” sending messages to other interrupt handler threads; interrupt handling code outside the micro-kernel Unique Identifiers:  Unique Identifiers Micro-kernel must assign unique identifiers (uid) for something (threads or tasks or communication channels) If S1 wants to send a message to S2, the micro-kernel must know which uid corresponds to S2 Flexibility: Examples:  Flexibility: Examples Allows for multiple memory managers/pagers to be implemented outside microkernel, as discussed earlier Device drivers can be implemented outside microkernel as ordinary processes Access hardware I/O ports by having them mapped into its address space Process interrupts via IPC mechanism RPC can be implemented outside microkernel as communications servers that talk to network device drivers through IPC Unix system calls can be implemented by a Unix server process Performance:  Performance Concern: Micro-kernel based OS can suffer from poor performance due to switching between kernel and user mode, switching between address spaces, context switching between threads True? Liedtke argues no! Look at the concept, not a particular implementation Kernel-User Mode Switches:  Kernel-User Mode Switches Calling kernel from user mode essentially Indirect procedure call Switch from user to kernel stack Setting internal “kernel bit” to allow privileged instructions Cost (50 MHz x86 machine) 71 cycles for call, 36 cycles for return Measured cost (Mach kernel): 900 cycles! Liedtke argues this is a solvable implementation artifact; counter example is L3 kernel takes 15 extra cycles (plus if infrequent, 3 TLB misses, 10 cache misses) or total 123 to 180 cycles (misses cost more today) Address Space Switches:  Address Space Switches Main cost is in TLB (Translation lookaside buffer) that caches recent virtual to physical page mappings Tagged TLB: keep address space tag to distinguish between virtual addresses from different address spaces, allowing TLB to hold translations for different virtual address spaces Cost is loading TLB entries for micro-kernel when invoked; OK if microkernel has small memory footprint Untagged: must flush TLB when switching to a new process (virtual address space) Costly to reload TLB Idea: map several address spaces into one linear address space, e.g., keep small commonly used server address spaces shared with large user address spaces Liedtke argues cost can be kept low Thread Switches and IPC:  Thread Switches and IPC Similarly, RPC can be made very fast with careful design 10 microseconds round trip time for RPC on several OS’s (e.g., Spring, L3) Memory Effects:  Memory Effects Measurements of microkernel implementation (Mach + Unix server) have less efficient cache behavior compared to a monolithic (Ultrix) kernel Liedtke tracks problem down to cache misses in microkernel, which can be solved by reducing working set size of microkernel implementation (his L3 microkernel OS demonstrates this), e.g., IPC implementation Portability:  Portability Argues microkernel are inherently not portable; must be optimized to exploit hardware details to obtain reasonable performance Take advantage of hardware details for fastest possible implementation Algorithms in microkernel processor dependent Describes case study porting from 486 to Pentium So Liedtke agrees with Linus Torvalds on this issue, while (ironically) making the case for microkernels! Summary:  Summary Makes case for microkernels Modularity, flexibility Common concerns regarding performance can be overcome with careful design Methodology: Be careful with empirical measurements! You may be seeing implementation artifacts rather than fundamental behaviors

Related presentations


Other presentations created by Techy_Guy

Character Analysis
04. 01. 2008
0 views

Character Analysis

Roosevelt and Latin America
22. 10. 2007
0 views

Roosevelt and Latin America

S10 Processor Performance
17. 09. 2007
0 views

S10 Processor Performance

Hawaiian Humpback Whale
17. 09. 2007
0 views

Hawaiian Humpback Whale

rainforest
02. 10. 2007
0 views

rainforest

Comvalid BGPsentinel
07. 10. 2007
0 views

Comvalid BGPsentinel

PETERPAN
10. 10. 2007
0 views

PETERPAN

across crocodile lake
11. 10. 2007
0 views

across crocodile lake

MLM basic info
12. 10. 2007
0 views

MLM basic info

VortragRichter
15. 10. 2007
0 views

VortragRichter

azerbaijan
15. 10. 2007
0 views

azerbaijan

ch02jjm
19. 10. 2007
0 views

ch02jjm

PRNAV Eurocontrol presentation
19. 10. 2007
0 views

PRNAV Eurocontrol presentation

Hakkarainen 091104
17. 09. 2007
0 views

Hakkarainen 091104

Extreme Ostrich2
17. 09. 2007
0 views

Extreme Ostrich2

Soy Protein in Baking
04. 10. 2007
0 views

Soy Protein in Baking

McMurrenTidbits
23. 10. 2007
0 views

McMurrenTidbits

Larijani stemcell ABA2007 Final
24. 10. 2007
0 views

Larijani stemcell ABA2007 Final

F Gauze
24. 10. 2007
0 views

F Gauze

TornadoSafetyAMS
07. 10. 2007
0 views

TornadoSafetyAMS

nii report
09. 10. 2007
0 views

nii report

NS102 3a S07 Fighting Sail
21. 10. 2007
0 views

NS102 3a S07 Fighting Sail

am0845 Khanna
16. 11. 2007
0 views

am0845 Khanna

culturechange
10. 12. 2007
0 views

culturechange

Jeopardy
29. 10. 2007
0 views

Jeopardy

masstheory
02. 11. 2007
0 views

masstheory

Finnish Chemicals information
21. 08. 2007
0 views

Finnish Chemicals information

zodiac
21. 08. 2007
0 views

zodiac

ICT Expo Presentation
21. 08. 2007
0 views

ICT Expo Presentation

words alive notes
21. 08. 2007
0 views

words alive notes

notes 13
21. 08. 2007
0 views

notes 13

200612011440150 ser mama
01. 10. 2007
0 views

200612011440150 ser mama

t5f2
07. 11. 2007
0 views

t5f2

PHYS 124 lt 2
13. 11. 2007
0 views

PHYS 124 lt 2

Localization days1 2
14. 11. 2007
0 views

Localization days1 2

Barlow
15. 11. 2007
0 views

Barlow

CEO breakfast Mar
16. 11. 2007
0 views

CEO breakfast Mar

SEVESO II 28 04 2003 d jansen
23. 11. 2007
0 views

SEVESO II 28 04 2003 d jansen

farawayplaces quiz
31. 10. 2007
0 views

farawayplaces quiz

lino hospitalstay 2005
28. 12. 2007
0 views

lino hospitalstay 2005

eno
05. 10. 2007
0 views

eno

Destinos Tradicionale
22. 10. 2007
0 views

Destinos Tradicionale

El Karib Hagmann 2001 HEKS ACORD
23. 10. 2007
0 views

El Karib Hagmann 2001 HEKS ACORD

Bioceramics
05. 01. 2008
0 views

Bioceramics

dennis
07. 01. 2008
0 views

dennis

DNR wetland benefits
07. 01. 2008
0 views

DNR wetland benefits

Norm Wright Presentation06
17. 09. 2007
0 views

Norm Wright Presentation06

Tudor Sports
21. 08. 2007
0 views

Tudor Sports

watson 2006
21. 08. 2007
0 views

watson 2006

IBM Presentation Roel Spee
24. 10. 2007
0 views

IBM Presentation Roel Spee

david simek
17. 09. 2007
0 views

david simek

75thWinter Silver
02. 08. 2007
0 views

75thWinter Silver

Revay Presentation
17. 09. 2007
0 views

Revay Presentation

week12 f03
17. 09. 2007
0 views

week12 f03

Ch12 ResolutionTheoremPro ving
17. 09. 2007
0 views

Ch12 ResolutionTheoremPro ving

INFOCOM99
05. 10. 2007
0 views

INFOCOM99

RoHS Presentation3 May
12. 10. 2007
0 views

RoHS Presentation3 May

Botany
07. 12. 2007
0 views

Botany

Week6February20 07
20. 02. 2008
0 views

Week6February20 07

Microcosmo Parte II
12. 10. 2007
0 views

Microcosmo Parte II

TSW
29. 02. 2008
0 views

TSW

HazMat Flow Study
26. 02. 2008
0 views

HazMat Flow Study

Vegetarian Nutrition 101
04. 03. 2008
0 views

Vegetarian Nutrition 101

White 10th Inter mountain
21. 08. 2007
0 views

White 10th Inter mountain

hondaimobil
02. 01. 2008
0 views

hondaimobil

Cfi
10. 03. 2008
0 views

Cfi

Timber Bridge Presentation
01. 01. 2008
0 views

Timber Bridge Presentation

carstenschymik
29. 12. 2007
0 views

carstenschymik

Ch 22 WB
07. 04. 2008
0 views

Ch 22 WB

Macroclean
10. 04. 2008
0 views

Macroclean

agingandwork
13. 04. 2008
0 views

agingandwork

nyBrazeau
14. 04. 2008
0 views

nyBrazeau

presentation total
16. 04. 2008
0 views

presentation total

3 Tufano2002
17. 04. 2008
0 views

3 Tufano2002

Chapter 18
18. 04. 2008
0 views

Chapter 18

Baltic states and Russia
12. 10. 2007
0 views

Baltic states and Russia

quotes
03. 10. 2007
0 views

quotes

WDR 2008
29. 11. 2007
0 views

WDR 2008

CHLA PSRS Overview
30. 04. 2008
0 views

CHLA PSRS Overview

Mr Logan OCCAR
06. 03. 2008
0 views

Mr Logan OCCAR

shen
15. 10. 2007
0 views

shen

Industry Brief
22. 10. 2007
0 views

Industry Brief

sess 4 solano
18. 06. 2007
0 views

sess 4 solano

sess 2 vollmer
18. 06. 2007
0 views

sess 2 vollmer

NSDI05 poster
18. 06. 2007
0 views

NSDI05 poster

NLC talk
18. 06. 2007
0 views

NLC talk

My Proxy GW06
18. 06. 2007
0 views

My Proxy GW06

my Master 4
18. 06. 2007
0 views

my Master 4

More Mosaics
18. 06. 2007
0 views

More Mosaics

MEM SPI Jan00
18. 06. 2007
0 views

MEM SPI Jan00

VCA Org Charts
11. 12. 2007
0 views

VCA Org Charts

cjdim com Boudchiche
23. 10. 2007
0 views

cjdim com Boudchiche

GA Conf06China1
25. 03. 2008
0 views

GA Conf06China1

lecture 7 deadlock
17. 09. 2007
0 views

lecture 7 deadlock

Neptune Presentation
15. 06. 2007
0 views

Neptune Presentation

neptune
15. 06. 2007
0 views

neptune

Mehregan
18. 06. 2007
0 views

Mehregan

Plants are very useful
15. 06. 2007
0 views

Plants are very useful

Learning Phonics
15. 06. 2007
0 views

Learning Phonics

Learning Percent III
15. 06. 2007
0 views

Learning Percent III

Learning Percent I
15. 06. 2007
0 views

Learning Percent I

Physical Education Procedures
15. 06. 2007
0 views

Physical Education Procedures

Penguins
15. 06. 2007
0 views

Penguins

Olympic Wax Museum
15. 06. 2007
0 views

Olympic Wax Museum

howe9
17. 09. 2007
0 views

howe9

GSantin Siena 2 SpaceTools
03. 01. 2008
0 views

GSantin Siena 2 SpaceTools

gunderia powerpointlab
26. 11. 2007
0 views

gunderia powerpointlab

MySQL UC solid DB xact
18. 06. 2007
0 views

MySQL UC solid DB xact

Civics Lecture
31. 12. 2007
0 views

Civics Lecture

Physics and psycho2
14. 02. 2008
0 views

Physics and psycho2

TOUREDIT
12. 03. 2008
0 views

TOUREDIT

harvard deas
03. 01. 2008
0 views

harvard deas

Angelology
01. 10. 2007
0 views

Angelology

HenryVIII wwtbam
21. 08. 2007
0 views

HenryVIII wwtbam

AGU 2002
03. 10. 2007
0 views

AGU 2002

RubÃn Blades
22. 10. 2007
0 views

RubÃn Blades

tran present
21. 08. 2007
0 views

tran present

BU01
17. 09. 2007
0 views

BU01

Thode
17. 09. 2007
0 views

Thode

PP R CAJAR
22. 10. 2007
0 views

PP R CAJAR

moore lightning uw05
17. 09. 2007
0 views

moore lightning uw05

Space- The Outside World
15. 06. 2007
0 views

Space- The Outside World

arts and humanities applications
22. 11. 2007
0 views

arts and humanities applications

Session9 CATHALAC UNDP
25. 10. 2007
0 views

Session9 CATHALAC UNDP

use sunscreen
17. 09. 2007
0 views

use sunscreen

aatom
20. 11. 2007
0 views

aatom

9681
02. 08. 2007
0 views

9681

HHDL
15. 10. 2007
0 views

HHDL