kit – the cooperation of forschungszentrum karlsruhe gmbh and universität karlsruhe (th) system...

11
KIT – The cooperation of Forschungszentrum Karlsruhe GmbH and Universität Karlsruhe (TH) SYSTEM ARCHITECTURE GROUP, KARLSRUHE UNIVERSITY A Microkernel API for Fine-grained Decomposition Sebastian Reichelt, Jan Stoess, Frank Bellosa

Upload: myra-goodwin

Post on 05-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: KIT – The cooperation of Forschungszentrum Karlsruhe GmbH and Universität Karlsruhe (TH) SYSTEM ARCHITECTURE GROUP, KARLSRUHE UNIVERSITY A Microkernel

KIT – The cooperation of Forschungszentrum Karlsruhe GmbH and Universität Karlsruhe (TH)

SYSTEM ARCHITECTURE GROUP, KARLSRUHE UNIVERSITY

A Microkernel API for Fine-grained Decomposition

Sebastian Reichelt, Jan Stoess, Frank Bellosa

Page 2: KIT – The cooperation of Forschungszentrum Karlsruhe GmbH and Universität Karlsruhe (TH) SYSTEM ARCHITECTURE GROUP, KARLSRUHE UNIVERSITY A Microkernel

Component model

Interfaces

Microkernel

OS Decomposition

Sebastian Reichelt, Jan Stoess, Frank BellosaA Microkernel API for Fine-grained Decomposition

2/11

Kernel

Packets

Microkernel

ThreadsAddress spaces

IPC

ThreadsAddress spaces

IPC

TCP/IP stack

Device driver

ThreadsThreads

IPC

Address spaces

Data location?Data transfer?

Split state?System

knowledge?

Ease of development?

Reuse?Granularity?

Page 3: KIT – The cooperation of Forschungszentrum Karlsruhe GmbH and Universität Karlsruhe (TH) SYSTEM ARCHITECTURE GROUP, KARLSRUHE UNIVERSITY A Microkernel

Microkernel

Our Approach

Sebastian Reichelt, Jan Stoess, Frank BellosaA Microkernel API for Fine-grained Decomposition

3/11

Packets

Microkernel

Component model

TCP/IP stack

Device driver

Interfaces

Function calls

Servers

Local objects

Function calls

Local objects

References

Servers

References

Component model

Data location?Data transfer?

Split state?System

knowledge?

Page 4: KIT – The cooperation of Forschungszentrum Karlsruhe GmbH and Universität Karlsruhe (TH) SYSTEM ARCHITECTURE GROUP, KARLSRUHE UNIVERSITY A Microkernel

Designing for Decomposition

Sebastian Reichelt, Jan Stoess, Frank BellosaA Microkernel API for Fine-grained Decomposition

4/11

Server

Existing microkernels:Microkernel

ThreadsAddress spaces

IPCCreate thread

Send IPC

Receive IPC

TaskTask

Task Task

Server

Our microkernel: Component model

ServersLocal objects

ReferencesProvided interface

Required interfaces

Threading options

Component Component

ComponentComponent

Page 5: KIT – The cooperation of Forschungszentrum Karlsruhe GmbH and Universität Karlsruhe (TH) SYSTEM ARCHITECTURE GROUP, KARLSRUHE UNIVERSITY A Microkernel

Reference Management

Sebastian Reichelt, Jan Stoess, Frank BellosaA Microkernel API for Fine-grained Decomposition

5/11

Microkernel

Page 6: KIT – The cooperation of Forschungszentrum Karlsruhe GmbH and Universität Karlsruhe (TH) SYSTEM ARCHITECTURE GROUP, KARLSRUHE UNIVERSITY A Microkernel

Reference Management

Sebastian Reichelt, Jan Stoess, Frank BellosaA Microkernel API for Fine-grained Decomposition

6/11

openconnection

TCP/IP stack

TCP connection

send packet

Client

Microkernel

Page 7: KIT – The cooperation of Forschungszentrum Karlsruhe GmbH and Universität Karlsruhe (TH) SYSTEM ARCHITECTURE GROUP, KARLSRUHE UNIVERSITY A Microkernel

Prototype

Multi-server OS (~4 man-months)Basic servers (memory, scheduling, ...)

Drivers (standard PC hardware, PCI, Ethernet)

Decomposed TCP/IP stack

Linux ABI implementation (partial)

Kernel (~2 man-months)IA-32 implementation

Servers in kernel mode

Sebastian Reichelt, Jan Stoess, Frank BellosaA Microkernel API for Fine-grained Decomposition

7/11

Linux

lwIP

Evaluation: granularity, reuse, performance

Page 8: KIT – The cooperation of Forschungszentrum Karlsruhe GmbH and Universität Karlsruhe (TH) SYSTEM ARCHITECTURE GROUP, KARLSRUHE UNIVERSITY A Microkernel

Granularity

Sebastian Reichelt, Jan Stoess, Frank BellosaA Microkernel API for Fine-grained Decomposition

8/11

Minimum Maximum Average

Lines of code 27 1363 306

Bytes 280 13588 2907

Linux ABI layer

As fine-granular as desired

Size of a server:

Page 9: KIT – The cooperation of Forschungszentrum Karlsruhe GmbH and Universität Karlsruhe (TH) SYSTEM ARCHITECTURE GROUP, KARLSRUHE UNIVERSITY A Microkernel

Reuse

Sebastian Reichelt, Jan Stoess, Frank BellosaA Microkernel API for Fine-grained Decomposition

9/11

RTL-8139 driver ported from Linux (~1 man-month):

lines of code

e.g. calls via interfacesinstead of directly

queue-basedpacket processing

Reuse possible with little effort

Page 10: KIT – The cooperation of Forschungszentrum Karlsruhe GmbH and Universität Karlsruhe (TH) SYSTEM ARCHITECTURE GROUP, KARLSRUHE UNIVERSITY A Microkernel

Performance

Sebastian Reichelt, Jan Stoess, Frank BellosaA Microkernel API for Fine-grained Decomposition

10/11

Operation Pentium 4 Core 2

Cross-component call/return (kernel mode)

46 23

Function call/return 11 9

cycles

Operation Pentium 4 Core 2

Cross-component call/return (inter-AS)

1965 771

L4Ka round-trip IPC 2262 1052

Low performance overhead

Page 11: KIT – The cooperation of Forschungszentrum Karlsruhe GmbH and Universität Karlsruhe (TH) SYSTEM ARCHITECTURE GROUP, KARLSRUHE UNIVERSITY A Microkernel

Conclusion

Microkernel APIs enforce system structureExisting APIs distributed systems

Development, reuse, and granularity problems

Our approach: component model as APIMore general abstractions related to decomposition(servers, interfaces, calls, references, local objects, ...)

Derived microkernel design

Networking-capable prototype OS

Good granularity and reuse, promising performance

Sebastian Reichelt, Jan Stoess, Frank BellosaA Microkernel API for Fine-grained Decomposition

11/11

http://oosys.sourceforge.net/

Demo today