SlideShare a Scribd company logo
1999/6/11 Murphy Cheng-Che Chen 1
The Design and Implementation of
EKernel: An Object-Oriented µ-kernel
Cheng-Che Chen, Sheng-De Wang
Department of Electrical Engineering
National Taiwan University
murphy@yours.com, sdwang@cc.ee.ntu.edu.tw
Murphy Cheng-Che Chen 2
Outline
• Motivation
• Introduction
• EKernel Design
• Performance Measure
• Conclusion and Future Work
Murphy Cheng-Che Chen 3
Motivation
• Problems
– Continuously evolving processors
– Demanding applications
• Issues
– Portability, Maintainability,
Extensibility and Efficiency.
Murphy Cheng-Che Chen 4
IntroductionIntroduction
Murphy Cheng-Che Chen 5
Operating System
• A layer of software on a bare machine.
• Resource management.
– Scheduling, Storage, IPC, etc...
• User friendliness.
– Execution environment (process
management, file, interrupt, I/O)
Murphy Cheng-Che Chen 6
Operating System
E n d U s e r
A p p l i c a t i o n
P r o g r a m s
U t i l i t i e s
O p e r a t i n g S y s t e m
C o m p u t e r H a r d w a r e
P r o g r a m m e r
O p e r a t i n g S y s t e m
D e s i g n e r
Murphy Cheng-Che Chen 7
Kernel
• The mandatory part of an operating
system common to all other software.
• Under supervisor mode
• Accessing hardware resources for
user applications
Murphy Cheng-Che Chen 8
Monolithic Kernel
• The whole operating system is packed
into a single large kernel.
• Efficiency (all modules are under the
same address space)
• Complex
• Very hard to adapt or extend.
Murphy Cheng-Che Chen 9
µ-kernel
• Only extremely essential primitive
operating system functions should be
put into the kernel.
• Other operating system services are
built on top of the µ-kernel.
• OS components communicate with
each other via messages.
Murphy Cheng-Che Chen 10
Advantages of µ-kernel
• A better modular system structure
could be enforced by a clear µ-kernel
interface.
• A server malfunction is isolated as
any other user program’s.
• The system is more flexible and tailor-
able, different policies can coexist.
Murphy Cheng-Che Chen 11
2nd Generation µ-kernel
• Problems of µ-kernels
– Performance degradation
– Inherited from monolithic kernels
• Radical new designs
– Exokernel (no abstractions)
– L3/L4 (minimal set of µ-kernel
abstractions, non-portable)
Murphy Cheng-Che Chen 12
EKernel DesignEKernel Design
Murphy Cheng-Che Chen 13
Abstractions
• Process
• Thread
• Interprocess Communication
Murphy Cheng-Che Chen 14
Process
• Basic unit of resource allocation.
• Has its own address space.
• In Ekernel, traditional operating
systems, windowing systems and
device drivers are all processes.
Murphy Cheng-Che Chen 15
Thread
• Basic unit of CPU utilization.
• Shares with peer threads its code
section, data section, address space
and resources.
• Has its own stack and execution
context.
09/16/18 Murphy Cheng-Che Chen 16
Inter-process Communications
• Allow threads to communicate with
each other and to synchronize their
actions.
• Highly related to the internal data
structure of threads and processes.
• Messaging, Semaphore, Mutex and
Event.
A p p lic a t io n
P r o c e s s
A p p lic a t io n
P r o c e s s
N e t w o r k in g
P r o c e s s
S e r ia l
P o r t
P r o c e s s
W in d o w in g
P r o c e s s
F ile
S y s t e m
S e r v e r
S h a r e d
L ib r a r y
S h a r e d
L ib r a r y
U s e r S p a c e
K e r n e l S p a c e
S y s t e m C a ll I n t e r f a c e
P r o c e s s
C o n t r o l
T h r e a d
C o n t r o l
S y n c h r o n iz a t io n
M e c h a n is m
S c h e d u le r
H a r d w a r e P la t f o r m
H a r d w a r e
E x c e p t io n
H a n d lin g
A p p lic a t io n
P r o c e s s
A p p lic a t io n
P r o c e s s
M e m o r y
M a n a g e m e n t
EMicro
ENano
ProcessorMMU
Interrupt
Controller
Process
Thread
Scheduler
Memory
Allocator
Semaphore
Event
Mutex
Message Queue
SystemCall
Dispatcher
Interrupt
Dispatcher
Murphy Cheng-Che Chen 19
Processor
• Purpose
– Abstract generic mechanisms
provided by most processor.
• Exported Function
– EnableInterrupt, DisableInterrupt
– SetThreadContext
– SwitchContext
Murphy Cheng-Che Chen 20
MMU
• Purpose
– Abstracts the memory management unit.
• Exported Function
– EnablePaging, DisablePaging
– SwitchPageTable
– PageTableMapRangeKernel,
PageTableMapRangeUser
Murphy Cheng-Che Chen 21
InterruptController
• Purpose
– Abstract generic interrupt controllers
• Exported Function
– DisableIRQ, EnableIRQ, DisableAllIRQ,
EnableAllIRQ
– AcknowledgeIRQ
– HookIRQ
Murphy Cheng-Che Chen 22
Process and Thread
• Purpose
– Maintain basic information as well as interfaces for
accessing such information.
• Process
– Process ID, Process Name, Thread List,
Memory Manager
• Thread
– Thread ID, Thread Name, Process ID
Murphy Cheng-Che Chen 23
Scheduler
• Purpose
– Select a thread from ready queue and allocate
CPU to it.
• Data
– Ready Queue
• Exported Function
– Schedule, Check-In, Check-Out, Disable-
Preemption, Enable-Preemption, Yield
Murphy Cheng-Che Chen 24
IPC
• Include: MessageQueue, Semaphore,
Mutex and Event objects.
• Interact with Scheduler object
– when they need to block the
execution of a thread
– when some thread in their waiting
queues is ready for execution
Murphy Cheng-Che Chen 25
SystemCallDispatcher
• Purpose
– Provides the interface between a
process and the operating system
kernel.
• Exported Function
– HookSystemCall
– Dispatch
Murphy Cheng-Che Chen 26
InterruptDispatcher
• Purpose
– Notify a thread that an interrupt has
occurred.
• Exported Function
– HookInterrupt
– Dispatch
Murphy Cheng-Che Chen 27
Driver Architecture
• Device drivers
– Are allowed to execute in user space.
– Invoke system services to
• hook interested interrupts
• request access rights to I/O
– Can be combined with a server process to
minimize data paths.
Murphy Cheng-Che Chen 28
Portability
• Two layers: ENano and EMicro.
• To port EKernel, we need to
– Write hardware specific codes for the
actual implementation classes and have
them derived from ENano objects.
– In kernel initialization, point the global
variables of ENano to the instances of the
newly derived classes.
Murphy Cheng-Che Chen 29
Extensibility
• Take the scheduler for example
– Inherit a new class PriorityThread from the class
Thread
– Add a function CreatePriorityThread that calls
original CreateThread and records additional
information
– Implement the new scheduling algorithm in
CheckIn, CheckOut, GetNext of Scheduler.
Murphy Cheng-Che Chen 30
PerformancePerformance
MeasureMeasure
Murphy Cheng-Che Chen 31
User-Kernel Switches
• Measures the overhead in doing a
system call.
System CPU, MHz Cycle
L3 486, 50 123 – 180
Ekernel Pentium, 100 186
Mach RS2000, 16.7 900
Bare Machine Page Table Switch Cycles
486 36 … 364
Pentium 36 … 1196
Operating System Address Space Switch Cycles
Ekernel ( on Pentium ) 863
Murphy Cheng-Che Chen 32
Address Space Switches
• Includes page table switching, TLB
flushing, and cache flushing.
Murphy Cheng-Che Chen 33
IPC
• Round-trip IPC overhead includes sending/receiving a
message, user-kernel switch, address space switch.
System CPU, MHz Cycles / IPC
Ekernel1 Pentium, 100 231
L3 486, 50 250
QNX 486, 33 1254
Ekernel2 Pentium, 100 1492
Mach RS2000, 16.7 1584
SRC RPC CVAX, 12.5 2900
Mach 486, 50 5750
Amoeba 68020, 15 6000
Spin Alpha 21064, 133 6783
Mach Alpha 21064, 133 6916
Murphy Cheng-Che Chen 34
Conclusion AndConclusion And
Future WorkFuture Work
Murphy Cheng-Che Chen 35
Conclusion
• We’ve designed an object-oriented micro-kernel
which tries to tackle the problems of portability,
maintainability, extensibility and efficiency.
• We’ve implemented EKernel on Pentium
processors.
• The performance measure shows that we’ve
adroitly tackled the conflicting issues of flexibility
and efficiency.
Murphy Cheng-Che Chen 36
Future Work
• Extend the basic round-robin scheduler of
EKernel to support multimedia applications
as well as real-time applications.
• Build a networking sub-system which
encompasses the TCP/IP stack together
with the networking driver to verify the
effectiveness of EKernel driver architecture.

More Related Content

What's hot

AOS Lab 6: Scheduling
AOS Lab 6: SchedulingAOS Lab 6: Scheduling
AOS Lab 6: Scheduling
Zubair Nabi
 
The Windows Scheduler
The Windows SchedulerThe Windows Scheduler
The Windows Scheduler
Peter Shirley-Quirk
 
Embedded Intro India05
Embedded Intro India05Embedded Intro India05
Embedded Intro India05
Rajesh Gupta
 
Windows process-scheduling
Windows process-schedulingWindows process-scheduling
Windows process-scheduling
Talha Shaikh
 
Process management
Process managementProcess management
Process management
Birju Tank
 
Real Time System
Real Time SystemReal Time System
Real Time System
Suman Astani
 
Windows process scheduling presentation
Windows process scheduling presentationWindows process scheduling presentation
Windows process scheduling presentation
Talha Shaikh
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
Mukesh Chinta
 
ICTCoreCh11
ICTCoreCh11ICTCoreCh11
ICTCoreCh11
garcons0
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementation
Rajan Kumar
 
Processor Specification and Architecture
Processor Specification and Architecture Processor Specification and Architecture
Processor Specification and Architecture
Uday Singh
 
RTOS on ARM cortex-M platform -draft
RTOS on ARM cortex-M platform -draftRTOS on ARM cortex-M platform -draft
RTOS on ARM cortex-M platform -draft
Jou Neo
 
Processes and operating systems
Processes and operating systemsProcesses and operating systems
Processes and operating systems
RAMPRAKASHT1
 
Real-Time Scheduling Algorithms
Real-Time Scheduling AlgorithmsReal-Time Scheduling Algorithms
Real-Time Scheduling Algorithms
AJAL A J
 
Os rtos.ppt
Os rtos.pptOs rtos.ppt
Os rtos.ppt
rahul km
 
CPU Scheduling - Part2
CPU Scheduling - Part2CPU Scheduling - Part2
CPU Scheduling - Part2
Amir Payberah
 
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & DeadlockOperating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Ajit Nayak
 
Thesis1 3-23
Thesis1 3-23Thesis1 3-23
Thesis1 3-23
Hemant Dhoot
 
Computer Organization and Architecture 10th Edition by Stallings Test Bank
Computer Organization and Architecture 10th Edition by Stallings Test BankComputer Organization and Architecture 10th Edition by Stallings Test Bank
Computer Organization and Architecture 10th Edition by Stallings Test Bank
rohalcabaye
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 

What's hot (20)

AOS Lab 6: Scheduling
AOS Lab 6: SchedulingAOS Lab 6: Scheduling
AOS Lab 6: Scheduling
 
The Windows Scheduler
The Windows SchedulerThe Windows Scheduler
The Windows Scheduler
 
Embedded Intro India05
Embedded Intro India05Embedded Intro India05
Embedded Intro India05
 
Windows process-scheduling
Windows process-schedulingWindows process-scheduling
Windows process-scheduling
 
Process management
Process managementProcess management
Process management
 
Real Time System
Real Time SystemReal Time System
Real Time System
 
Windows process scheduling presentation
Windows process scheduling presentationWindows process scheduling presentation
Windows process scheduling presentation
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
ICTCoreCh11
ICTCoreCh11ICTCoreCh11
ICTCoreCh11
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementation
 
Processor Specification and Architecture
Processor Specification and Architecture Processor Specification and Architecture
Processor Specification and Architecture
 
RTOS on ARM cortex-M platform -draft
RTOS on ARM cortex-M platform -draftRTOS on ARM cortex-M platform -draft
RTOS on ARM cortex-M platform -draft
 
Processes and operating systems
Processes and operating systemsProcesses and operating systems
Processes and operating systems
 
Real-Time Scheduling Algorithms
Real-Time Scheduling AlgorithmsReal-Time Scheduling Algorithms
Real-Time Scheduling Algorithms
 
Os rtos.ppt
Os rtos.pptOs rtos.ppt
Os rtos.ppt
 
CPU Scheduling - Part2
CPU Scheduling - Part2CPU Scheduling - Part2
CPU Scheduling - Part2
 
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & DeadlockOperating Systems Part II-Process Scheduling, Synchronisation & Deadlock
Operating Systems Part II-Process Scheduling, Synchronisation & Deadlock
 
Thesis1 3-23
Thesis1 3-23Thesis1 3-23
Thesis1 3-23
 
Computer Organization and Architecture 10th Edition by Stallings Test Bank
Computer Organization and Architecture 10th Edition by Stallings Test BankComputer Organization and Architecture 10th Edition by Stallings Test Bank
Computer Organization and Architecture 10th Edition by Stallings Test Bank
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 

Similar to EKernel Thesis: an object-oriented micro-kernel

KSpeculative aspects of high-speed processor design
KSpeculative aspects of high-speed processor designKSpeculative aspects of high-speed processor design
KSpeculative aspects of high-speed processor design
ssuser7dcef0
 
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
National Cheng Kung University
 
OS_MD_1.pdf
OS_MD_1.pdfOS_MD_1.pdf
OS_MD_1.pdf
GauravDagar13
 
DEF CON 27 - ALI ISLAM and DAN REGALADO WEAPONIZING HYPERVISORS
DEF CON 27 - ALI ISLAM and DAN REGALADO WEAPONIZING HYPERVISORSDEF CON 27 - ALI ISLAM and DAN REGALADO WEAPONIZING HYPERVISORS
DEF CON 27 - ALI ISLAM and DAN REGALADO WEAPONIZING HYPERVISORS
Felipe Prado
 
MemGuard: Memory Bandwidth Reservation System for Efficient Performance Isola...
MemGuard: Memory Bandwidth Reservation System for Efficient Performance Isola...MemGuard: Memory Bandwidth Reservation System for Efficient Performance Isola...
MemGuard: Memory Bandwidth Reservation System for Efficient Performance Isola...
Heechul Yun
 
ch1.pptx
ch1.pptxch1.pptx
ch1.pptx
berekethailu2
 
WEEK6_COMPUTER_ORGANIZATION.pptx
WEEK6_COMPUTER_ORGANIZATION.pptxWEEK6_COMPUTER_ORGANIZATION.pptx
WEEK6_COMPUTER_ORGANIZATION.pptx
EmmanueljohnBarretto
 
Introduction to Computer Architecture and Organization
Introduction to Computer Architecture and OrganizationIntroduction to Computer Architecture and Organization
Introduction to Computer Architecture and Organization
Dr. Balaji Ganesh Rajagopal
 
Chapter01 (1).ppt
Chapter01 (1).pptChapter01 (1).ppt
Chapter01 (1).ppt
AvadhRakholiya3
 
Computer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and MicrocontrollerComputer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and Microcontroller
AmrutaMehata
 
Bedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.pdfBedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.pdf
AyushBaiswar1
 
Operating System / System Operasi
Operating System / System Operasi                   Operating System / System Operasi
Operating System / System Operasi
seolangit4
 
RTOS Material hfffffffffffffffffffffffffffffffffffff
RTOS Material hfffffffffffffffffffffffffffffffffffffRTOS Material hfffffffffffffffffffffffffffffffffffff
RTOS Material hfffffffffffffffffffffffffffffffffffff
adugnanegero
 
CS403: Operating System : Unit I _merged.pdf
CS403: Operating System :  Unit I _merged.pdfCS403: Operating System :  Unit I _merged.pdf
CS403: Operating System : Unit I _merged.pdf
Asst.prof M.Gokilavani
 
Operating System
Operating SystemOperating System
Operating System
Hitesh Mohapatra
 
Ch01 .pptssysueueueueu65egegeg3f3geye6d6yeueu
Ch01 .pptssysueueueueu65egegeg3f3geye6d6yeueuCh01 .pptssysueueueueu65egegeg3f3geye6d6yeueu
Ch01 .pptssysueueueueu65egegeg3f3geye6d6yeueu
tasheebedane
 
linux monitoring and performance tunning
linux monitoring and performance tunning linux monitoring and performance tunning
linux monitoring and performance tunning
iman darabi
 
참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의
DzH QWuynh
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/Core
Shay Cohen
 
Performance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro ProcessorPerformance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro Processor
Dileep Bhandarkar
 

Similar to EKernel Thesis: an object-oriented micro-kernel (20)

KSpeculative aspects of high-speed processor design
KSpeculative aspects of high-speed processor designKSpeculative aspects of high-speed processor design
KSpeculative aspects of high-speed processor design
 
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
 
OS_MD_1.pdf
OS_MD_1.pdfOS_MD_1.pdf
OS_MD_1.pdf
 
DEF CON 27 - ALI ISLAM and DAN REGALADO WEAPONIZING HYPERVISORS
DEF CON 27 - ALI ISLAM and DAN REGALADO WEAPONIZING HYPERVISORSDEF CON 27 - ALI ISLAM and DAN REGALADO WEAPONIZING HYPERVISORS
DEF CON 27 - ALI ISLAM and DAN REGALADO WEAPONIZING HYPERVISORS
 
MemGuard: Memory Bandwidth Reservation System for Efficient Performance Isola...
MemGuard: Memory Bandwidth Reservation System for Efficient Performance Isola...MemGuard: Memory Bandwidth Reservation System for Efficient Performance Isola...
MemGuard: Memory Bandwidth Reservation System for Efficient Performance Isola...
 
ch1.pptx
ch1.pptxch1.pptx
ch1.pptx
 
WEEK6_COMPUTER_ORGANIZATION.pptx
WEEK6_COMPUTER_ORGANIZATION.pptxWEEK6_COMPUTER_ORGANIZATION.pptx
WEEK6_COMPUTER_ORGANIZATION.pptx
 
Introduction to Computer Architecture and Organization
Introduction to Computer Architecture and OrganizationIntroduction to Computer Architecture and Organization
Introduction to Computer Architecture and Organization
 
Chapter01 (1).ppt
Chapter01 (1).pptChapter01 (1).ppt
Chapter01 (1).ppt
 
Computer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and MicrocontrollerComputer Organization: Introduction to Microprocessor and Microcontroller
Computer Organization: Introduction to Microprocessor and Microcontroller
 
Bedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.pdfBedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.pdf
 
Operating System / System Operasi
Operating System / System Operasi                   Operating System / System Operasi
Operating System / System Operasi
 
RTOS Material hfffffffffffffffffffffffffffffffffffff
RTOS Material hfffffffffffffffffffffffffffffffffffffRTOS Material hfffffffffffffffffffffffffffffffffffff
RTOS Material hfffffffffffffffffffffffffffffffffffff
 
CS403: Operating System : Unit I _merged.pdf
CS403: Operating System :  Unit I _merged.pdfCS403: Operating System :  Unit I _merged.pdf
CS403: Operating System : Unit I _merged.pdf
 
Operating System
Operating SystemOperating System
Operating System
 
Ch01 .pptssysueueueueu65egegeg3f3geye6d6yeueu
Ch01 .pptssysueueueueu65egegeg3f3geye6d6yeueuCh01 .pptssysueueueueu65egegeg3f3geye6d6yeueu
Ch01 .pptssysueueueueu65egegeg3f3geye6d6yeueu
 
linux monitoring and performance tunning
linux monitoring and performance tunning linux monitoring and performance tunning
linux monitoring and performance tunning
 
참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의참여기관_발표자료-국민대학교 201301 정기회의
참여기관_발표자료-국민대학교 201301 정기회의
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/Core
 
Performance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro ProcessorPerformance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro Processor
 

More from Murphy Chen

提升心靈的方法:佛陀教導的四念住
提升心靈的方法:佛陀教導的四念住提升心靈的方法:佛陀教導的四念住
提升心靈的方法:佛陀教導的四念住
Murphy Chen
 
資工人的職涯發展之道
資工人的職涯發展之道資工人的職涯發展之道
資工人的職涯發展之道
Murphy Chen
 
Basics of programming embedded processors
Basics of programming embedded processorsBasics of programming embedded processors
Basics of programming embedded processors
Murphy Chen
 
心靈環保
心靈環保心靈環保
心靈環保
Murphy Chen
 
資工人的學習成長之路
資工人的學習成長之路資工人的學習成長之路
資工人的學習成長之路
Murphy Chen
 
南北傳禪修經驗分享
南北傳禪修經驗分享南北傳禪修經驗分享
南北傳禪修經驗分享
Murphy Chen
 
資工人為什麼需要學習數位電路?
資工人為什麼需要學習數位電路?資工人為什麼需要學習數位電路?
資工人為什麼需要學習數位電路?
Murphy Chen
 
佛陀的啟示 (What the Buddha Taught)
佛陀的啟示 (What the Buddha Taught)佛陀的啟示 (What the Buddha Taught)
佛陀的啟示 (What the Buddha Taught)
Murphy Chen
 
禪修的效用與方法
禪修的效用與方法禪修的效用與方法
禪修的效用與方法
Murphy Chen
 

More from Murphy Chen (9)

提升心靈的方法:佛陀教導的四念住
提升心靈的方法:佛陀教導的四念住提升心靈的方法:佛陀教導的四念住
提升心靈的方法:佛陀教導的四念住
 
資工人的職涯發展之道
資工人的職涯發展之道資工人的職涯發展之道
資工人的職涯發展之道
 
Basics of programming embedded processors
Basics of programming embedded processorsBasics of programming embedded processors
Basics of programming embedded processors
 
心靈環保
心靈環保心靈環保
心靈環保
 
資工人的學習成長之路
資工人的學習成長之路資工人的學習成長之路
資工人的學習成長之路
 
南北傳禪修經驗分享
南北傳禪修經驗分享南北傳禪修經驗分享
南北傳禪修經驗分享
 
資工人為什麼需要學習數位電路?
資工人為什麼需要學習數位電路?資工人為什麼需要學習數位電路?
資工人為什麼需要學習數位電路?
 
佛陀的啟示 (What the Buddha Taught)
佛陀的啟示 (What the Buddha Taught)佛陀的啟示 (What the Buddha Taught)
佛陀的啟示 (What the Buddha Taught)
 
禪修的效用與方法
禪修的效用與方法禪修的效用與方法
禪修的效用與方法
 

Recently uploaded

Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 

Recently uploaded (20)

Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 

EKernel Thesis: an object-oriented micro-kernel

  • 1. 1999/6/11 Murphy Cheng-Che Chen 1 The Design and Implementation of EKernel: An Object-Oriented µ-kernel Cheng-Che Chen, Sheng-De Wang Department of Electrical Engineering National Taiwan University murphy@yours.com, sdwang@cc.ee.ntu.edu.tw
  • 2. Murphy Cheng-Che Chen 2 Outline • Motivation • Introduction • EKernel Design • Performance Measure • Conclusion and Future Work
  • 3. Murphy Cheng-Che Chen 3 Motivation • Problems – Continuously evolving processors – Demanding applications • Issues – Portability, Maintainability, Extensibility and Efficiency.
  • 4. Murphy Cheng-Che Chen 4 IntroductionIntroduction
  • 5. Murphy Cheng-Che Chen 5 Operating System • A layer of software on a bare machine. • Resource management. – Scheduling, Storage, IPC, etc... • User friendliness. – Execution environment (process management, file, interrupt, I/O)
  • 6. Murphy Cheng-Che Chen 6 Operating System E n d U s e r A p p l i c a t i o n P r o g r a m s U t i l i t i e s O p e r a t i n g S y s t e m C o m p u t e r H a r d w a r e P r o g r a m m e r O p e r a t i n g S y s t e m D e s i g n e r
  • 7. Murphy Cheng-Che Chen 7 Kernel • The mandatory part of an operating system common to all other software. • Under supervisor mode • Accessing hardware resources for user applications
  • 8. Murphy Cheng-Che Chen 8 Monolithic Kernel • The whole operating system is packed into a single large kernel. • Efficiency (all modules are under the same address space) • Complex • Very hard to adapt or extend.
  • 9. Murphy Cheng-Che Chen 9 µ-kernel • Only extremely essential primitive operating system functions should be put into the kernel. • Other operating system services are built on top of the µ-kernel. • OS components communicate with each other via messages.
  • 10. Murphy Cheng-Che Chen 10 Advantages of µ-kernel • A better modular system structure could be enforced by a clear µ-kernel interface. • A server malfunction is isolated as any other user program’s. • The system is more flexible and tailor- able, different policies can coexist.
  • 11. Murphy Cheng-Che Chen 11 2nd Generation µ-kernel • Problems of µ-kernels – Performance degradation – Inherited from monolithic kernels • Radical new designs – Exokernel (no abstractions) – L3/L4 (minimal set of µ-kernel abstractions, non-portable)
  • 12. Murphy Cheng-Che Chen 12 EKernel DesignEKernel Design
  • 13. Murphy Cheng-Che Chen 13 Abstractions • Process • Thread • Interprocess Communication
  • 14. Murphy Cheng-Che Chen 14 Process • Basic unit of resource allocation. • Has its own address space. • In Ekernel, traditional operating systems, windowing systems and device drivers are all processes.
  • 15. Murphy Cheng-Che Chen 15 Thread • Basic unit of CPU utilization. • Shares with peer threads its code section, data section, address space and resources. • Has its own stack and execution context.
  • 16. 09/16/18 Murphy Cheng-Che Chen 16 Inter-process Communications • Allow threads to communicate with each other and to synchronize their actions. • Highly related to the internal data structure of threads and processes. • Messaging, Semaphore, Mutex and Event.
  • 17. A p p lic a t io n P r o c e s s A p p lic a t io n P r o c e s s N e t w o r k in g P r o c e s s S e r ia l P o r t P r o c e s s W in d o w in g P r o c e s s F ile S y s t e m S e r v e r S h a r e d L ib r a r y S h a r e d L ib r a r y U s e r S p a c e K e r n e l S p a c e S y s t e m C a ll I n t e r f a c e P r o c e s s C o n t r o l T h r e a d C o n t r o l S y n c h r o n iz a t io n M e c h a n is m S c h e d u le r H a r d w a r e P la t f o r m H a r d w a r e E x c e p t io n H a n d lin g A p p lic a t io n P r o c e s s A p p lic a t io n P r o c e s s M e m o r y M a n a g e m e n t
  • 19. Murphy Cheng-Che Chen 19 Processor • Purpose – Abstract generic mechanisms provided by most processor. • Exported Function – EnableInterrupt, DisableInterrupt – SetThreadContext – SwitchContext
  • 20. Murphy Cheng-Che Chen 20 MMU • Purpose – Abstracts the memory management unit. • Exported Function – EnablePaging, DisablePaging – SwitchPageTable – PageTableMapRangeKernel, PageTableMapRangeUser
  • 21. Murphy Cheng-Che Chen 21 InterruptController • Purpose – Abstract generic interrupt controllers • Exported Function – DisableIRQ, EnableIRQ, DisableAllIRQ, EnableAllIRQ – AcknowledgeIRQ – HookIRQ
  • 22. Murphy Cheng-Che Chen 22 Process and Thread • Purpose – Maintain basic information as well as interfaces for accessing such information. • Process – Process ID, Process Name, Thread List, Memory Manager • Thread – Thread ID, Thread Name, Process ID
  • 23. Murphy Cheng-Che Chen 23 Scheduler • Purpose – Select a thread from ready queue and allocate CPU to it. • Data – Ready Queue • Exported Function – Schedule, Check-In, Check-Out, Disable- Preemption, Enable-Preemption, Yield
  • 24. Murphy Cheng-Che Chen 24 IPC • Include: MessageQueue, Semaphore, Mutex and Event objects. • Interact with Scheduler object – when they need to block the execution of a thread – when some thread in their waiting queues is ready for execution
  • 25. Murphy Cheng-Che Chen 25 SystemCallDispatcher • Purpose – Provides the interface between a process and the operating system kernel. • Exported Function – HookSystemCall – Dispatch
  • 26. Murphy Cheng-Che Chen 26 InterruptDispatcher • Purpose – Notify a thread that an interrupt has occurred. • Exported Function – HookInterrupt – Dispatch
  • 27. Murphy Cheng-Che Chen 27 Driver Architecture • Device drivers – Are allowed to execute in user space. – Invoke system services to • hook interested interrupts • request access rights to I/O – Can be combined with a server process to minimize data paths.
  • 28. Murphy Cheng-Che Chen 28 Portability • Two layers: ENano and EMicro. • To port EKernel, we need to – Write hardware specific codes for the actual implementation classes and have them derived from ENano objects. – In kernel initialization, point the global variables of ENano to the instances of the newly derived classes.
  • 29. Murphy Cheng-Che Chen 29 Extensibility • Take the scheduler for example – Inherit a new class PriorityThread from the class Thread – Add a function CreatePriorityThread that calls original CreateThread and records additional information – Implement the new scheduling algorithm in CheckIn, CheckOut, GetNext of Scheduler.
  • 30. Murphy Cheng-Che Chen 30 PerformancePerformance MeasureMeasure
  • 31. Murphy Cheng-Che Chen 31 User-Kernel Switches • Measures the overhead in doing a system call. System CPU, MHz Cycle L3 486, 50 123 – 180 Ekernel Pentium, 100 186 Mach RS2000, 16.7 900
  • 32. Bare Machine Page Table Switch Cycles 486 36 … 364 Pentium 36 … 1196 Operating System Address Space Switch Cycles Ekernel ( on Pentium ) 863 Murphy Cheng-Che Chen 32 Address Space Switches • Includes page table switching, TLB flushing, and cache flushing.
  • 33. Murphy Cheng-Che Chen 33 IPC • Round-trip IPC overhead includes sending/receiving a message, user-kernel switch, address space switch. System CPU, MHz Cycles / IPC Ekernel1 Pentium, 100 231 L3 486, 50 250 QNX 486, 33 1254 Ekernel2 Pentium, 100 1492 Mach RS2000, 16.7 1584 SRC RPC CVAX, 12.5 2900 Mach 486, 50 5750 Amoeba 68020, 15 6000 Spin Alpha 21064, 133 6783 Mach Alpha 21064, 133 6916
  • 34. Murphy Cheng-Che Chen 34 Conclusion AndConclusion And Future WorkFuture Work
  • 35. Murphy Cheng-Che Chen 35 Conclusion • We’ve designed an object-oriented micro-kernel which tries to tackle the problems of portability, maintainability, extensibility and efficiency. • We’ve implemented EKernel on Pentium processors. • The performance measure shows that we’ve adroitly tackled the conflicting issues of flexibility and efficiency.
  • 36. Murphy Cheng-Che Chen 36 Future Work • Extend the basic round-robin scheduler of EKernel to support multimedia applications as well as real-time applications. • Build a networking sub-system which encompasses the TCP/IP stack together with the networking driver to verify the effectiveness of EKernel driver architecture.