SlideShare a Scribd company logo
1 of 26
陳膺正 (Hawx Chen )
yingjheng.chen@gmail.com
http://hawxchen.blogspot.tw
Exokernel
vs.
Microkernel
Who Am I
• Experience
– 2008 NCTU CS Bachelor
– 2010 NTU CSIE Master
– 2010~presnet MStar Semiconductor
• Senior software engineer
• Talk:
– 2012 COSCUP.
– 2013 COSCUP.
• Open Source
– https://github.com/HawxChen/MIT-6.828-Adventure
Enjoy to implement OS.
Outline
• Importance of History
• Base Arch
• Exokernel Principle
• Example: page handling
• Geek Part
Outline
• Importance of History
• Base Arch
• Exokernel Principle
• Example: page handling
• Geek Part
Importance of History
Unics UNIXv6
MINIXMTS
LinuxBSD
L4
1975
Exokernel
199519871967
1969 1978 1991
Time
Importance of history
A.D 1967
Hardware
Importance of history
Hardware
Exokernel
LibOS
App
LibOS’
App’
LibOS’’
App’’
Pager Swapper Ignore
pag e fault
A.D 1995
User mode
Kernel mode
Outline
• Importance of History
• Base Arch
• Exokernel Principle
• Example: page handling
• Geek Part
UNIX Arch
User Process
System Call
Interface (Library Routines)
User Process
Hardware
Process
Management
Memory
Management File
System
I/O Services
Scheduler
I/O Buffers
Device
Drivers
Kernel Space
MINIX Arch
Kernel Space
Scheduler/ message passing Memory copy
Exokernel Arch: Aegis/ExOS
Kernel Space
Libs’Libs
ExOS has
TCP, IPC, and FS.
App App’
ExOS’ has
VM, POSIX, and
Scheduler.
Libs’’
ExOS’’ has
Timer Service
Routine.
App’’
Disk TLB Network Memory Frame buffer
Resource
Allocation
Resource
Revocation
Information
Query Protection
Outline
• Importance of History
• Base Arch
• Exokernel Principle and Design
• Example: page handling
• Geek Part
Exokernel Principle
1. Separate protection from management
2. Expose Names
3. Expose allocation
4. Expose Revocation
5. Expose Information
Library Operating System
(Replaceable )
Exokernel Approach
VMIPC
Traps
Vecs
Distributed Shared
MemoryWWW
POSIX TCP
Disk TLB Network Memory Frame buffer
Mosaic Barnes-HutApps
Library
Kernel
HW
Expose allocation/revocation/names/information,
and Support Protection
Exokernel Approach
VMIPC
Traps
Vecs
Distributed Shared
Memory
WWW
POSIX TCP
Expose allocation/revocation/names/information,
and Support Protection
Disk TLB Network Memory Frame buffer
Mosaic Barnes-Hut
CPL = 3
CPL = 0
Library Operating System
(Replaceable )
Apps
Library
Kernel
HW
Design: Monolithic kernel
Hardware
Scheduler
Timer Services
IPC, Signal, System Calls,
POSIX
File Systems: ext2, ext3, NFS,… etc. VFS
Memory manager.
…
…
Device drivers
Proc1 Proc2 Proc3 Proc4 Proc5 Proc6 Proc7
Kernel Space
Design: Microkernel
Hardware
Kernel Space
Design: Exokernel
WWW
POSIX TCP
Expose allocation/revocation/names/information,
and Support Protection
Mosaic
VMIPC
Traps
Distributed Shared
Memory
Barnes-Hut
Kernel Space
Hardware
Outline
• Importance of History
• Base Arch
• Exokernel Principle
• Example: page handling
• Geek Part
Exokernel Way
Page fault
Exception
Page Fault Handler
LibOS
App
Pager
LibOS
App
Pager: Now
You See Me.(
Exception
Vector Table
Hardware
Exokernel
………….
………….
………….
………….
………….
1. Trigger the page fault
exception
2. Query exception vector
table
3. Page fault handler (trick)
4. Translate to real pager
5. Allocate a free page
6. Map
7. UnMap
8. Adjust the stack (trick)
9. Return to the fault
happening instruction
CPL = 3
CPL = 0
Outline
• Importance of History
• Base Arch
• Exokernel Principle
• Example: page handling
• Geek Part
Geek Part
• Make page fault handler execute in user mode.
– Expose something out of kernel
– The stack trick
• Implementation:
– https://github.com/HawxChen/MIT-6.828-
Adventure/tree/lab4
Stack
Page Fault Happening.
WWW
POSIX
TCP
Expose allocation/revocation/names/information,
and Support Protection
Disk TLB Network Memory Frame buffer
Mosaic
Apps
Library Operating System
(Replaceable )
Exokernel
HW
CPL=3
CPL=0User Context
Pager
0xEEEEEEEE: esp
0xBBBBBBBB:esp
0x00001688:eip
&(pager):eip
EIP: 0x00001688
-> &(pager):eip
ESP: 0xEEEEEEEE
-> 0xBBBBBBBB Page fault
handler
Page fault handler (trick)
Adjust the stack (trick)
0x00001688:eip
ret
Conclusion
• App and OS co-design.
• Application driven design.
• Don’t limit app’s scalability.
– Everyone is ambitious.
Reference
Thanks

More Related Content

What's hot

Hybrid kernel
Hybrid kernelHybrid kernel
Hybrid kernelAbu Azzam
 
Microkernel-based operating system development
Microkernel-based operating system developmentMicrokernel-based operating system development
Microkernel-based operating system developmentSenko Rašić
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and PropertiesSaadi Rahman
 
Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel SourceMotaz Saad
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernelguest547d74
 
What is a Kernel? : Introduction And Architecture
What is a Kernel? : Introduction And ArchitectureWhat is a Kernel? : Introduction And Architecture
What is a Kernel? : Introduction And Architecturepec2013
 
Operating system kernal
Operating system kernalOperating system kernal
Operating system kernalSumit Rajpal
 
Introduction To Linux Kernel Modules
Introduction To Linux Kernel ModulesIntroduction To Linux Kernel Modules
Introduction To Linux Kernel Modulesdibyajyotig
 
Linux Kernel Tour
Linux Kernel TourLinux Kernel Tour
Linux Kernel Toursamrat das
 
High Performance Storage Devices in the Linux Kernel
High Performance Storage Devices in the Linux KernelHigh Performance Storage Devices in the Linux Kernel
High Performance Storage Devices in the Linux KernelKernel TLV
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 

What's hot (20)

Hybrid kernel
Hybrid kernelHybrid kernel
Hybrid kernel
 
Microkernel-based operating system development
Microkernel-based operating system developmentMicrokernel-based operating system development
Microkernel-based operating system development
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architecture
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and Properties
 
Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel Source
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
Kernel (computing)
Kernel (computing)Kernel (computing)
Kernel (computing)
 
What is a Kernel? : Introduction And Architecture
What is a Kernel? : Introduction And ArchitectureWhat is a Kernel? : Introduction And Architecture
What is a Kernel? : Introduction And Architecture
 
Operating system kernal
Operating system kernalOperating system kernal
Operating system kernal
 
Introduction To Linux Kernel Modules
Introduction To Linux Kernel ModulesIntroduction To Linux Kernel Modules
Introduction To Linux Kernel Modules
 
Microkernel
MicrokernelMicrokernel
Microkernel
 
Monolithic kernel
Monolithic kernelMonolithic kernel
Monolithic kernel
 
Linux Kernel Tour
Linux Kernel TourLinux Kernel Tour
Linux Kernel Tour
 
High Performance Storage Devices in the Linux Kernel
High Performance Storage Devices in the Linux KernelHigh Performance Storage Devices in the Linux Kernel
High Performance Storage Devices in the Linux Kernel
 
2. microkernel new
2. microkernel new2. microkernel new
2. microkernel new
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
Architecture of Linux
 Architecture of Linux Architecture of Linux
Architecture of Linux
 
Microkernel design
Microkernel designMicrokernel design
Microkernel design
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 

Similar to [TALK] Exokernel vs. Microkernel

Microkernels and Beyond
Microkernels and BeyondMicrokernels and Beyond
Microkernels and BeyondDavid Evans
 
introduction.pdf
introduction.pdfintroduction.pdf
introduction.pdfxiso
 
Journal Seminar: Is Singularity-based Container Technology Ready for Running ...
Journal Seminar: Is Singularity-based Container Technology Ready for Running ...Journal Seminar: Is Singularity-based Container Technology Ready for Running ...
Journal Seminar: Is Singularity-based Container Technology Ready for Running ...Kento Aoyama
 
Présentation d'Unikernel
Présentation d'UnikernelPrésentation d'Unikernel
Présentation d'UnikernelProto204
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-reviewabinaya m
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsNational Cheng Kung University
 
My amazing journey from mainframes to smartphones chm lecture aug 2014 final
My amazing journey from mainframes to smartphones  chm lecture aug 2014 finalMy amazing journey from mainframes to smartphones  chm lecture aug 2014 final
My amazing journey from mainframes to smartphones chm lecture aug 2014 finalDileep Bhandarkar
 
Linux Kernel Exploitation
Linux Kernel ExploitationLinux Kernel Exploitation
Linux Kernel ExploitationScio Security
 
Linux Perf Tools
Linux Perf ToolsLinux Perf Tools
Linux Perf ToolsRaj Pandey
 
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
 
The linux kernel hidden inside windows 10
The linux kernel hidden inside windows 10The linux kernel hidden inside windows 10
The linux kernel hidden inside windows 10mark-smith
 
Fedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIUFedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIUAndrey Vagin
 
2. Vagin. Linux containers. June 01, 2013
2. Vagin. Linux containers. June 01, 20132. Vagin. Linux containers. June 01, 2013
2. Vagin. Linux containers. June 01, 2013ru-fedora-moscow-2013
 

Similar to [TALK] Exokernel vs. Microkernel (20)

L4 Microkernel :: Design Overview
L4 Microkernel :: Design OverviewL4 Microkernel :: Design Overview
L4 Microkernel :: Design Overview
 
Microkernels and Beyond
Microkernels and BeyondMicrokernels and Beyond
Microkernels and Beyond
 
Inside the Mac OS X Kernel
Inside the Mac OS X KernelInside the Mac OS X Kernel
Inside the Mac OS X Kernel
 
Microkernel Evolution
Microkernel EvolutionMicrokernel Evolution
Microkernel Evolution
 
introduction.pdf
introduction.pdfintroduction.pdf
introduction.pdf
 
Japan's post K Computer
Japan's post K ComputerJapan's post K Computer
Japan's post K Computer
 
Journal Seminar: Is Singularity-based Container Technology Ready for Running ...
Journal Seminar: Is Singularity-based Container Technology Ready for Running ...Journal Seminar: Is Singularity-based Container Technology Ready for Running ...
Journal Seminar: Is Singularity-based Container Technology Ready for Running ...
 
Présentation d'Unikernel
Présentation d'UnikernelPrésentation d'Unikernel
Présentation d'Unikernel
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-review
 
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded SystemsF9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
F9: A Secure and Efficient Microkernel Built for Deeply Embedded Systems
 
μ-Kernel Evolution
μ-Kernel Evolutionμ-Kernel Evolution
μ-Kernel Evolution
 
My amazing journey from mainframes to smartphones chm lecture aug 2014 final
My amazing journey from mainframes to smartphones  chm lecture aug 2014 finalMy amazing journey from mainframes to smartphones  chm lecture aug 2014 final
My amazing journey from mainframes to smartphones chm lecture aug 2014 final
 
Linux Kernel Exploitation
Linux Kernel ExploitationLinux Kernel Exploitation
Linux Kernel Exploitation
 
Linux Perf Tools
Linux Perf ToolsLinux Perf Tools
Linux Perf Tools
 
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
 
The linux kernel hidden inside windows 10
The linux kernel hidden inside windows 10The linux kernel hidden inside windows 10
The linux kernel hidden inside windows 10
 
Fedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIUFedora Virtualization Day: Linux Containers & CRIU
Fedora Virtualization Day: Linux Containers & CRIU
 
CERNBox: Site Report
CERNBox: Site ReportCERNBox: Site Report
CERNBox: Site Report
 
2. Vagin. Linux containers. June 01, 2013
2. Vagin. Linux containers. June 01, 20132. Vagin. Linux containers. June 01, 2013
2. Vagin. Linux containers. June 01, 2013
 

Recently uploaded

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

[TALK] Exokernel vs. Microkernel

  • 1. 陳膺正 (Hawx Chen ) yingjheng.chen@gmail.com http://hawxchen.blogspot.tw Exokernel vs. Microkernel
  • 2. Who Am I • Experience – 2008 NCTU CS Bachelor – 2010 NTU CSIE Master – 2010~presnet MStar Semiconductor • Senior software engineer • Talk: – 2012 COSCUP. – 2013 COSCUP. • Open Source – https://github.com/HawxChen/MIT-6.828-Adventure Enjoy to implement OS.
  • 3. Outline • Importance of History • Base Arch • Exokernel Principle • Example: page handling • Geek Part
  • 4. Outline • Importance of History • Base Arch • Exokernel Principle • Example: page handling • Geek Part
  • 5. Importance of History Unics UNIXv6 MINIXMTS LinuxBSD L4 1975 Exokernel 199519871967 1969 1978 1991 Time
  • 8. Outline • Importance of History • Base Arch • Exokernel Principle • Example: page handling • Geek Part
  • 9. UNIX Arch User Process System Call Interface (Library Routines) User Process Hardware Process Management Memory Management File System I/O Services Scheduler I/O Buffers Device Drivers Kernel Space
  • 10. MINIX Arch Kernel Space Scheduler/ message passing Memory copy
  • 11. Exokernel Arch: Aegis/ExOS Kernel Space Libs’Libs ExOS has TCP, IPC, and FS. App App’ ExOS’ has VM, POSIX, and Scheduler. Libs’’ ExOS’’ has Timer Service Routine. App’’ Disk TLB Network Memory Frame buffer Resource Allocation Resource Revocation Information Query Protection
  • 12. Outline • Importance of History • Base Arch • Exokernel Principle and Design • Example: page handling • Geek Part
  • 13. Exokernel Principle 1. Separate protection from management 2. Expose Names 3. Expose allocation 4. Expose Revocation 5. Expose Information
  • 14. Library Operating System (Replaceable ) Exokernel Approach VMIPC Traps Vecs Distributed Shared MemoryWWW POSIX TCP Disk TLB Network Memory Frame buffer Mosaic Barnes-HutApps Library Kernel HW Expose allocation/revocation/names/information, and Support Protection
  • 15. Exokernel Approach VMIPC Traps Vecs Distributed Shared Memory WWW POSIX TCP Expose allocation/revocation/names/information, and Support Protection Disk TLB Network Memory Frame buffer Mosaic Barnes-Hut CPL = 3 CPL = 0 Library Operating System (Replaceable ) Apps Library Kernel HW
  • 16. Design: Monolithic kernel Hardware Scheduler Timer Services IPC, Signal, System Calls, POSIX File Systems: ext2, ext3, NFS,… etc. VFS Memory manager. … … Device drivers Proc1 Proc2 Proc3 Proc4 Proc5 Proc6 Proc7 Kernel Space
  • 18. Design: Exokernel WWW POSIX TCP Expose allocation/revocation/names/information, and Support Protection Mosaic VMIPC Traps Distributed Shared Memory Barnes-Hut Kernel Space Hardware
  • 19. Outline • Importance of History • Base Arch • Exokernel Principle • Example: page handling • Geek Part
  • 20. Exokernel Way Page fault Exception Page Fault Handler LibOS App Pager LibOS App Pager: Now You See Me.( Exception Vector Table Hardware Exokernel …………. …………. …………. …………. …………. 1. Trigger the page fault exception 2. Query exception vector table 3. Page fault handler (trick) 4. Translate to real pager 5. Allocate a free page 6. Map 7. UnMap 8. Adjust the stack (trick) 9. Return to the fault happening instruction CPL = 3 CPL = 0
  • 21. Outline • Importance of History • Base Arch • Exokernel Principle • Example: page handling • Geek Part
  • 22. Geek Part • Make page fault handler execute in user mode. – Expose something out of kernel – The stack trick • Implementation: – https://github.com/HawxChen/MIT-6.828- Adventure/tree/lab4
  • 23. Stack Page Fault Happening. WWW POSIX TCP Expose allocation/revocation/names/information, and Support Protection Disk TLB Network Memory Frame buffer Mosaic Apps Library Operating System (Replaceable ) Exokernel HW CPL=3 CPL=0User Context Pager 0xEEEEEEEE: esp 0xBBBBBBBB:esp 0x00001688:eip &(pager):eip EIP: 0x00001688 -> &(pager):eip ESP: 0xEEEEEEEE -> 0xBBBBBBBB Page fault handler Page fault handler (trick) Adjust the stack (trick) 0x00001688:eip ret
  • 24. Conclusion • App and OS co-design. • Application driven design. • Don’t limit app’s scalability. – Everyone is ambitious.