maximum length: 1 line high-level real-time programming in ...€¦ · •presentation subtitle:...

60
EMSOFT’05 18 September 2005 High-level Real-time Programming in Java Josh Auerbach David Bacon Perry Cheng Dave Grove V.T. Rajan Michael Hind IBM T.J. Watson Research Center Matthias Hauswirth Christoph Kirsch U. della Svizzera U. Salzburg Daniel Spoonhower Martin Vechev Carnegie Mellon U. U. of Cambridge

Upload: others

Post on 26-Aug-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

EMSOFT’05 18 September 2005

• Presentation subtitle:20pt Arial Regular,teal R045 | G182 | B179

Recommendedmaximum length: 2 lines

• Confidentiality/date line: 13pt Arial Regular, whiteMaximum length: 1 line

• Information separated by vertical strokes,with two spaces on either side

• Disclaimer information may also be appear in this area. Placeflush left, aligned at bottom, 8-10pt Arial Regular, white

• IBM logo must notbe moved, addedto, or altered inany way.

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

• Presentation title:28pt Arial Regular, black

Recommended maximumlength: 2 lines

• Group name:17pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10pt ArialRegular, white

Template release: Oct 02For the latest, go tohttp://w3.ibm.com/ibm/presentations

For clientpresentations,client’s logo maygo in this area

High-level Real-timeProgramming in Java

Josh Auerbach David Bacon Perry Cheng Dave Grove V.T. Rajan Michael Hind

IBM T.J. Watson Research CenterMatthias Hauswirth Christoph Kirsch

U. della Svizzera U. SalzburgDaniel Spoonhower Martin Vechev Carnegie Mellon U. U. of Cambridge

Page 2: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Why Real-Time Java??

Traditional methodologies• Highly restricted programming models with verifiable properties• And/Or low-level languages for explicit control• “ad-hoc low-level methods with validation by simulation and prototyping”

But: these methodologies do not scale• Halting problem• Low productivity (low-level languages, hand-optimization)

And: complexity of real-time systems are growing extremely fast• From isolated devices to integrated multi-level networked systems• Traditional methodologies break down

Page 3: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Why Not Real-time Java?

Garbage Collection• Non-deterministic pauses from 100 ms to 1 second• Requirement for real-time behavior is 100 us to 10 ms

Dynamic (JIT) Compilation• Unpredictable interruptions• Large variation in speed (10x)

Dynamic Loading and Resolution• Semantics determined by run-time ordering

Optimization technology optimizes average case• Thin locks, speculative in-lining, value prediction, etc.• Sometimes cause non-deterministic slowdowns

Page 4: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Not just “Soft” versus “Hard” Real-time

TIME SCALE

DE

TER

MIN

ISM

RECOVERY

Compare: video in a web browser versus video master broadcast

1 us 1 min

Page 5: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Our Vision for Real-time Java

Change the programming model…• By changing the domain in which the language can be applied;• Not by changing the language

Comprehensive programming methodology & environment• For the new generation of complex real-time systems

Page 6: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

From Seconds to Nanoseconds…10 s

1 s

100 µs

10 ms

100 ms

1 ms

10 µs

STRATEGY

TACTICS

COORDINATION

ACTUATION

SENSING

MODULATION

SIGNALING CUSTOM HARDWARE

PER

CEP

TIO

N

REA

CTI

ON

C

OG

NIT

ION

Page 7: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

From Sensors to Supercomputers…

Page 8: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

IBM Real-Time Java (J9 Virtual Machine)

Metronome Real-time Garbage Collection• Provides real-time without changing the programming model

RTSJ (Real-Time Specification for Java) – existing standard• Scheduling• Scopes

Ahead-of-Time Compilation• Ahead-of-time (AOT) compilation and JXE Linking• Removes JIT non-determinism, allows code to be moved into ROM

Real-time Linux• Maximize use of existing patches; stabilize; add needed features• Contribute to open-source community

Status• Being tested by major customer in defense missions sector• Other industries: telco, sensors & actuators, financial, gaming• Fourth alpha version delivered to customers, university partners 7/05

Page 9: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

What’s Next for Real-time Java

Background: RTSJ Scopes

Metronome Real-time Garbage Collection

Eventrons

E-Tasks

Conclusions

(lots more in the paper)

Page 10: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

RTSJ Scopes

Page 11: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

RTSJ Scoped Memory

HEAP

STACK

IMMORTALMEMORY

(Includes Globals)

SCOPE 1

SCOPE 2

LEGENDLegal RTSJ Pointer

Legal, NHRT Inaccessible

Illegal RTSJ Pointer

Page 12: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Problems with Scopes

Change to fundamental Java semantics• Both reads and writes can fail (“safe SEGFAULT”)• Smells like Java, but isn’t

Expensive to implement (read and write barriers)• And hard to optimize

Violates modularity• Incompatible with pre-existing code; no re-use• Huge problem for builders of large systems

Page 13: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

RTSJ Real-time Programming Abstractions10 s

1 s

100 µs

10 ms

100 ms

1 ms

10 µs

RealTimeThread with Heap

NoHeapRealTimeThreadwith Scopes

Page 14: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

MetronomeReal-time Garbage

Collection

Page 15: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

What is Metronome? A true real-time garbage collector

• 1 ms worst-case pause– Sufficient for majority of real-time applications

• Guaranteed utilization (typically 70-80% at 10 ms resolution)– Guaranteed ≠ Proved (system is too complex)

True to the Java programming model• No change to memory semantics• Bounds based on simple application characterization

Originally a uniprocessor algorithm…• Embedded systems heritage• Forces highly accurate analysis, but simplifies concurrency• But now extended to medium-scale SMP’s

[Bacon, Cheng, Rajan - POPL’03]

Page 16: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Scheduling Collection: Redistributing Work

Application Collector

Time

Spa

ce

a = allocation rate

c = collection rate

Example Application

Allocates half as fast asthe collector can collect

c = -2a

Note: collector freesno memory until done!

Resulting Schedule

Base Application Memory

Page 17: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Metronome Execution:

TuningFork Demo

Page 18: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Metronome Programming Abstractions10 s

1 s

100 µs

10 ms

100 ms

1 ms

10 µs

RealTimeThread with Heap

NoHeapRealTimeThreadwith Scopes

Page 19: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Eventrons

Page 20: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Eventrons: Very Low Latency Operations General principle:

• The higher the frequency, the simpler the task Many high-frequency tasks do buffer processing

• Don’t create new data structures, just move data

Eventrons• Data structure must be allocated in advance

– Usually includes some buffers• When Eventron is created, code and data are checked

– If OK, then guaranteed to be free of memory exceptions• More complex processing can be done by low-frequency task

– Builds data structures collected by real-time garbage collector

Page 21: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Eventrons

STACK

GLOBALS

LEGEND

Pointer Object

Final Pointer Pinned Object

Data Array

HEAP

Page 22: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Eventrons vs. Raw Linux Capability

Page 23: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Metronome + Eventron Abstractions10 s

1 s

100 µs

10 ms

100 ms

1 ms

10 µs

RealTimeThread with Heap

Eventrons

?

Page 24: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

E-Tasks

Page 25: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Task-based Model with L.E.T.

Task A

P

A

STask A

P

A

S

Task B

P

A

S

20 ms 30 ms 35 ms 40 ms

P

S

PS

[Henzinger & Kirsch – EMSOFT’01; Henzinger et al – PLDI’02]

Page 26: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Time Portability

Compelling Java feature: “write once, run anywhere”• As long as you don’t care about timing

Time-portability is a critical problem• Otherwise, must re-test on every platform change

Logical execution time (LET) provides a framework• Specify external timing• Compile to infinitely fast abstract virtual machine (E-code)• Validate when loading application in a particular virtual machine

Page 27: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

E-Tasks: A Functional Abstraction in Java

Task memory is private• No pointers to or from heap• Global access restricted to constants

Dynamic allocation allowed• Tasks may be garbage collected internally

Complex data structures may be sent and received• “Send by collection”

Validated – no run-time errors• Less precise than Eventrons, since data structures unknown• Dependent on order of validation

Page 28: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Automated Space/Time Tradeoffs

Logical execution time of E-code provides framework• Garbage collection within tasks allows space/time tradeoff

Scheduling as a space/time optimization problem• Dynamic adaptation to CPU speed, memory size• Deterministic, portable behavior of logical execution time

Spa

ce

Time

Slop

Slack

Dea

dlin

e

Live

AllocGC

GC

GC

Dea

dlin

e

Page 29: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Comparing Real-time Abstractions

250 us

Global GC

Yes

Yes

Yes

Yes

No

Metronome

10 us

Free on exit

No

Yes

No

No

Yes

Scopes

50 us

Local GC

Yes

Yes

No

No

Yes

E-Tasks

2 usLatency Limit

GC on finalizeMemory Reclamation

YesAccess from Heap

NoAccess to rest of Heap

NoAllocation

YesMemory Safety

YesImmediate Preemption

Eventrons

Page 30: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Metronome + Eventron + E-Task Abstractions10 s

1 s

100 µs

10 ms

100 ms

1 ms

10 µs

RealTimeThread with Heap

Eventrons

E-Tasks

Page 31: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Conclusions

Page 32: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Conclusions New generation of complex real-time systems

• Require software engineering benefits of Java Real-time Java has come a long way

• Scheduling• Real-time garbage collection• Deterministic compilation

Many challenges remain• Latencies competitive with C• Predictable scheduling• Time-portability

But real-time Java is happening now• Huge interest across many industries• State of the art product-quality implementation• Major improvements in programming models and tools

Page 33: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Questions?

http://www.research.ibm.com/metronome

Page 34: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Don’t Avoid Garbage Collection – Fix It!

Garbage collection invented by McCarthy [1960]• Work on real-time collection begins in 1978 [Baker]

But fundamental problems were not solved• Space overhead 4-8x• Fragmentation (impractical worst-case space bounds)• Extra CPU required (collector run on separate CPU)• No guaranteed time bounds

So: not credible in real-time and systems communities• Led to design of Scopes in RTSJ

Page 35: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Can Application be Modeled So Simply?

Collector

Time

Spa

ce

a = allocation rate?? c = collection rate

Page 36: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Allocation Stability vs. Time Scale

Peak Allocation Rate

0

50

100

150

200

250

300

100 500 1000 5000 10000 Average

Time Window (microseconds)

MB

/s (p

eak)

Page 37: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Tuning Fork

Page 38: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Tracing, Analysis, and Visualization

Trace facility components• Cycle-accurate record of JVM events (GC, JIT, scheduler, etc)• Linux kernel modification allows integration of OS events• User-level (Java) events

Visualization and Analysis• Currently have static tools; need “always on” monitoring• Trace analyzer/visualizer must itself be a real-time system• Detect and diagnose real-time faults• Oscilloscope/TiVO user interface; zoom in and out• Dynamic statistical analysis of behavior for FAWCET

Page 39: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Comparing Real-time Abstractions

250 us

Global GC

Yes

Yes

Yes

Yes

No

Metronome

10 us

Free on exit

No

Yes

No

No

Yes

Scopes

2 usLatency Limit

GC on finalizeMemory Reclamation

YesAccess from Heap

NoAccess to rest of Heap

NoAllocation

YesMemory Safety

YesImmediate Preemption

Eventrons

Page 40: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

BACKUP

Page 41: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Minimum Mutator Utilization

Metric for “real-timeness” What it’s not

• Throughput• Latency

What it is• Worst-case utilization over a time interval• Interval may contain multiple short interruptions

– Upper bound on latency (interval x utilization)

• Other intervals may have higher utilization (100% when GC off)– Lower bound on throughput (utilization)

Δt

Δt = 4msu = 50%

Latency = 1msThroughput = 75%

Δt Δt

[Cheng, Blelloch – PLDI’01]

Page 42: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Not just “Soft” versus “Hard” Real-time

TIME SCALE

DE

TER

MIN

ISM

RECOVERY

1 us 1 min

Page 43: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Garbage Collection as a Periodic Task

SensorActuator

Deadline

Event Processing

Other Processing

Garbage Collection

Collector PeriodWhy it wasn’t used Short period: low CPU utilization

• Missed deadlines

Long period: low memory utilization• Memory overflows -> Synchronous Collection -> Missed deadlines

Page 44: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Space γ Time

a*(∆GC) = Per-GC Allocate Rate

m = Live Data

RT = Trace Rate50 MB/s

RS = Sweep Rate300 MB/s

Application (Mutator)

Collector

Scheduler

u = utilization

s = used space

∆t = period

30 MB

50 MB/s

5 ms

45 MB

50%

100 MB

75%

Page 45: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Limits of Real-time Garbage Collection

Changes to heap require synchronization• Application modifies pointers and allocates objects• Collector moves objects to compact memory

Synchronization is expensive• To keep cost reasonable, done in quanta (Metronome “beats”)• Quantization has limit (250-500 us)

Real-time collection works for many tasks, but not all• Currently, only alternative is Scopes

Page 46: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

MultiprocessorMetronome

Page 47: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Multiprocessor Metronome

Multiprocessor support required for large systems• Coordination layer supervises numerous real-time subsystems

Metronome uses safe-point architecture• Stops mutator threads at predictable points• Makes low-level mutator and collector operations atomic

On SMP, atomicity is lost unless all threads are stopped• Leads to race condition when GC moves an object (defragment)

Page 48: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Multiprocessor Metronome (1)

Synchronous collector increments (“stop-the-worldlet”)• Limits concurrency; makes problem tractable• Barrier synchronizations limit scalability to ~8 CPUs

Real-time-constrained load balancing

UserTask

GC

GC

UserTask

GC

UserTask

UserTask

GC

GC

UserTask

UserTask

GC

GC

UserTask

GC

UserTask

UserTask

GC

GC

UserTask

Page 49: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Multiprocessor Metronome (2) - Staccato To scale, must have fine-grained concurrency

• But cost is too high Staccato uses an asymmetric abort protocol

• Low cost synchronization• But not guaranteed to make progress

Apply probabilistic (FAWCET) approach• Bound variance; Reduce correlation• Progress more likely than hardware failure

Benefits• Very high degree of SMP scalability• Arbitrary pre-emptibility means microsecond response

– Metronome is 100x more responsive than competitors; Staccato is 100x additional

Page 50: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

DeterministicCompilation

Page 51: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Eliminating JIT Non-determinism (1) - AOT Java is a dynamic language

• Compilation is “just-in-time”• So unfortunately, meaning of “compile” is order-dependent

Ahead-of-time Compilation (AOT)• Compiles jar files into loadable binary modules• Splits modules into read-only (ROM) and read-write portions

Supports all Java features:• Dynamic class loading; Reflection

Inhibited optimizations• Optimizations with high variability• Just-in-time (data dependent) optimizations• 80-110% speed of JITted code

Page 52: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Eliminating JIT Non-determinism (2)

AOT Compilation sacrifices significant performance Current JIT techniques are ad-hoc and non-incremental

• Sometimes introduce slowdowns Extend Metronome methodology to JIT compilation

• Collector “beats” become JVM beats – use for GC, JIT, etc.• Distribute JIT over time without impacting deadlines

Instrument/update code in time-safe manner• Use slack for trial runs• If bad optimization, abandon before deadline missed

UserTask

GC

GC

UserTask

GC

UserTask

UserTask

UserTaskJ

IT

JIT

[w/ Jeremy Lau, Matthew Arnold]

Page 53: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

FAWCET:Probabilistic Real-time

Page 54: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

1995 1996 1997 1998 1999 2000 2001

Faster Hardware, Less Deterministic (?)

Page 55: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

FAWCET: Probabilistic Real-Time Analysis

Real-time Truism: “Real-Time is Not Real Fast”• But we say: Real Slow is Not Real Good

– Faster programs are more likely to meet deadlines

• Worst-Case Execution Time (WCET) analysis inhibits optimization

We propose a probabilistic approach• FAWCET: Frequency Analyzed Worst-Case Execution Time

– Embrace non-determinism instead of avoiding it

• Require sources of non-determinism statistically independent– Cache miss, hash table collision, buffer overflow, devirtualization failure

• Allows over-provisioning to be amortized over event types– Drive probability of timing failure below hardware MTBF

Page 56: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

FAWCET vs. WCET

FAWCETMany events. Modest over-provisioning

WCETFew events.

Time Scale LongShort

Page 57: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Synthesis and Verification of Concurrent Collectors

[ Vechev, Bacon, Cheng, Grove - ECOOP’05]

Memory Overhead (Floating Garbage)

Wor

st-c

ase

Com

plet

ion

Tim

e Steele

Dijkstra

Vechev et al

AbstractCollector

Yuasa

Page 58: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Syncopation: Generational Real-Time GC

Nursery Heapa'

Allocation rate is single biggest factor controlling utilization• Nursery reduces heap allocation rate• With arraylet pre-tenuring, survival rate even lower (up to 3x reduction)

Collect nursery synchronously• On ARM, we can collect 64K in 4ms; on Pentium, collect 256K in 500 us• So, collect small nursery synchronously• But spike in allocation rate or survival rate can hurt utilization• Divide real-time interval (measure) into beats• If too many nursery beats, syncopate: spill allocation into heap

Early results: up to 30% increase in utilization possible

a

[Bacon, Cheng, Grove, Vechev – LCTES’05]

Page 59: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

GC Pause Times (ms)

Page 60: Maximum length: 1 line High-level Real-time Programming in ...€¦ · •Presentation subtitle: 20pt Arial Regular, teal R045 | G182 | B179 Recommended maximum length: 2 lines •Confidentiality/date

High-level Real-time Programming in Java• IBM logo must not

be moved, addedto, or altered inany way.

• Background shouldnot be modified,

• Title/subtitle/confidentiality line: 10pt Arial Regular, whiteMaximum length: 1 line

Information separated by vertical strokes,with two spaces on either side

• Slide heading:28pt Arial Regular,blue R120 | G137 | B251

Maximum length: 2 lines

• Slide body:18pt Arial Regular, black

Square bullet color:teal R045 | G182 | B179

Recommended maximumtext length: 5 principalpoints

• Group name:14pt Arial Regular, white

Maximum length: 1 line

• Copyright: 10ptArialRegular, white

Optional slide number:10pt Arial Bold, white

Template release: Oct 02For the latest, go to http://w3.ibm.com/ibm/presentations

Indications in green = Live content

Indications in white = Edit in master

Indications in blue = Locked elements

Indications in black = Optional

elements

David F. Bacon EMSOFT’05 Presentation 18 September 2005

Instantaneous Utilization: 10 ms (100 Hz)