wanja hofer, daniel lohmann, fabian scheler, … · sloth: let the hardware do the work! wanja...

17
Sloth: Let the Hardware Do the Work! Wanja Hofer, Daniel Lohmann, Fabian Scheler, Wolfgang Schr¨ oder-Preikschat SOSP 2009, WiP Session

Upload: doduong

Post on 23-Aug-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

Sloth: Let the Hardware Do the Work!

Wanja Hofer, Daniel Lohmann, Fabian Scheler,Wolfgang Schroder-Preikschat

SOSP 2009, WiP Session

Confessions of a Slothful

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 2

How It All Began...

Building embedded OSes as used in automotive industry

Prevalent OS standard: OSEK OS

Event-triggered, priority-driven real-time system

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 3

Let the Hardware Do the Work!

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 4

Sloth: Threads as Interrupts

Idea: Let interrupt subsystem do the schedulingand dispatching work

New: All threads are interrupt handlers andhave interrupt priorities

New: setReady(thread) is implemented as anIRQ

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 5

Sloth: Design and Example

IRQ SourceThread A

prio=1

request

IRQ SourceThread B

prio=2

request

IRQ SourceThread C

prio=3

request

IRQArbi-

trationUnit

CPU

curprio=X

IRQ VectorTable

threadA()

threadB()

threadC()

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 6

Sloth: Design and Example

IRQ SourceThread A

prio=1

request

IRQ SourceThread B

prio=2

request

IRQ SourceThread C

prio=3

request

IRQArbi-

trationUnit

CPU

curprio=1

IRQ VectorTable

threadA()

threadB()

threadC()

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 6

Sloth: Design and Example

IRQ SourceThread A

prio=1

request

IRQ SourceThread B

prio=2

request

IRQ SourceThread C

prio=3

request

IRQArbi-

trationUnit

CPU

curprio=1

IRQ VectorTable

threadA()

threadB()

threadC()

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 6

Sloth: Design and Example

IRQ SourceThread A

prio=1

request

IRQ SourceThread B

prio=2

request

IRQ SourceThread C

prio=3

request

IRQArbi-

trationUnit

CPU

curprio=3

IRQ VectorTable

threadA()

threadB()

threadC()

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 6

Sloth: Design and Example

IRQ SourceThread A

prio=1

request

IRQ SourceThread B

prio=2

request

IRQ SourceThread C

prio=3

request

IRQArbi-

trationUnit

CPU

curprio=3

IRQ VectorTable

threadA()

threadB()

threadC()

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 6

Sloth: Design and Example

IRQ SourceThread A

prio=1

request

IRQ SourceThread B

prio=2

request

IRQ SourceThread C

prio=3

request

IRQArbi-

trationUnit

CPU

curprio=3

IRQ VectorTable

threadA()

threadB()

threadC()

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 6

Sloth: Design and Example

IRQ SourceThread A

prio=1

request

IRQ SourceThread B

prio=2

request

IRQ SourceThread C

prio=3

request

IRQArbi-

trationUnit

CPU

curprio=2

IRQ VectorTable

threadA()

threadB()

threadC()

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 6

Sloth: Design and Example

IRQ SourceThread A

prio=1

request

IRQ SourceThread B

prio=2

request

IRQ SourceThread C

prio=3

request

IRQArbi-

trationUnit

CPU

curprio=1

IRQ VectorTable

threadA()

threadB()

threadC()

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 6

Sloth: Advantages

Simple

Small

Fast (2–20x)

Cool

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 7

Sloth: One of the Seven Deadly Sins

David Fincher, Se7en (1995)

Nicolas le Rouge, Le GrantKalendrier Des Bergiers (1496)

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 8

Sloth: One of the Seven Deadly Sins

David Fincher, Se7en (1995) Nicolas le Rouge, Le GrantKalendrier Des Bergiers (1496)

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 8

More About Being a Sloth

1. Talk to me!

2. http://www4.cs.fau.de/Research/Sloth/

Wanja Hofer Sloth: Let the Hardware Do the Work! (SOSP-WiP 2009) 9