SlideShare uma empresa Scribd logo
1 de 61
Baixar para ler offline
Plan for Today
Microkernels
L4
Exokernels
1
Reminder: don’t forget
to sign up for your
project
submission/presentati
on option
2
From: torv...@klaava.Helsinki.FI (Linus Benedict Torvalds)
Newsgroups: comp.os.minix
Subject: Re: LINUX is obsolete
Date: 31 Jan 92 10:33:23 GMT
…
>I still maintain the point that designing a monolithic kernel in 1991 is
>a fundamental error. Be thankful you are not my student. You would
>not get a high grade for such a design :-)
Well, I probably won't get too good grades even without you: I had an
argument (completely unrelated - not even pertaining to OS's) with the
person here at the university that teaches OS design. I wonder when
I'll learn :)
…
AndyTanenbaum
From Class 3:
Should a file system be in
the kernel?
3
4
Monolithic Kernel
Hardware
Application
Syscall Handler
File System
Device Drivers
Scheduler
Memory Manager
KernelMode
UserMode
Microkernel
Hardware
Minimal Kernel
Application
UserMode
File
System
Device
Drivers
I/ODevice
Display
Device
5
KernelMode
Microkernel
Hardware
Minimal Kernel
Application
UserMode
What must be in the minimal kernel?
File
System
Device
Drivers
I/ODevice
Display
Device
From: ast@cs.vu.nl (Andy Tanenbaum)
Newsgroups: comp.os.minix
Subject: LINUX is obsolete
Date: 29 Jan 92 12:12:50 GMT
I was in the U.S. for a couple of weeks, so I haven't commented
much on LINUX (not that I would have said much had I been
around), but for what it is worth, I have a couple of comments now.
As most of you know, for me MINIX is a hobby, something that I do
in the evening when I get bored writing books and there are no
major wars, revolutions, or senate hearings being televised live on
CNN. My real job is a professor and researcher in the area of
operating systems.
As a result of my occupation, I think I know a bit about where
operating are going in the next decade or so. Two aspects stand out:
6
(Picture from 1998)
1. 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.
7
8
KernelMode
Microkernel
Hardware
Minimal Kernel
Application
File
System
Device
Drivers
I/ODevice
UserMode
Why didn’t microkernels actually win?
Monolithic Kernel
Hardware
Application
Syscall Handler
File System
Device Drivers
Scheduler
Memory Manager
Display
Device
9
KernelMode
Microkernel
Hardware
Minimal Kernel
Application
UserMode
What is hard about making microkernels work?
File
System
Device
Drivers
I/ODevice
Display
Device
10
KernelMode
Microkernel
Hardware
Minimal Kernel
Application
UserMode
What is hard about making microkernels work?
File
System
Device
Drivers
I/ODevice
Display
Device
fopen
Inter-process
Communication
(IPC)
Comparing Linux and Minix Performance
11
“The IOtest read test
simply performs
random reads of
varying sizes.”
MB/s
Minix
Linux
LWN.net, 5 Feb 2007
Really Comparing Linux and Minix
12
LWN.net, 5 Feb 2007 “Throughput” (Indexed)
Linux
Minix
Linux is 8-50 times
faster for things
that matter!
Did microkernels actually lose?
13
2008 2013
1 000 000 000
Android Activations
-13.8B
Universe
Tools
Altruism
-5M 1679
Programmabl
e Machines
S ::= NP V O
NP ::= N
and NP
Recursive
Language
-300K 1945
Practical
Universal
Machines
1950s
Abstractions
1969
Modern OS
1993
Open
Source OS,
runs on
cheap
machines
Cheaper,
faster, low-
energy
processors,
Internet,
web, $$$
From Class 3:
Monolithic Kernels
“Microkernels have won.” 1992
Did microkernels actually lose?
14
2008 2013
1 000 000 000
Android Activations
-13.8B
Universe
Tools
Altruism
-5M 1679
Programmabl
e Machines
S ::= NP V O
NP ::= N
and NP
Recursive
Language
-300K 1945
Practical
Universal
Machines
1950s
Abstractions
1969
Modern OS
1993
Open
Source OS,
runs on
cheap
machines
Cheaper,
faster, low-
energy
processors,
Internet,
web, $$$
Monolithic Kernels
“Microkernels have won.” 1992
15
2008 2013
1B Android Activations
Sep 2013
-13.8B
Universe
Tools
Altruism
-5M 1679
Programmable
Machines
S ::= NP V O
NP ::= N and
NP
Recursive
Language
-300K 1945
Practical Universal
Machines
1950s
Abstractions
1969
Modern OS
1993
Open Source
OS, runs on
cheap
machines
Cheaper,
faster, low-
energy
processors,
Internet,
web, $$$
1993
> 1B Windows
machines in 2011
Is Windows
NT/XP/7/8
really a
microkernel?
16
Is Windows
NT/XP/7/8
really a
microkernel?
17
Summer 1986 USENIX Conference
18
Summer 1986 USENIX Conference
19
Is Windows
NT/XP/7/8
really a
microkernel?
20
21
2008 2013
1B Android Activations
Sep 2013
-13.8B
Universe
Tools
Altruism
-5M 1679
Programmable
Machines
S ::= NP V O
NP ::= N and
NP
Recursive
Language
-300K 1945
Practical Universal
Machines
1950s
Abstractions
1969
Modern OS
1993
Open Source
OS, runs on
cheap
machines
Cheaper,
faster, low-
energy
processors,
Internet,
web, $$$
22
2008 2013
1B Android Activations
Sep 2013
-13.8B
Universe
Tools
Altruism
-5M 1679
Programmable
Machines
S ::= NP V O
NP ::= N and
NP
Recursive
Language
-300K 1945
Practical Universal
Machines
1950s
Abstractions
1969
Modern OS
1993
Open Source
OS, runs on
cheap
machines
Cheaper,
faster, low-
energy
processors,
Internet,
web, $$$
1.5B L4 Microkernel Systems
Jan 2012
23
24
1953-10 June 2001
25
L3 Abstractions
26
Task
Threads: each has global,
unique ID
Own Address Space
Shared data spaces
Message
From: thread ID
To: thread ID
Direct/Indirect String
Data (optional)
Microkernel
Manages Tasks
Sends messages between tasks
L3 Abstractions
27
Task
Threads: each has global,
unique ID
Own Address Space
Shared data spaces
Message
From: thread ID
To: thread ID
Direct/Indirect String
Data (optional)
Microkernel
Manages Tasks
Sends messages between tasks
What is a hardware
interrupt in L3?
Minimal IPC
28
Task A Task B
Kernel
Thread A1 Thread B1Message
Minimal IPC
29
Task A Task B
Kernel
Thread A1 Thread B1
1. load B1 ID
2. load message
3. call kernel
Minimal IPC
30
Task A Task B
Kernel
Thread A1 Thread B1
1. load B1 ID
2. load message
3. call kernel
4. access Thread B1
5. switch stack pointer
6. switch address space
7. load A’s ID
8. return to user mode
9. receive
Implementation
31
Task A Task B
Kernel
1. load B1 ID
2. load message
3. call kernel
4. access Thread B1
5. switch stack pointer
6. switch address space
7. load A’s ID
8. return to user mode
9. receive
Implementation
32
Task A Task B
Kernel
1. load B1 ID
2. load message
3. call kernel
4. access Thread B1
5. switch stack pointer
6. switch address space
7. load A’s ID
8. return to user mode
9. receive
Implementation
33
Task A Task B
Kernel
1. load B1 ID
2. load message
3. call kernel
4. access Thread B1
5. switch stack pointer
6. switch address space
7. load A’s ID
8. return to user mode
9. receive
What does this minimal
implementation rely on?
Implementation
34
Task A Task B
Kernel
1. load B1 ID
2. load message
3. call kernel
4. access Thread B1
5. switch stack pointer
6. switch address space
7. load A’s ID
8. return to user mode
9. receive
What does this minimal
implementation rely on?
Synchronous:
Receiving thread is waiting
Sender waits until reply
No timeouts: all IPC calls must
guarantee termination
35
What if the message has data?
36
Task A Screen Driver
Kernel
Thread A1 Thread B1
1. load B1 ID
2. load message
3. call kernel
4. access Thread B1
5. switch stack pointer
6. switch address space
7. load A’s ID
8. return to user mode
9. receive
display “Hello L3!”
“Hello L3!”
Copy Through Kernel
37
Task A Screen Driver
Kernel
Thread A1 Thread B1
1. load B1 ID
2. load message
3. call kernel
4. access Thread B1
5. switch stack pointer
6. switch address space
7. load A’s ID
8. return to user mode
9. receive
display “Hello L3!”
“Hello L3!”
“Hello L3!”
“Hello L3!”
Screen Driver
Copy Direct
38
Task A
Kernel
Thread A1 Thread B1
1. load B1 ID
2. load message
3. call kernel
4. access Thread B1
5. switch stack pointer
6. switch address space
7. load A’s ID
8. return to user mode
9. receive
“Hello L3!” “Hello L3!”
0. set up receive
buffer
OS Design Tradeoffs
Monolithic (e.g., Linux) Microkernel (e.g., L4)
39
Biggest Advantage of Microkernels
40
IronKernel:
9.8K lines of Rust
+ 273 lines of asm
rust-core: 6.5K
Windows NT 3.1: 5M LOC
Linux kernel 3.6: 16M LOC
Biggest Advantage of Microkernels
41
IronKernel:
9.8K lines of Rust + 273 lines of asm
rust-core: 6.5K
arch: 2.1K (1.7K is font.rs)
kernel: 1178
63 fs.rs
38 int.rs
95 mod.rs
10 ptr.rs
351 rt.rs
343 sgash.rs (46 for printing logo!)
278 memory/*.rs
42
SOSP 2009
43
Size of code: 8,700 lines (2 person-months)
Size of proof: 200,000 lines (20 person-years ~ 11)
44
What should the
specification for the
scheduler look like?
45
What should the
specification for the
scheduler look like?
Isabelle/HOL
scheduler spec
46
KernelMode
Microkernel
Hardware
Minimal Kernel
Application
File
System
Device
Drivers
I/ODevice
UserMode
Monolithic Kernel
Hardware
Application
Syscall Handler
File System
Device Drivers
Scheduler
Memory Manager
Display
Device
Exokernel
Hardware
Really Minimal Kernel
Application2
(+libraries)
Application1
(+libraries)
Definition from Class 1:
47
An operating system is a program
that manages resources and
provides abstractions.
48
HotOS 1995
49
Slide from
Exokernels (or,
making the
operating system
just another
application library)
Dawson Engler
Frans Kaashoek
Greg Ganger
H. Briceño
R. Hunt
D. Mazières
T. Pinckney
J. Jannotti
50
51
KernelModeUserMode
Exokernel
Hardware
Really Minimal Kernel
Application2
(+libraries)
Application1
(+libraries)
Multiplexing Resources
52
KernelModeUserMode
Exokernel
Hardware
Really Minimal Kernel
Application2
(+libraries)
Application1
(+libraries)
Multiplexing Resources
CPU Core: time share
Memory: share by allocating pages to processes
Persistent Storage (Disk): divide into blocks
How should exokernel decide if a
process can read a disk block?
53
Kernel can query FS:
owns(meta) := set of blocks
owned by meta
Must be deterministic and
persistent
Kernel checks after any
modification!
54
Examples from Dawson Engler’s PhD Thesis
55
2008 2013
1B Android Activations
Sep 2013
-13.8B
Universe
Tools
Altruism
-5M 1679
Programmable
Machines
S ::= NP V O
NP ::= N and
NP
Recursive
Language
-300K 1945
Practical Universal
Machines
1950s
Abstractions
1969
Modern OS
1993
Open Source
OS, runs on
cheap
machines
Cheaper,
faster, low-
energy
processors,
Internet,
web, $$$
1.5B L4 Microkernel Systems
Jan 2012
How many exokernels?
56
2008 2013
1B Android Activations
Sep 2013
-13.8B
Universe
Tools
Altruism
-5M 1679
Programmable
Machines
S ::= NP V O
NP ::= N and
NP
Recursive
Language
-300K 1945
Practical Universal
Machines
1950s
Abstractions
1969
Modern OS
1993
Open Source
OS, runs on
cheap
machines
Cheaper,
faster, low-
energy
processors,
Internet,
web, $$$
1.5B L4 Microkernel Systems
Jan 2012Companies (intellectually)
derived from exokernel
project:
What’s Next?
57
“Bitter experience in the
design of operating systems
leads to the conclusion that
radical changes must be
made, both the way we think
about functions of operating
systems and in the way they
are implemented.”
What’s Next?
58
“Bitter experience in the
design of operating systems
leads to the conclusion that
radical changes must be
made, both the way we think
about functions of operating
systems and in the way they
are implemented.”
Butler Lampson
NATO Software Engineering
Techniques Conference 1969
Kernel
Hope for FeROS?
59
(Rust) Task A (Rust) Task B (File System)
Memory Isolation enforced by language mechanisms
IPC through safe, shared data
External resources managed through cryptography
No cost to calling between tasks, kernel: all in same address space!
Charge!
Tanenbaum was wrong about microkernels
having won in 1992
Prevailing wisdom is wrong about
microkernels having lost in 2014
60
Butler is still right: The real OS of the
future should be something radically
different and you should help build it!
Remember
to sign up
for your
project
submission
option!

Mais conteúdo relacionado

Mais procurados

Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksDavid Evans
 
Scheduling in Linux and Web Servers
Scheduling in Linux and Web ServersScheduling in Linux and Web Servers
Scheduling in Linux and Web ServersDavid Evans
 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyAnne Nicolas
 
Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Kernel Recipes 2019 - CVEs are dead, long live the CVE!Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Kernel Recipes 2019 - CVEs are dead, long live the CVE!Anne Nicolas
 
Input and Output Devices and Systems
Input and Output Devices and SystemsInput and Output Devices and Systems
Input and Output Devices and SystemsNajma Alam
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingViller Hsiao
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and moreBrendan Gregg
 
DevoxxUK: Is your profiler speaking the same language as you?
DevoxxUK: Is your profiler speaking the same language as you?DevoxxUK: Is your profiler speaking the same language as you?
DevoxxUK: Is your profiler speaking the same language as you?Simon Maple
 
Devoxx PL: Is your profiler speaking the same language as you?
Devoxx PL: Is your profiler speaking the same language as you?Devoxx PL: Is your profiler speaking the same language as you?
Devoxx PL: Is your profiler speaking the same language as you?Simon Maple
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureAnne Nicolas
 
Security Monitoring with eBPF
Security Monitoring with eBPFSecurity Monitoring with eBPF
Security Monitoring with eBPFAlex Maestretti
 
Systems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting StartedSystems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting StartedBrendan Gregg
 
Linux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - WonokaerunLinux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - Wonokaerunidsecconf
 
RxNetty vs Tomcat Performance Results
RxNetty vs Tomcat Performance ResultsRxNetty vs Tomcat Performance Results
RxNetty vs Tomcat Performance ResultsBrendan Gregg
 

Mais procurados (19)

Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
 
The Internet
The InternetThe Internet
The Internet
 
Managing Memory
Managing MemoryManaging Memory
Managing Memory
 
Scheduling in Linux and Web Servers
Scheduling in Linux and Web ServersScheduling in Linux and Web Servers
Scheduling in Linux and Web Servers
 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easy
 
Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Kernel Recipes 2019 - CVEs are dead, long live the CVE!Kernel Recipes 2019 - CVEs are dead, long live the CVE!
Kernel Recipes 2019 - CVEs are dead, long live the CVE!
 
Nicpaper2009
Nicpaper2009Nicpaper2009
Nicpaper2009
 
BPF Tools 2017
BPF Tools 2017BPF Tools 2017
BPF Tools 2017
 
Input and Output Devices and Systems
Input and Output Devices and SystemsInput and Output Devices and Systems
Input and Output Devices and Systems
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracing
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
 
DevoxxUK: Is your profiler speaking the same language as you?
DevoxxUK: Is your profiler speaking the same language as you?DevoxxUK: Is your profiler speaking the same language as you?
DevoxxUK: Is your profiler speaking the same language as you?
 
Devoxx PL: Is your profiler speaking the same language as you?
Devoxx PL: Is your profiler speaking the same language as you?Devoxx PL: Is your profiler speaking the same language as you?
Devoxx PL: Is your profiler speaking the same language as you?
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
 
Security Monitoring with eBPF
Security Monitoring with eBPFSecurity Monitoring with eBPF
Security Monitoring with eBPF
 
Systems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting StartedSystems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting Started
 
Linux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - WonokaerunLinux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - Wonokaerun
 
RxNetty vs Tomcat Performance Results
RxNetty vs Tomcat Performance ResultsRxNetty vs Tomcat Performance Results
RxNetty vs Tomcat Performance Results
 
Libpcap
LibpcapLibpcap
Libpcap
 

Semelhante a Microkernels and Beyond

Lecture 9 -_pthreads-linux_threads
Lecture 9 -_pthreads-linux_threadsLecture 9 -_pthreads-linux_threads
Lecture 9 -_pthreads-linux_threadsPrashant Pawar
 
introduction.pdf
introduction.pdfintroduction.pdf
introduction.pdfxiso
 
Kernel Computing
Kernel ComputingKernel Computing
Kernel ComputingSabiha M
 
Linux@assignment ppt
Linux@assignment pptLinux@assignment ppt
Linux@assignment pptRama .
 
OSOS SEM 4 Chapter 2 part 1
OSOS SEM 4 Chapter 2 part 1OSOS SEM 4 Chapter 2 part 1
OSOS SEM 4 Chapter 2 part 1Syahriha Ruslan
 
exp_1_20bca1108(kashish_dixit.docx
exp_1_20bca1108(kashish_dixit.docxexp_1_20bca1108(kashish_dixit.docx
exp_1_20bca1108(kashish_dixit.docxApkaAmitbro
 
Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probertyang
 
exp_1_20bca1066 Internet.docx
exp_1_20bca1066 Internet.docxexp_1_20bca1066 Internet.docx
exp_1_20bca1066 Internet.docxApkaAmitbro
 
Part 1 of 'Introduction to Linux for bioinformatics': Introduction
Part 1 of 'Introduction to Linux for bioinformatics': IntroductionPart 1 of 'Introduction to Linux for bioinformatics': Introduction
Part 1 of 'Introduction to Linux for bioinformatics': IntroductionJoachim Jacob
 
Architecting Solutions for the Manycore Future
Architecting Solutions for the Manycore FutureArchitecting Solutions for the Manycore Future
Architecting Solutions for the Manycore FutureTalbott Crowell
 
Fundamentals of Computers
Fundamentals of ComputersFundamentals of Computers
Fundamentals of Computersgyanikashukla
 

Semelhante a Microkernels and Beyond (20)

μ-Kernel Evolution
μ-Kernel Evolutionμ-Kernel Evolution
μ-Kernel Evolution
 
Walking around linux kernel
Walking around linux kernelWalking around linux kernel
Walking around linux kernel
 
Lecture 9 -_pthreads-linux_threads
Lecture 9 -_pthreads-linux_threadsLecture 9 -_pthreads-linux_threads
Lecture 9 -_pthreads-linux_threads
 
introduction.pdf
introduction.pdfintroduction.pdf
introduction.pdf
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Kernel Computing
Kernel ComputingKernel Computing
Kernel Computing
 
Microkernel Evolution
Microkernel EvolutionMicrokernel Evolution
Microkernel Evolution
 
Linux@assignment ppt
Linux@assignment pptLinux@assignment ppt
Linux@assignment ppt
 
OSOS SEM 4 Chapter 2 part 1
OSOS SEM 4 Chapter 2 part 1OSOS SEM 4 Chapter 2 part 1
OSOS SEM 4 Chapter 2 part 1
 
exp_1_20bca1108(kashish_dixit.docx
exp_1_20bca1108(kashish_dixit.docxexp_1_20bca1108(kashish_dixit.docx
exp_1_20bca1108(kashish_dixit.docx
 
Oct2009
Oct2009Oct2009
Oct2009
 
Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probert
 
exp_1_20bca1066 Internet.docx
exp_1_20bca1066 Internet.docxexp_1_20bca1066 Internet.docx
exp_1_20bca1066 Internet.docx
 
Part 1 of 'Introduction to Linux for bioinformatics': Introduction
Part 1 of 'Introduction to Linux for bioinformatics': IntroductionPart 1 of 'Introduction to Linux for bioinformatics': Introduction
Part 1 of 'Introduction to Linux for bioinformatics': Introduction
 
2337610
23376102337610
2337610
 
Architecting Solutions for the Manycore Future
Architecting Solutions for the Manycore FutureArchitecting Solutions for the Manycore Future
Architecting Solutions for the Manycore Future
 
Interview Questions
Interview QuestionsInterview Questions
Interview Questions
 
UNIX Operating System ppt
UNIX Operating System pptUNIX Operating System ppt
UNIX Operating System ppt
 
Fundamentals of Computers
Fundamentals of ComputersFundamentals of Computers
Fundamentals of Computers
 

Mais de David Evans

Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!David Evans
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksDavid Evans
 
Hidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeHidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeDavid Evans
 
Anonymity in Bitcoin
Anonymity in BitcoinAnonymity in Bitcoin
Anonymity in BitcoinDavid Evans
 
Midterm Confirmations
Midterm ConfirmationsMidterm Confirmations
Midterm ConfirmationsDavid Evans
 
Scripting Transactions
Scripting TransactionsScripting Transactions
Scripting TransactionsDavid Evans
 
How to Live in Paradise
How to Live in ParadiseHow to Live in Paradise
How to Live in ParadiseDavid Evans
 
Mining Economics
Mining EconomicsMining Economics
Mining EconomicsDavid Evans
 
Becoming More Paranoid
Becoming More ParanoidBecoming More Paranoid
Becoming More ParanoidDavid Evans
 
Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key SignaturesDavid Evans
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to CryptographyDavid Evans
 
Class 1: What is Money?
Class 1: What is Money?Class 1: What is Money?
Class 1: What is Money?David Evans
 
Multi-Party Computation for the Masses
Multi-Party Computation for the MassesMulti-Party Computation for the Masses
Multi-Party Computation for the MassesDavid Evans
 
Proof of Reserve
Proof of ReserveProof of Reserve
Proof of ReserveDavid Evans
 
Blooming Sidechains!
Blooming Sidechains!Blooming Sidechains!
Blooming Sidechains!David Evans
 
Useful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinUseful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinDavid Evans
 

Mais de David Evans (20)

Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
 
Hidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeHidden Services, Zero Knowledge
Hidden Services, Zero Knowledge
 
Anonymity in Bitcoin
Anonymity in BitcoinAnonymity in Bitcoin
Anonymity in Bitcoin
 
Midterm Confirmations
Midterm ConfirmationsMidterm Confirmations
Midterm Confirmations
 
Scripting Transactions
Scripting TransactionsScripting Transactions
Scripting Transactions
 
How to Live in Paradise
How to Live in ParadiseHow to Live in Paradise
How to Live in Paradise
 
Bitcoin Script
Bitcoin ScriptBitcoin Script
Bitcoin Script
 
Mining Economics
Mining EconomicsMining Economics
Mining Economics
 
Mining
MiningMining
Mining
 
The Blockchain
The BlockchainThe Blockchain
The Blockchain
 
Becoming More Paranoid
Becoming More ParanoidBecoming More Paranoid
Becoming More Paranoid
 
Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key Signatures
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Class 1: What is Money?
Class 1: What is Money?Class 1: What is Money?
Class 1: What is Money?
 
Multi-Party Computation for the Masses
Multi-Party Computation for the MassesMulti-Party Computation for the Masses
Multi-Party Computation for the Masses
 
Proof of Reserve
Proof of ReserveProof of Reserve
Proof of Reserve
 
Silk Road
Silk RoadSilk Road
Silk Road
 
Blooming Sidechains!
Blooming Sidechains!Blooming Sidechains!
Blooming Sidechains!
 
Useful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinUseful Proofs of Work, Permacoin
Useful Proofs of Work, Permacoin
 

Último

Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxStephen Sitton
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSneha Padhiar
 
Substation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHSubstation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHbirinder2
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosVictor Morales
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptJohnWilliam111370
 
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSHigh Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSsandhya757531
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewsandhya757531
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.elesangwon
 
Secure Key Crypto - Tech Paper JET Tech Labs
Secure Key Crypto - Tech Paper JET Tech LabsSecure Key Crypto - Tech Paper JET Tech Labs
Secure Key Crypto - Tech Paper JET Tech Labsamber724300
 
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork
 
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...IJAEMSJORNAL
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTSneha Padhiar
 
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10  (Control Schemes) cse.pdfRobotics Group 10  (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdfsahilsajad201
 
Detection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackingDetection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackinghadarpinhas1
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfManish Kumar
 
Javier_Fernandez_CARS_workshop_presentation.pptx
Javier_Fernandez_CARS_workshop_presentation.pptxJavier_Fernandez_CARS_workshop_presentation.pptx
Javier_Fernandez_CARS_workshop_presentation.pptxJavier Fernández Muñoz
 
70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical training70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical trainingGladiatorsKasper
 

Último (20)

Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptx
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
 
Substation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRHSubstation Automation SCADA and Gateway Solutions by BRH
Substation Automation SCADA and Gateway Solutions by BRH
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitos
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
 
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSHigh Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overview
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
 
Secure Key Crypto - Tech Paper JET Tech Labs
Secure Key Crypto - Tech Paper JET Tech LabsSecure Key Crypto - Tech Paper JET Tech Labs
Secure Key Crypto - Tech Paper JET Tech Labs
 
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
Stork Webinar | APM Transformational planning, Tool Selection & Performance T...
 
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
Guardians of E-Commerce: Harnessing NLP and Machine Learning Approaches for A...
 
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENTFUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
FUNCTIONAL AND NON FUNCTIONAL REQUIREMENT
 
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10  (Control Schemes) cse.pdfRobotics Group 10  (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdf
 
Detection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and trackingDetection&Tracking - Thermal imaging object detection and tracking
Detection&Tracking - Thermal imaging object detection and tracking
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
 
Versatile Engineering Construction Firms
Versatile Engineering Construction FirmsVersatile Engineering Construction Firms
Versatile Engineering Construction Firms
 
Javier_Fernandez_CARS_workshop_presentation.pptx
Javier_Fernandez_CARS_workshop_presentation.pptxJavier_Fernandez_CARS_workshop_presentation.pptx
Javier_Fernandez_CARS_workshop_presentation.pptx
 
70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical training70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical training
 

Microkernels and Beyond

  • 1.
  • 2. Plan for Today Microkernels L4 Exokernels 1 Reminder: don’t forget to sign up for your project submission/presentati on option
  • 3. 2 From: torv...@klaava.Helsinki.FI (Linus Benedict Torvalds) Newsgroups: comp.os.minix Subject: Re: LINUX is obsolete Date: 31 Jan 92 10:33:23 GMT … >I still maintain the point that designing a monolithic kernel in 1991 is >a fundamental error. Be thankful you are not my student. You would >not get a high grade for such a design :-) Well, I probably won't get too good grades even without you: I had an argument (completely unrelated - not even pertaining to OS's) with the person here at the university that teaches OS design. I wonder when I'll learn :) … AndyTanenbaum From Class 3:
  • 4. Should a file system be in the kernel? 3
  • 5. 4 Monolithic Kernel Hardware Application Syscall Handler File System Device Drivers Scheduler Memory Manager KernelMode UserMode Microkernel Hardware Minimal Kernel Application UserMode File System Device Drivers I/ODevice Display Device
  • 6. 5 KernelMode Microkernel Hardware Minimal Kernel Application UserMode What must be in the minimal kernel? File System Device Drivers I/ODevice Display Device
  • 7. From: ast@cs.vu.nl (Andy Tanenbaum) Newsgroups: comp.os.minix Subject: LINUX is obsolete Date: 29 Jan 92 12:12:50 GMT I was in the U.S. for a couple of weeks, so I haven't commented much on LINUX (not that I would have said much had I been around), but for what it is worth, I have a couple of comments now. As most of you know, for me MINIX is a hobby, something that I do in the evening when I get bored writing books and there are no major wars, revolutions, or senate hearings being televised live on CNN. My real job is a professor and researcher in the area of operating systems. As a result of my occupation, I think I know a bit about where operating are going in the next decade or so. Two aspects stand out: 6 (Picture from 1998)
  • 8. 1. 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. 7
  • 9. 8 KernelMode Microkernel Hardware Minimal Kernel Application File System Device Drivers I/ODevice UserMode Why didn’t microkernels actually win? Monolithic Kernel Hardware Application Syscall Handler File System Device Drivers Scheduler Memory Manager Display Device
  • 10. 9 KernelMode Microkernel Hardware Minimal Kernel Application UserMode What is hard about making microkernels work? File System Device Drivers I/ODevice Display Device
  • 11. 10 KernelMode Microkernel Hardware Minimal Kernel Application UserMode What is hard about making microkernels work? File System Device Drivers I/ODevice Display Device fopen Inter-process Communication (IPC)
  • 12. Comparing Linux and Minix Performance 11 “The IOtest read test simply performs random reads of varying sizes.” MB/s Minix Linux LWN.net, 5 Feb 2007
  • 13. Really Comparing Linux and Minix 12 LWN.net, 5 Feb 2007 “Throughput” (Indexed) Linux Minix Linux is 8-50 times faster for things that matter!
  • 14. Did microkernels actually lose? 13 2008 2013 1 000 000 000 Android Activations -13.8B Universe Tools Altruism -5M 1679 Programmabl e Machines S ::= NP V O NP ::= N and NP Recursive Language -300K 1945 Practical Universal Machines 1950s Abstractions 1969 Modern OS 1993 Open Source OS, runs on cheap machines Cheaper, faster, low- energy processors, Internet, web, $$$ From Class 3: Monolithic Kernels “Microkernels have won.” 1992
  • 15. Did microkernels actually lose? 14 2008 2013 1 000 000 000 Android Activations -13.8B Universe Tools Altruism -5M 1679 Programmabl e Machines S ::= NP V O NP ::= N and NP Recursive Language -300K 1945 Practical Universal Machines 1950s Abstractions 1969 Modern OS 1993 Open Source OS, runs on cheap machines Cheaper, faster, low- energy processors, Internet, web, $$$ Monolithic Kernels “Microkernels have won.” 1992
  • 16. 15 2008 2013 1B Android Activations Sep 2013 -13.8B Universe Tools Altruism -5M 1679 Programmable Machines S ::= NP V O NP ::= N and NP Recursive Language -300K 1945 Practical Universal Machines 1950s Abstractions 1969 Modern OS 1993 Open Source OS, runs on cheap machines Cheaper, faster, low- energy processors, Internet, web, $$$ 1993 > 1B Windows machines in 2011
  • 19. 18 Summer 1986 USENIX Conference
  • 20. 19
  • 22. 21 2008 2013 1B Android Activations Sep 2013 -13.8B Universe Tools Altruism -5M 1679 Programmable Machines S ::= NP V O NP ::= N and NP Recursive Language -300K 1945 Practical Universal Machines 1950s Abstractions 1969 Modern OS 1993 Open Source OS, runs on cheap machines Cheaper, faster, low- energy processors, Internet, web, $$$
  • 23. 22 2008 2013 1B Android Activations Sep 2013 -13.8B Universe Tools Altruism -5M 1679 Programmable Machines S ::= NP V O NP ::= N and NP Recursive Language -300K 1945 Practical Universal Machines 1950s Abstractions 1969 Modern OS 1993 Open Source OS, runs on cheap machines Cheaper, faster, low- energy processors, Internet, web, $$$ 1.5B L4 Microkernel Systems Jan 2012
  • 24. 23
  • 26. 25
  • 27. L3 Abstractions 26 Task Threads: each has global, unique ID Own Address Space Shared data spaces Message From: thread ID To: thread ID Direct/Indirect String Data (optional) Microkernel Manages Tasks Sends messages between tasks
  • 28. L3 Abstractions 27 Task Threads: each has global, unique ID Own Address Space Shared data spaces Message From: thread ID To: thread ID Direct/Indirect String Data (optional) Microkernel Manages Tasks Sends messages between tasks What is a hardware interrupt in L3?
  • 29. Minimal IPC 28 Task A Task B Kernel Thread A1 Thread B1Message
  • 30. Minimal IPC 29 Task A Task B Kernel Thread A1 Thread B1 1. load B1 ID 2. load message 3. call kernel
  • 31. Minimal IPC 30 Task A Task B Kernel Thread A1 Thread B1 1. load B1 ID 2. load message 3. call kernel 4. access Thread B1 5. switch stack pointer 6. switch address space 7. load A’s ID 8. return to user mode 9. receive
  • 32. Implementation 31 Task A Task B Kernel 1. load B1 ID 2. load message 3. call kernel 4. access Thread B1 5. switch stack pointer 6. switch address space 7. load A’s ID 8. return to user mode 9. receive
  • 33. Implementation 32 Task A Task B Kernel 1. load B1 ID 2. load message 3. call kernel 4. access Thread B1 5. switch stack pointer 6. switch address space 7. load A’s ID 8. return to user mode 9. receive
  • 34. Implementation 33 Task A Task B Kernel 1. load B1 ID 2. load message 3. call kernel 4. access Thread B1 5. switch stack pointer 6. switch address space 7. load A’s ID 8. return to user mode 9. receive What does this minimal implementation rely on?
  • 35. Implementation 34 Task A Task B Kernel 1. load B1 ID 2. load message 3. call kernel 4. access Thread B1 5. switch stack pointer 6. switch address space 7. load A’s ID 8. return to user mode 9. receive What does this minimal implementation rely on? Synchronous: Receiving thread is waiting Sender waits until reply No timeouts: all IPC calls must guarantee termination
  • 36. 35
  • 37. What if the message has data? 36 Task A Screen Driver Kernel Thread A1 Thread B1 1. load B1 ID 2. load message 3. call kernel 4. access Thread B1 5. switch stack pointer 6. switch address space 7. load A’s ID 8. return to user mode 9. receive display “Hello L3!” “Hello L3!”
  • 38. Copy Through Kernel 37 Task A Screen Driver Kernel Thread A1 Thread B1 1. load B1 ID 2. load message 3. call kernel 4. access Thread B1 5. switch stack pointer 6. switch address space 7. load A’s ID 8. return to user mode 9. receive display “Hello L3!” “Hello L3!” “Hello L3!” “Hello L3!”
  • 39. Screen Driver Copy Direct 38 Task A Kernel Thread A1 Thread B1 1. load B1 ID 2. load message 3. call kernel 4. access Thread B1 5. switch stack pointer 6. switch address space 7. load A’s ID 8. return to user mode 9. receive “Hello L3!” “Hello L3!” 0. set up receive buffer
  • 40. OS Design Tradeoffs Monolithic (e.g., Linux) Microkernel (e.g., L4) 39
  • 41. Biggest Advantage of Microkernels 40 IronKernel: 9.8K lines of Rust + 273 lines of asm rust-core: 6.5K Windows NT 3.1: 5M LOC Linux kernel 3.6: 16M LOC
  • 42. Biggest Advantage of Microkernels 41 IronKernel: 9.8K lines of Rust + 273 lines of asm rust-core: 6.5K arch: 2.1K (1.7K is font.rs) kernel: 1178 63 fs.rs 38 int.rs 95 mod.rs 10 ptr.rs 351 rt.rs 343 sgash.rs (46 for printing logo!) 278 memory/*.rs
  • 44. 43 Size of code: 8,700 lines (2 person-months) Size of proof: 200,000 lines (20 person-years ~ 11)
  • 45. 44 What should the specification for the scheduler look like?
  • 46. 45 What should the specification for the scheduler look like? Isabelle/HOL scheduler spec
  • 47. 46 KernelMode Microkernel Hardware Minimal Kernel Application File System Device Drivers I/ODevice UserMode Monolithic Kernel Hardware Application Syscall Handler File System Device Drivers Scheduler Memory Manager Display Device Exokernel Hardware Really Minimal Kernel Application2 (+libraries) Application1 (+libraries)
  • 48. Definition from Class 1: 47 An operating system is a program that manages resources and provides abstractions.
  • 50. 49 Slide from Exokernels (or, making the operating system just another application library) Dawson Engler Frans Kaashoek Greg Ganger H. Briceño R. Hunt D. Mazières T. Pinckney J. Jannotti
  • 51. 50
  • 53. 52 KernelModeUserMode Exokernel Hardware Really Minimal Kernel Application2 (+libraries) Application1 (+libraries) Multiplexing Resources CPU Core: time share Memory: share by allocating pages to processes Persistent Storage (Disk): divide into blocks How should exokernel decide if a process can read a disk block?
  • 54. 53 Kernel can query FS: owns(meta) := set of blocks owned by meta Must be deterministic and persistent Kernel checks after any modification!
  • 55. 54 Examples from Dawson Engler’s PhD Thesis
  • 56. 55 2008 2013 1B Android Activations Sep 2013 -13.8B Universe Tools Altruism -5M 1679 Programmable Machines S ::= NP V O NP ::= N and NP Recursive Language -300K 1945 Practical Universal Machines 1950s Abstractions 1969 Modern OS 1993 Open Source OS, runs on cheap machines Cheaper, faster, low- energy processors, Internet, web, $$$ 1.5B L4 Microkernel Systems Jan 2012 How many exokernels?
  • 57. 56 2008 2013 1B Android Activations Sep 2013 -13.8B Universe Tools Altruism -5M 1679 Programmable Machines S ::= NP V O NP ::= N and NP Recursive Language -300K 1945 Practical Universal Machines 1950s Abstractions 1969 Modern OS 1993 Open Source OS, runs on cheap machines Cheaper, faster, low- energy processors, Internet, web, $$$ 1.5B L4 Microkernel Systems Jan 2012Companies (intellectually) derived from exokernel project:
  • 58. What’s Next? 57 “Bitter experience in the design of operating systems leads to the conclusion that radical changes must be made, both the way we think about functions of operating systems and in the way they are implemented.”
  • 59. What’s Next? 58 “Bitter experience in the design of operating systems leads to the conclusion that radical changes must be made, both the way we think about functions of operating systems and in the way they are implemented.” Butler Lampson NATO Software Engineering Techniques Conference 1969
  • 60. Kernel Hope for FeROS? 59 (Rust) Task A (Rust) Task B (File System) Memory Isolation enforced by language mechanisms IPC through safe, shared data External resources managed through cryptography No cost to calling between tasks, kernel: all in same address space!
  • 61. Charge! Tanenbaum was wrong about microkernels having won in 1992 Prevailing wisdom is wrong about microkernels having lost in 2014 60 Butler is still right: The real OS of the future should be something radically different and you should help build it! Remember to sign up for your project submission option!