SlideShare a Scribd company logo
Predictable Java

    • Overview
    • Implementations
    • Next steps



Infinit Højniveausprog, 19 August 2009
Anders P. Ravn and Hans Søndergaard
                                         1
A Real-Time Application

• Periodic Event Handlers
• Aperiodic Event Handlers
collected in a mission
• Mission Handler
Each handler
has a Memory
is Scheduled

                             2
Periodic handler

class Periodic extends PeriodicEventHandler
{
  protected Periodic(.., PeriodicParameters pp,
                     Scheduler scheduler,
                     MemoryArea memory);

    public void handleEvent() {
      // the logic to be executed every period
    }
}

                                                 3
Aperiodic handler

class Aperiodic extends AperiodicEventHandler
{
  protected Aperiodic(.., AperiodicParameters ap,
                      Scheduler scheduler,
                      MemoryArea memory);

    public void handleEvent() {
      // the logic to be executed when an event occurs
    }
}




                                                         4
A simple mission
public class Basic extends Mission
{
  protected Basic(.., AperiodicParameters ap,
                  Scheduler scheduler,
                  MemoryArea memoryArea)
  {
        ... // initialization
    }

    public static void main (String[] args) {
      new Basic( null, null,
                 new CyclicScheduler(),
                 new LTMemory(10*1024));
    }
}
                                                5
…The mission

addToMission(
  new Periodic( null, pp, getScheduler(),
                new LTMemory(1024)));
addToMission(
  new Periodic( null, pp, getScheduler(),
                new LTMemory(1024)));
...
add(); // mission to its scheduler




                                            6
Complex mission
private Mission[] mission;
private int active = 0;
static AperiodicEvent event;

public ThreeSequentialMissions(...) {
  mission = new Mission[3];

    // set up the three missions
    mission[0] = new Mission(...);
    // add handlers for mission 0
    // including the mission termination
    ...
    mission[1] = new Mission();
    ...
    // start the first mission
    mission[active].add();
    event = new AperiodicEvent(this);
}
                                           7
Changing mission

private Mission[] mission;
private int active = 0;
static AperiodicEvent event;

public ThreeSequentialMissions(...) {
  ...
}


public void handleEvent() {
  mission[active].remove();
  active = (active + 1) % mission.length;
  mission[active].add();
}


                                            8
Level 0




• only Periodic Event Handlers
• cyclic scheduler


                                 9
Level 1

                                           SO 3 has the
                                           highest priority




 • periodic and aperiodic event handlers
 • fixed-priority preemptive scheduler
                                                         10
Implementations

• On top of RTSJ (adapter)
• Native implementation using
  – JamVM
  – Xenomai/Linux
  – Mechatronic Brick




                                11
Schedulers

• Cyclic scheduler
  – Only one mission, with periodic handlers
  – Using cyclic executive model
  – The Scheduler: a periodic RT_TASK
     • period = gcd of all the handler periods
• Fixed priority pre-emptive scheduler
  – Missions with periodic and aperiodic handlers
  – Implemented as RT_TASKs

                                                 12
Memory

• No GC
• Two types of memory
  – Immortal memory = Heap (without GC)
    • Lifetime = lifetime of the application
  – Scoped memory
    • Each handler has its own private memory
    • Lifetime = lifetime of the handler
    • Object allocation rewritten in JamVM


                                                13
Synchronization

• Java’s locking model (synchronization)
  – does not fit to avoid priority inversion
• Xenomai's MUTEX enforce priority inheritance
• Rewritten JamVM
  – synchronized methods in classes for shared objects:
     • uses MUTEX lock/unlock




                                                          14
Next steps: Workbench




                        15
Next steps

•   Eclipse plugins
•   Homepage for Predictable Java
•   Different tools for static analyses
•   Examples
•   ...




                                          16
References
• A predictable Java profile - rationale and implementations
   Thomas Bøgholm, René R. Hansen, Anders P. Ravn, Bent Thomsen,
     and Hans Søndergaard
   JTRES’09. 23-25 September 2009.
• Safety-Critical Java
   JSR 302: Safety Critical Java Technology
   http://jcp.org/en/jsr/detail?id=302
• Java for Safety-Critical Applications
   Thomas Henties, James J. Hunt, Doug Locke, Kelvin Nilsen, Martin
     Schoeberl, Jan Vitek.
   SafeSert 2009.
• Safety Critical Specification for Java
   Version 0.5. August 2008. Draft.

                                                                      17

More Related Content

Viewers also liked

Budget Presentation 4-6-11
Budget Presentation 4-6-11Budget Presentation 4-6-11
Budget Presentation 4-6-11
wcsd_01
 
Budget 2 9-11
Budget 2 9-11Budget 2 9-11
Budget 2 9-11
wcsd_01
 
Why should we develop an app
Why should we develop an appWhy should we develop an app
Why should we develop an app
Mel Meng
 
PHARMA EVENTS February 2012
PHARMA EVENTS   February 2012PHARMA EVENTS   February 2012
PHARMA EVENTS February 2012
MDSpangler
 
Disruptive technologies
Disruptive technologiesDisruptive technologies
Disruptive technologies
Mel Meng
 
Envision version 2.0
Envision version 2.0Envision version 2.0
Envision version 2.0
Mel Meng
 
1 30-13 boe present
1 30-13 boe present1 30-13 boe present
1 30-13 boe present
wcsd_01
 
Test driven model development
Test driven model developmentTest driven model development
Test driven model development
Mel Meng
 
Phil Ads
Phil AdsPhil Ads
Phil Ads
leony1948
 

Viewers also liked (9)

Budget Presentation 4-6-11
Budget Presentation 4-6-11Budget Presentation 4-6-11
Budget Presentation 4-6-11
 
Budget 2 9-11
Budget 2 9-11Budget 2 9-11
Budget 2 9-11
 
Why should we develop an app
Why should we develop an appWhy should we develop an app
Why should we develop an app
 
PHARMA EVENTS February 2012
PHARMA EVENTS   February 2012PHARMA EVENTS   February 2012
PHARMA EVENTS February 2012
 
Disruptive technologies
Disruptive technologiesDisruptive technologies
Disruptive technologies
 
Envision version 2.0
Envision version 2.0Envision version 2.0
Envision version 2.0
 
1 30-13 boe present
1 30-13 boe present1 30-13 boe present
1 30-13 boe present
 
Test driven model development
Test driven model developmentTest driven model development
Test driven model development
 
Phil Ads
Phil AdsPhil Ads
Phil Ads
 

Similar to Predictable Java af Anders P Ravn, CISS og Hans Søndergaard, ViaUC

Node.js Course 1 of 2 - Introduction and first steps
Node.js Course 1 of 2 - Introduction and first stepsNode.js Course 1 of 2 - Introduction and first steps
Node.js Course 1 of 2 - Introduction and first steps
Manuel Eusebio de Paz Carmona
 
Embedded softwaredevelopment hcs
Embedded softwaredevelopment hcsEmbedded softwaredevelopment hcs
Embedded softwaredevelopment hcs
InfinIT - Innovationsnetværket for it
 
Highly Scalable Java Programming for Multi-Core System
Highly Scalable Java Programming for Multi-Core SystemHighly Scalable Java Programming for Multi-Core System
Highly Scalable Java Programming for Multi-Core System
James Gan
 
Server-side JS with NodeJS
Server-side JS with NodeJSServer-side JS with NodeJS
Server-side JS with NodeJS
Lilia Sfaxi
 
SWT Tech Sharing: Node.js + Redis
SWT Tech Sharing: Node.js + RedisSWT Tech Sharing: Node.js + Redis
SWT Tech Sharing: Node.js + Redis
Infinity Levels Studio
 
Java Enterprise Edition
Java Enterprise EditionJava Enterprise Edition
Java Enterprise Edition
Francesco Nolano
 
Symbian OS - Active Objects
Symbian OS - Active ObjectsSymbian OS - Active Objects
Symbian OS - Active Objects
Andreas Jakl
 
Scheduling tasks the human way - Brad Wood - ITB2021
Scheduling tasks the human way -  Brad Wood - ITB2021Scheduling tasks the human way -  Brad Wood - ITB2021
Scheduling tasks the human way - Brad Wood - ITB2021
Ortus Solutions, Corp
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance Tuning
Jeremy Leisy
 
Basic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.jsBasic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.js
Gary Yeh
 
17javascript.ppt
17javascript.ppt17javascript.ppt
17javascript.ppt
PraveenRai90
 
17javascript.ppt
17javascript.ppt17javascript.ppt
17javascript.ppt
bcanawakadalcollege
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013
Opersys inc.
 
Meteor Boulder meetup #1
Meteor Boulder meetup #1Meteor Boulder meetup #1
Meteor Boulder meetup #1
Robert Dickert
 
Software Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and FlamegraphsSoftware Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and Flamegraphs
Isuru Perera
 
Ob1k presentation at Java.IL
Ob1k presentation at Java.ILOb1k presentation at Java.IL
Ob1k presentation at Java.IL
Eran Harel
 
Reactive Design Patterns by Dr.Roland Kuhn
Reactive Design Patterns by Dr.Roland KuhnReactive Design Patterns by Dr.Roland Kuhn
Reactive Design Patterns by Dr.Roland Kuhn
J On The Beach
 
Reactive Design Patterns — J on the Beach
Reactive Design Patterns — J on the BeachReactive Design Patterns — J on the Beach
Reactive Design Patterns — J on the Beach
Roland Kuhn
 
Command Query Responsibility Segregation and Event Sourcing
Command Query Responsibility Segregation and Event SourcingCommand Query Responsibility Segregation and Event Sourcing
Command Query Responsibility Segregation and Event Sourcing
MitinPavel
 
The hitchhiker’s guide to Prometheus
The hitchhiker’s guide to PrometheusThe hitchhiker’s guide to Prometheus
The hitchhiker’s guide to Prometheus
Bol.com Techlab
 

Similar to Predictable Java af Anders P Ravn, CISS og Hans Søndergaard, ViaUC (20)

Node.js Course 1 of 2 - Introduction and first steps
Node.js Course 1 of 2 - Introduction and first stepsNode.js Course 1 of 2 - Introduction and first steps
Node.js Course 1 of 2 - Introduction and first steps
 
Embedded softwaredevelopment hcs
Embedded softwaredevelopment hcsEmbedded softwaredevelopment hcs
Embedded softwaredevelopment hcs
 
Highly Scalable Java Programming for Multi-Core System
Highly Scalable Java Programming for Multi-Core SystemHighly Scalable Java Programming for Multi-Core System
Highly Scalable Java Programming for Multi-Core System
 
Server-side JS with NodeJS
Server-side JS with NodeJSServer-side JS with NodeJS
Server-side JS with NodeJS
 
SWT Tech Sharing: Node.js + Redis
SWT Tech Sharing: Node.js + RedisSWT Tech Sharing: Node.js + Redis
SWT Tech Sharing: Node.js + Redis
 
Java Enterprise Edition
Java Enterprise EditionJava Enterprise Edition
Java Enterprise Edition
 
Symbian OS - Active Objects
Symbian OS - Active ObjectsSymbian OS - Active Objects
Symbian OS - Active Objects
 
Scheduling tasks the human way - Brad Wood - ITB2021
Scheduling tasks the human way -  Brad Wood - ITB2021Scheduling tasks the human way -  Brad Wood - ITB2021
Scheduling tasks the human way - Brad Wood - ITB2021
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance Tuning
 
Basic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.jsBasic Understanding and Implement of Node.js
Basic Understanding and Implement of Node.js
 
17javascript.ppt
17javascript.ppt17javascript.ppt
17javascript.ppt
 
17javascript.ppt
17javascript.ppt17javascript.ppt
17javascript.ppt
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013
 
Meteor Boulder meetup #1
Meteor Boulder meetup #1Meteor Boulder meetup #1
Meteor Boulder meetup #1
 
Software Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and FlamegraphsSoftware Profiling: Java Performance, Profiling and Flamegraphs
Software Profiling: Java Performance, Profiling and Flamegraphs
 
Ob1k presentation at Java.IL
Ob1k presentation at Java.ILOb1k presentation at Java.IL
Ob1k presentation at Java.IL
 
Reactive Design Patterns by Dr.Roland Kuhn
Reactive Design Patterns by Dr.Roland KuhnReactive Design Patterns by Dr.Roland Kuhn
Reactive Design Patterns by Dr.Roland Kuhn
 
Reactive Design Patterns — J on the Beach
Reactive Design Patterns — J on the BeachReactive Design Patterns — J on the Beach
Reactive Design Patterns — J on the Beach
 
Command Query Responsibility Segregation and Event Sourcing
Command Query Responsibility Segregation and Event SourcingCommand Query Responsibility Segregation and Event Sourcing
Command Query Responsibility Segregation and Event Sourcing
 
The hitchhiker’s guide to Prometheus
The hitchhiker’s guide to PrometheusThe hitchhiker’s guide to Prometheus
The hitchhiker’s guide to Prometheus
 

More from InfinIT - Innovationsnetværket for it

Erfaringer med-c kurt-noermark
Erfaringer med-c kurt-noermarkErfaringer med-c kurt-noermark
Erfaringer med-c kurt-noermark
InfinIT - Innovationsnetværket for it
 
Object orientering, test driven development og c
Object orientering, test driven development og cObject orientering, test driven development og c
Object orientering, test driven development og c
InfinIT - Innovationsnetværket for it
 
C og c++-jens lund jensen
C og c++-jens lund jensenC og c++-jens lund jensen
C og c++-jens lund jensen
InfinIT - Innovationsnetværket for it
 
201811xx foredrag c_cpp
201811xx foredrag c_cpp201811xx foredrag c_cpp
C som-programmeringssprog-bt
C som-programmeringssprog-btC som-programmeringssprog-bt
C som-programmeringssprog-bt
InfinIT - Innovationsnetværket for it
 
Infinit seminar 060918
Infinit seminar 060918Infinit seminar 060918
DCR solutions
DCR solutionsDCR solutions
Not your grandfathers BPM
Not your grandfathers BPMNot your grandfathers BPM
Not your grandfathers BPM
InfinIT - Innovationsnetværket for it
 
Kmd workzone - an evolutionary approach to revolution
Kmd workzone - an evolutionary approach to revolutionKmd workzone - an evolutionary approach to revolution
Kmd workzone - an evolutionary approach to revolution
InfinIT - Innovationsnetværket for it
 
EcoKnow - oplæg
EcoKnow - oplægEcoKnow - oplæg
Martin Wickins Chatbots i fronten
Martin Wickins Chatbots i frontenMartin Wickins Chatbots i fronten
Martin Wickins Chatbots i fronten
InfinIT - Innovationsnetværket for it
 
Marie Fenger ai kundeservice
Marie Fenger ai kundeserviceMarie Fenger ai kundeservice
Marie Fenger ai kundeservice
InfinIT - Innovationsnetværket for it
 
Mads Kaysen SupWiz
Mads Kaysen SupWizMads Kaysen SupWiz
Leif Howalt NNIT Service Support Center
Leif Howalt NNIT Service Support CenterLeif Howalt NNIT Service Support Center
Leif Howalt NNIT Service Support Center
InfinIT - Innovationsnetværket for it
 
Jan Neerbek NLP og Chatbots
Jan Neerbek NLP og ChatbotsJan Neerbek NLP og Chatbots
Jan Neerbek NLP og Chatbots
InfinIT - Innovationsnetværket for it
 
Anders Soegaard NLP for Customer Support
Anders Soegaard NLP for Customer SupportAnders Soegaard NLP for Customer Support
Anders Soegaard NLP for Customer Support
InfinIT - Innovationsnetværket for it
 
Stephen Alstrup infinit august 2018
Stephen Alstrup infinit august 2018Stephen Alstrup infinit august 2018
Stephen Alstrup infinit august 2018
InfinIT - Innovationsnetværket for it
 
Innovation og værdiskabelse i it-projekter
Innovation og værdiskabelse i it-projekterInnovation og værdiskabelse i it-projekter
Innovation og værdiskabelse i it-projekter
InfinIT - Innovationsnetværket for it
 
Rokoko infin it presentation
Rokoko infin it presentation Rokoko infin it presentation
Rokoko infin it presentation
InfinIT - Innovationsnetværket for it
 
Kenny erleben infinit_workshop
Kenny erleben infinit_workshopKenny erleben infinit_workshop
Kenny erleben infinit_workshop
InfinIT - Innovationsnetværket for it
 

More from InfinIT - Innovationsnetværket for it (20)

Erfaringer med-c kurt-noermark
Erfaringer med-c kurt-noermarkErfaringer med-c kurt-noermark
Erfaringer med-c kurt-noermark
 
Object orientering, test driven development og c
Object orientering, test driven development og cObject orientering, test driven development og c
Object orientering, test driven development og c
 
C og c++-jens lund jensen
C og c++-jens lund jensenC og c++-jens lund jensen
C og c++-jens lund jensen
 
201811xx foredrag c_cpp
201811xx foredrag c_cpp201811xx foredrag c_cpp
201811xx foredrag c_cpp
 
C som-programmeringssprog-bt
C som-programmeringssprog-btC som-programmeringssprog-bt
C som-programmeringssprog-bt
 
Infinit seminar 060918
Infinit seminar 060918Infinit seminar 060918
Infinit seminar 060918
 
DCR solutions
DCR solutionsDCR solutions
DCR solutions
 
Not your grandfathers BPM
Not your grandfathers BPMNot your grandfathers BPM
Not your grandfathers BPM
 
Kmd workzone - an evolutionary approach to revolution
Kmd workzone - an evolutionary approach to revolutionKmd workzone - an evolutionary approach to revolution
Kmd workzone - an evolutionary approach to revolution
 
EcoKnow - oplæg
EcoKnow - oplægEcoKnow - oplæg
EcoKnow - oplæg
 
Martin Wickins Chatbots i fronten
Martin Wickins Chatbots i frontenMartin Wickins Chatbots i fronten
Martin Wickins Chatbots i fronten
 
Marie Fenger ai kundeservice
Marie Fenger ai kundeserviceMarie Fenger ai kundeservice
Marie Fenger ai kundeservice
 
Mads Kaysen SupWiz
Mads Kaysen SupWizMads Kaysen SupWiz
Mads Kaysen SupWiz
 
Leif Howalt NNIT Service Support Center
Leif Howalt NNIT Service Support CenterLeif Howalt NNIT Service Support Center
Leif Howalt NNIT Service Support Center
 
Jan Neerbek NLP og Chatbots
Jan Neerbek NLP og ChatbotsJan Neerbek NLP og Chatbots
Jan Neerbek NLP og Chatbots
 
Anders Soegaard NLP for Customer Support
Anders Soegaard NLP for Customer SupportAnders Soegaard NLP for Customer Support
Anders Soegaard NLP for Customer Support
 
Stephen Alstrup infinit august 2018
Stephen Alstrup infinit august 2018Stephen Alstrup infinit august 2018
Stephen Alstrup infinit august 2018
 
Innovation og værdiskabelse i it-projekter
Innovation og værdiskabelse i it-projekterInnovation og værdiskabelse i it-projekter
Innovation og værdiskabelse i it-projekter
 
Rokoko infin it presentation
Rokoko infin it presentation Rokoko infin it presentation
Rokoko infin it presentation
 
Kenny erleben infinit_workshop
Kenny erleben infinit_workshopKenny erleben infinit_workshop
Kenny erleben infinit_workshop
 

Recently uploaded

Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 

Recently uploaded (20)

Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 

Predictable Java af Anders P Ravn, CISS og Hans Søndergaard, ViaUC

  • 1. Predictable Java • Overview • Implementations • Next steps Infinit Højniveausprog, 19 August 2009 Anders P. Ravn and Hans Søndergaard 1
  • 2. A Real-Time Application • Periodic Event Handlers • Aperiodic Event Handlers collected in a mission • Mission Handler Each handler has a Memory is Scheduled 2
  • 3. Periodic handler class Periodic extends PeriodicEventHandler { protected Periodic(.., PeriodicParameters pp, Scheduler scheduler, MemoryArea memory); public void handleEvent() { // the logic to be executed every period } } 3
  • 4. Aperiodic handler class Aperiodic extends AperiodicEventHandler { protected Aperiodic(.., AperiodicParameters ap, Scheduler scheduler, MemoryArea memory); public void handleEvent() { // the logic to be executed when an event occurs } } 4
  • 5. A simple mission public class Basic extends Mission { protected Basic(.., AperiodicParameters ap, Scheduler scheduler, MemoryArea memoryArea) { ... // initialization } public static void main (String[] args) { new Basic( null, null, new CyclicScheduler(), new LTMemory(10*1024)); } } 5
  • 6. …The mission addToMission( new Periodic( null, pp, getScheduler(), new LTMemory(1024))); addToMission( new Periodic( null, pp, getScheduler(), new LTMemory(1024))); ... add(); // mission to its scheduler 6
  • 7. Complex mission private Mission[] mission; private int active = 0; static AperiodicEvent event; public ThreeSequentialMissions(...) { mission = new Mission[3]; // set up the three missions mission[0] = new Mission(...); // add handlers for mission 0 // including the mission termination ... mission[1] = new Mission(); ... // start the first mission mission[active].add(); event = new AperiodicEvent(this); } 7
  • 8. Changing mission private Mission[] mission; private int active = 0; static AperiodicEvent event; public ThreeSequentialMissions(...) { ... } public void handleEvent() { mission[active].remove(); active = (active + 1) % mission.length; mission[active].add(); } 8
  • 9. Level 0 • only Periodic Event Handlers • cyclic scheduler 9
  • 10. Level 1 SO 3 has the highest priority • periodic and aperiodic event handlers • fixed-priority preemptive scheduler 10
  • 11. Implementations • On top of RTSJ (adapter) • Native implementation using – JamVM – Xenomai/Linux – Mechatronic Brick 11
  • 12. Schedulers • Cyclic scheduler – Only one mission, with periodic handlers – Using cyclic executive model – The Scheduler: a periodic RT_TASK • period = gcd of all the handler periods • Fixed priority pre-emptive scheduler – Missions with periodic and aperiodic handlers – Implemented as RT_TASKs 12
  • 13. Memory • No GC • Two types of memory – Immortal memory = Heap (without GC) • Lifetime = lifetime of the application – Scoped memory • Each handler has its own private memory • Lifetime = lifetime of the handler • Object allocation rewritten in JamVM 13
  • 14. Synchronization • Java’s locking model (synchronization) – does not fit to avoid priority inversion • Xenomai's MUTEX enforce priority inheritance • Rewritten JamVM – synchronized methods in classes for shared objects: • uses MUTEX lock/unlock 14
  • 16. Next steps • Eclipse plugins • Homepage for Predictable Java • Different tools for static analyses • Examples • ... 16
  • 17. References • A predictable Java profile - rationale and implementations Thomas Bøgholm, René R. Hansen, Anders P. Ravn, Bent Thomsen, and Hans Søndergaard JTRES’09. 23-25 September 2009. • Safety-Critical Java JSR 302: Safety Critical Java Technology http://jcp.org/en/jsr/detail?id=302 • Java for Safety-Critical Applications Thomas Henties, James J. Hunt, Doug Locke, Kelvin Nilsen, Martin Schoeberl, Jan Vitek. SafeSert 2009. • Safety Critical Specification for Java Version 0.5. August 2008. Draft. 17