SlideShare a Scribd company logo
1 of 18
Download to read offline
Real-Time Java by Example
Experiences from a 9th Semester Software Project
                    at AAU

  Kasper S. Luckow, Christian Frost, and Casper S. Jensen




                     2. February 2011
                          InfinIT
                             1
Focus of the Project



• Gain knowledge in the area of real-time systems
    • Specifically embedded and safety-critical real-time systems
• Determine how temporal correctness can be ensured
  (schedulability, WCET)
• Determine how Java can be applied to this area
• Conduct a case-study for practical experience




                                2
Java for Real-Time Systems Development


• It would be nice to use Java for real-time systems
  development over languages such as C/C++
    • Increased productivity
    • Reduced risk of errors
    • A more common language for newly educated programmers
• Using Java poses a number of interesting problems
• How can we express the necessary real-time concepts in Java?
• How can we verify properties such as WCET and
  schedulability?




                              3
The Real-Time Specification for Java
                                                At a quick glance

  • Java, in the traditional sense lacks facilities for real-time
    systems
  • The RTSJ is broad, flexible, and contains many details

Facilities and concepts introduced in the RTSJ:
  • Schedulable objects and scheduling.
  • Real-time threads.
  • Asynchronous event handling and timers.
  • Asynchronous transfer of control (ATC).
  • Physical and raw memory access.
  • Time values and clocks.
  • Synchronization and resource sharing.
  • Memory management, scoped and immortal memory.
                                  4
Profiles



• Desire to certify safety-critical systems
• Desire to reduce resource usage for embedded systems
• Profiles are used to reduce complexity of the RTSJ and allow
  for easier analysis

• Ravenscar-Java (RJ)
• Safety-Critical Java (SCJ)
• Predictable Java (PJ)




                                5
Changes to the RTSJ
                                Example from the Ravenscar-Java



    “The key aim of the Ravenscar-Java profile is to develop
    a concurrent Java programming model that supports
    predictable and reliable execution of application
    programs, thus benefiting the construction of modern
    high integrity software”
Changes can be categorised into three areas:
  • Predictability of memory utilisation.
  • Predictability of timing.
  • Predictability of control and data flow.




                                 6
Case - The Mine Pump
                                                                                             Overview


• Classic text-book example of a real-time system
• Pump starts when water level is high
• Pump stops when water level is low
• Pump never runs when methane level is high

                                           Water flow sensor

                                                                    Methane sensor
                                                                    Air flow sensor
                                                                    Carbon monoxide sensor




               High water level detector




               Low water level detector




                                                                7
Modelling the Mine Pump
                                 The LEGO Construction
1    Brick feeder
2    Conveyor belt
3    JOP board
4    High water sensor
5    Low water sensor
6    Mine shaft
7    Water pump
8    Methane sensor
9    Conveyor belt
10   Slide
11   Environment motor
12   Environment motor
                             8
Modelling the Mine Pump
                                                Hardware




  • Java Optimized Processor (JOP) (jopdesign.com)
  • Implemented on a Cyclone EP1C12 FPGA
  • 100MHz processor, 512KB flash, 1MB SRAM
Implementation language: Ravenscar-Java
                              9
Demo of the Mine Pump




  10
Walk-through of the Implementation
                                                      Declaring Tasks


new P e r i o d i c T h r e a d (
    new P r i o r i t y P a r a m e t e r s ( PERIODIC PRIORITY ) ,
    new P e r i o d i c P a r a m e t e r s (
            new A b s o l u t e T i m e ( 0 , 0 ) ,
            new R e l a t i v e T i m e ( PERIODIC PERIOD , 0 ) ) ,
    new W a t e r L e v e l D e t e c t i o n R u n n a b l e ( . . . ) ) ;

new S p o r a d i c W a t e r L e v e l H i g h (
    new P r i o r i t y P a r a m e t e r s ( SPORADIC PRIORITY ) ,
    new S p o r a d i c P a r a m e t e r s (
           new R e l a t i v e T i m e ( SPORADIC PERIOD , 0 ) , 1 ) ,
    waterpumpMotor ) ;


                                     11
Walk-through of the Implementation
                                 Handling the Periodic Event


p u b l i c c l a s s WaterLevelDetectionRunnable implements
{
...
   p u b l i c void run ( ) {
        i f ( highWaterSensor . isWaterLevelReached ( ) ) {
            waterHighEvent.fire();
       }
        e l s e i f ( lowWaterSensor . isNoWaterPresent ( ) ) {
            waterLowEvent . f i r e ( ) ;
       }
   }
}


                            12
Walk-through of the Implementation
                                   Handling the Sporadic Event




public c l a s s SporadicWaterLevelHigh
  extends SporadicEventHandler
{
  p u b l i c void handleAsyncEvent () {
     t h i s . waterpumpMotor . s t a r t ( ) ;
  }
}




                              13
Comparing the Profiles
                                                   Safety Critical Java




addToMission (
    new P e r i o d i c G a s D e t e c t i o n (
        new P r i o r i t y P a r a m e t e r s ( GAS PRIORITY ) ,
        new P e r i o d i c P a r a m e t e r s ( new R e l a t i v e T i m e ( 0 ,
        Scheduler . getDefaultScheduler () ,
        new LTMemory ( 1 0 ∗ 1 0 2 4 ) ,
        gasSensor ,
        waterPumpMotor )
    ));




                                      14
Temporal Correctness


• WCET analysis
    • Can be determined through e.g. measurements, simulation,
      and static analysis
    • In our case safe WCETs are required and tight WCETs are
      desirable
    • Often dependent on the underlying hardware, operating system
      and virtual-machine
    • Predictability is the key!
• Schedulability analysis
    • “Tightness” of schedulability analysis desirable
    • Must take necessary factors into account to ensure the
      schedulability




                               15
Analysing the Program
     WCET Analysis using WCA




16
Analysing the Program
                                           Schedulability Analysis using TIMES




                                                     Idle



                                                            waterLevelChanged==1
                                                            go?

                                            C
                                                WaterDetection




                     C            Low                           C            High
                         SporadicLowWaterLevel                      SporadicHighWaterLevel




                                                C
                                                    Cleanup


                                                            waterLevelChanged:=0




Furthermore schedulability analysis was also conducted using
                                 17
Summary




• The Java language is being adapted for easier analysis
  through profiles
• Tools can help determine properties such as WCET and
  schedulability for the programmer
• Still a lot of limitations regarding the capabilities of these tools




                                18

More Related Content

Viewers also liked

Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 IntroductionDr. Pankaj Zope
 
Real-time Application Monitoring
Real-time Application MonitoringReal-time Application Monitoring
Real-time Application MonitoringAmit Kumar Gupta
 
BE E&TC Embedded System Manual 09 03-2015
BE E&TC Embedded System Manual 09 03-2015BE E&TC Embedded System Manual 09 03-2015
BE E&TC Embedded System Manual 09 03-2015Dr. Pankaj Zope
 
17 Web Performance Metrics You Should Care About
17 Web Performance Metrics You Should Care About17 Web Performance Metrics You Should Care About
17 Web Performance Metrics You Should Care AboutEvgeny Tsarkov
 
Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic conceptsStudent
 
A Near-Real Time Application for Twitter Data Analysis
A Near-Real Time Application for Twitter Data AnalysisA Near-Real Time Application for Twitter Data Analysis
A Near-Real Time Application for Twitter Data AnalysisZina Petrushyna
 
Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming Dr. Pankaj Zope
 
Real-time Web Application with Socket.IO, Node.js, and Redis
Real-time Web Application with Socket.IO, Node.js, and RedisReal-time Web Application with Socket.IO, Node.js, and Redis
Real-time Web Application with Socket.IO, Node.js, and RedisYork Tsai
 
Real time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CSReal time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CSThanveen
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction SetDr. Pankaj Zope
 
REAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMREAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMprakrutijsh
 
Simulation of Z-Source Inverter Fed Three Phase Induction Motor Drive
Simulation of Z-Source Inverter Fed Three Phase Induction Motor DriveSimulation of Z-Source Inverter Fed Three Phase Induction Motor Drive
Simulation of Z-Source Inverter Fed Three Phase Induction Motor DriveIJSRD
 
Unit-I Basic Embedded System Notes
Unit-I Basic Embedded System NotesUnit-I Basic Embedded System Notes
Unit-I Basic Embedded System NotesDr. Pankaj Zope
 
Real Time Data Processing using Spark Streaming | Data Day Texas 2015
Real Time Data Processing using Spark Streaming | Data Day Texas 2015Real Time Data Processing using Spark Streaming | Data Day Texas 2015
Real Time Data Processing using Spark Streaming | Data Day Texas 2015Cloudera, Inc.
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating Systemvivek223
 
Ph.d. thesis modeling and simulation of z source inverter design and its con...
Ph.d. thesis  modeling and simulation of z source inverter design and its con...Ph.d. thesis  modeling and simulation of z source inverter design and its con...
Ph.d. thesis modeling and simulation of z source inverter design and its con...Dr. Pankaj Zope
 

Viewers also liked (20)

Rtai
RtaiRtai
Rtai
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 Introduction
 
Real-time Application Monitoring
Real-time Application MonitoringReal-time Application Monitoring
Real-time Application Monitoring
 
BE E&TC Embedded System Manual 09 03-2015
BE E&TC Embedded System Manual 09 03-2015BE E&TC Embedded System Manual 09 03-2015
BE E&TC Embedded System Manual 09 03-2015
 
Unit I Testing
Unit I TestingUnit I Testing
Unit I Testing
 
Fourier Analysis
Fourier Analysis Fourier Analysis
Fourier Analysis
 
17 Web Performance Metrics You Should Care About
17 Web Performance Metrics You Should Care About17 Web Performance Metrics You Should Care About
17 Web Performance Metrics You Should Care About
 
Spark+flume seattle
Spark+flume seattleSpark+flume seattle
Spark+flume seattle
 
Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic concepts
 
A Near-Real Time Application for Twitter Data Analysis
A Near-Real Time Application for Twitter Data AnalysisA Near-Real Time Application for Twitter Data Analysis
A Near-Real Time Application for Twitter Data Analysis
 
Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming
 
Real-time Web Application with Socket.IO, Node.js, and Redis
Real-time Web Application with Socket.IO, Node.js, and RedisReal-time Web Application with Socket.IO, Node.js, and Redis
Real-time Web Application with Socket.IO, Node.js, and Redis
 
Real time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CSReal time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CS
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 
REAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEMREAL TIME OPERATING SYSTEM
REAL TIME OPERATING SYSTEM
 
Simulation of Z-Source Inverter Fed Three Phase Induction Motor Drive
Simulation of Z-Source Inverter Fed Three Phase Induction Motor DriveSimulation of Z-Source Inverter Fed Three Phase Induction Motor Drive
Simulation of Z-Source Inverter Fed Three Phase Induction Motor Drive
 
Unit-I Basic Embedded System Notes
Unit-I Basic Embedded System NotesUnit-I Basic Embedded System Notes
Unit-I Basic Embedded System Notes
 
Real Time Data Processing using Spark Streaming | Data Day Texas 2015
Real Time Data Processing using Spark Streaming | Data Day Texas 2015Real Time Data Processing using Spark Streaming | Data Day Texas 2015
Real Time Data Processing using Spark Streaming | Data Day Texas 2015
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating System
 
Ph.d. thesis modeling and simulation of z source inverter design and its con...
Ph.d. thesis  modeling and simulation of z source inverter design and its con...Ph.d. thesis  modeling and simulation of z source inverter design and its con...
Ph.d. thesis modeling and simulation of z source inverter design and its con...
 

Similar to Real-Time Java by Example. Experiences from a 9th Semester Software Project at AAU af Kasper S. Luckow, Christian Frost and Casper S. Jensen

Towards "write once - run whenever possible" with Safety Critical Java af Ben...
Towards "write once - run whenever possible" with Safety Critical Java af Ben...Towards "write once - run whenever possible" with Safety Critical Java af Ben...
Towards "write once - run whenever possible" with Safety Critical Java af Ben...InfinIT - Innovationsnetværket for it
 
Performance testing in scope of migration to cloud by Serghei Radov
Performance testing in scope of migration to cloud by Serghei RadovPerformance testing in scope of migration to cloud by Serghei Radov
Performance testing in scope of migration to cloud by Serghei RadovValeriia Maliarenko
 
Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Vinay Kumar
 
Interpreting Performance Test Results
Interpreting Performance Test ResultsInterpreting Performance Test Results
Interpreting Performance Test ResultsEric Proegler
 
PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux Neotys
 
Reactive programming with Pivotal's reactor
Reactive programming with Pivotal's reactorReactive programming with Pivotal's reactor
Reactive programming with Pivotal's reactorVMware Tanzu
 
Compressed hydrogen2011 11_chato
Compressed hydrogen2011 11_chatoCompressed hydrogen2011 11_chato
Compressed hydrogen2011 11_chatoDavid Chato
 
Keynote: Building and Operating A Serverless Streaming Runtime for Apache Bea...
Keynote: Building and Operating A Serverless Streaming Runtime for Apache Bea...Keynote: Building and Operating A Serverless Streaming Runtime for Apache Bea...
Keynote: Building and Operating A Serverless Streaming Runtime for Apache Bea...Flink Forward
 
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...HostedbyConfluent
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examplesPeter Lawrey
 
Migration Spring PetClinic to Quarkus
Migration Spring PetClinic to QuarkusMigration Spring PetClinic to Quarkus
Migration Spring PetClinic to QuarkusJonathan Vila
 
Wat erp ogc_recommendationshyfeatures_v0.0
Wat erp ogc_recommendationshyfeatures_v0.0Wat erp ogc_recommendationshyfeatures_v0.0
Wat erp ogc_recommendationshyfeatures_v0.0InclamSoft
 
CAFE-20160422-Presentacion JPT_Final
CAFE-20160422-Presentacion JPT_FinalCAFE-20160422-Presentacion JPT_Final
CAFE-20160422-Presentacion JPT_FinalJuan Torne
 
CAFE-20160422-Presentacion JPT_Final
CAFE-20160422-Presentacion JPT_FinalCAFE-20160422-Presentacion JPT_Final
CAFE-20160422-Presentacion JPT_FinalJuan Torne
 
OWASP DefectDojo - Open Source Security Sanity
OWASP DefectDojo - Open Source Security SanityOWASP DefectDojo - Open Source Security Sanity
OWASP DefectDojo - Open Source Security SanityMatt Tesauro
 
20160609 nike techtalks reactive applications tools of the trade
20160609 nike techtalks reactive applications   tools of the trade20160609 nike techtalks reactive applications   tools of the trade
20160609 nike techtalks reactive applications tools of the tradeshinolajla
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderIsuru Perera
 

Similar to Real-Time Java by Example. Experiences from a 9th Semester Software Project at AAU af Kasper S. Luckow, Christian Frost and Casper S. Jensen (20)

Towards "write once - run whenever possible" with Safety Critical Java af Ben...
Towards "write once - run whenever possible" with Safety Critical Java af Ben...Towards "write once - run whenever possible" with Safety Critical Java af Ben...
Towards "write once - run whenever possible" with Safety Critical Java af Ben...
 
Værktøjer udviklet på AAU til analyse af SCJ programmer
Værktøjer udviklet på AAU til analyse af SCJ programmerVærktøjer udviklet på AAU til analyse af SCJ programmer
Værktøjer udviklet på AAU til analyse af SCJ programmer
 
Performance testing in scope of migration to cloud by Serghei Radov
Performance testing in scope of migration to cloud by Serghei RadovPerformance testing in scope of migration to cloud by Serghei Radov
Performance testing in scope of migration to cloud by Serghei Radov
 
Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17
 
Interpreting Performance Test Results
Interpreting Performance Test ResultsInterpreting Performance Test Results
Interpreting Performance Test Results
 
PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux
 
Reactive programming with Pivotal's reactor
Reactive programming with Pivotal's reactorReactive programming with Pivotal's reactor
Reactive programming with Pivotal's reactor
 
Compressed hydrogen2011 11_chato
Compressed hydrogen2011 11_chatoCompressed hydrogen2011 11_chato
Compressed hydrogen2011 11_chato
 
Keynote: Building and Operating A Serverless Streaming Runtime for Apache Bea...
Keynote: Building and Operating A Serverless Streaming Runtime for Apache Bea...Keynote: Building and Operating A Serverless Streaming Runtime for Apache Bea...
Keynote: Building and Operating A Serverless Streaming Runtime for Apache Bea...
 
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
Automating Speed: A Proven Approach to Preventing Performance Regressions in ...
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examples
 
Migration Spring PetClinic to Quarkus
Migration Spring PetClinic to QuarkusMigration Spring PetClinic to Quarkus
Migration Spring PetClinic to Quarkus
 
Wat erp ogc_recommendationshyfeatures_v0.0
Wat erp ogc_recommendationshyfeatures_v0.0Wat erp ogc_recommendationshyfeatures_v0.0
Wat erp ogc_recommendationshyfeatures_v0.0
 
CAFE-20160422-Presentacion JPT_Final
CAFE-20160422-Presentacion JPT_FinalCAFE-20160422-Presentacion JPT_Final
CAFE-20160422-Presentacion JPT_Final
 
CAFE-20160422-Presentacion JPT_Final
CAFE-20160422-Presentacion JPT_FinalCAFE-20160422-Presentacion JPT_Final
CAFE-20160422-Presentacion JPT_Final
 
OWASP DefectDojo - Open Source Security Sanity
OWASP DefectDojo - Open Source Security SanityOWASP DefectDojo - Open Source Security Sanity
OWASP DefectDojo - Open Source Security Sanity
 
Qtp basic
Qtp basicQtp basic
Qtp basic
 
Reactive Applications in Java
Reactive Applications in JavaReactive Applications in Java
Reactive Applications in Java
 
20160609 nike techtalks reactive applications tools of the trade
20160609 nike techtalks reactive applications   tools of the trade20160609 nike techtalks reactive applications   tools of the trade
20160609 nike techtalks reactive applications tools of the trade
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight Recorder
 

More from 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
 
Embedded softwaredevelopment hcs
Embedded softwaredevelopment hcsEmbedded softwaredevelopment hcs
Embedded softwaredevelopment hcs
 
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
 

Recently uploaded

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Recently uploaded (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Real-Time Java by Example. Experiences from a 9th Semester Software Project at AAU af Kasper S. Luckow, Christian Frost and Casper S. Jensen

  • 1. Real-Time Java by Example Experiences from a 9th Semester Software Project at AAU Kasper S. Luckow, Christian Frost, and Casper S. Jensen 2. February 2011 InfinIT 1
  • 2. Focus of the Project • Gain knowledge in the area of real-time systems • Specifically embedded and safety-critical real-time systems • Determine how temporal correctness can be ensured (schedulability, WCET) • Determine how Java can be applied to this area • Conduct a case-study for practical experience 2
  • 3. Java for Real-Time Systems Development • It would be nice to use Java for real-time systems development over languages such as C/C++ • Increased productivity • Reduced risk of errors • A more common language for newly educated programmers • Using Java poses a number of interesting problems • How can we express the necessary real-time concepts in Java? • How can we verify properties such as WCET and schedulability? 3
  • 4. The Real-Time Specification for Java At a quick glance • Java, in the traditional sense lacks facilities for real-time systems • The RTSJ is broad, flexible, and contains many details Facilities and concepts introduced in the RTSJ: • Schedulable objects and scheduling. • Real-time threads. • Asynchronous event handling and timers. • Asynchronous transfer of control (ATC). • Physical and raw memory access. • Time values and clocks. • Synchronization and resource sharing. • Memory management, scoped and immortal memory. 4
  • 5. Profiles • Desire to certify safety-critical systems • Desire to reduce resource usage for embedded systems • Profiles are used to reduce complexity of the RTSJ and allow for easier analysis • Ravenscar-Java (RJ) • Safety-Critical Java (SCJ) • Predictable Java (PJ) 5
  • 6. Changes to the RTSJ Example from the Ravenscar-Java “The key aim of the Ravenscar-Java profile is to develop a concurrent Java programming model that supports predictable and reliable execution of application programs, thus benefiting the construction of modern high integrity software” Changes can be categorised into three areas: • Predictability of memory utilisation. • Predictability of timing. • Predictability of control and data flow. 6
  • 7. Case - The Mine Pump Overview • Classic text-book example of a real-time system • Pump starts when water level is high • Pump stops when water level is low • Pump never runs when methane level is high Water flow sensor Methane sensor Air flow sensor Carbon monoxide sensor High water level detector Low water level detector 7
  • 8. Modelling the Mine Pump The LEGO Construction 1 Brick feeder 2 Conveyor belt 3 JOP board 4 High water sensor 5 Low water sensor 6 Mine shaft 7 Water pump 8 Methane sensor 9 Conveyor belt 10 Slide 11 Environment motor 12 Environment motor 8
  • 9. Modelling the Mine Pump Hardware • Java Optimized Processor (JOP) (jopdesign.com) • Implemented on a Cyclone EP1C12 FPGA • 100MHz processor, 512KB flash, 1MB SRAM Implementation language: Ravenscar-Java 9
  • 10. Demo of the Mine Pump 10
  • 11. Walk-through of the Implementation Declaring Tasks new P e r i o d i c T h r e a d ( new P r i o r i t y P a r a m e t e r s ( PERIODIC PRIORITY ) , new P e r i o d i c P a r a m e t e r s ( new A b s o l u t e T i m e ( 0 , 0 ) , new R e l a t i v e T i m e ( PERIODIC PERIOD , 0 ) ) , new W a t e r L e v e l D e t e c t i o n R u n n a b l e ( . . . ) ) ; new S p o r a d i c W a t e r L e v e l H i g h ( new P r i o r i t y P a r a m e t e r s ( SPORADIC PRIORITY ) , new S p o r a d i c P a r a m e t e r s ( new R e l a t i v e T i m e ( SPORADIC PERIOD , 0 ) , 1 ) , waterpumpMotor ) ; 11
  • 12. Walk-through of the Implementation Handling the Periodic Event p u b l i c c l a s s WaterLevelDetectionRunnable implements { ... p u b l i c void run ( ) { i f ( highWaterSensor . isWaterLevelReached ( ) ) { waterHighEvent.fire(); } e l s e i f ( lowWaterSensor . isNoWaterPresent ( ) ) { waterLowEvent . f i r e ( ) ; } } } 12
  • 13. Walk-through of the Implementation Handling the Sporadic Event public c l a s s SporadicWaterLevelHigh extends SporadicEventHandler { p u b l i c void handleAsyncEvent () { t h i s . waterpumpMotor . s t a r t ( ) ; } } 13
  • 14. Comparing the Profiles Safety Critical Java addToMission ( new P e r i o d i c G a s D e t e c t i o n ( new P r i o r i t y P a r a m e t e r s ( GAS PRIORITY ) , new P e r i o d i c P a r a m e t e r s ( new R e l a t i v e T i m e ( 0 , Scheduler . getDefaultScheduler () , new LTMemory ( 1 0 ∗ 1 0 2 4 ) , gasSensor , waterPumpMotor ) )); 14
  • 15. Temporal Correctness • WCET analysis • Can be determined through e.g. measurements, simulation, and static analysis • In our case safe WCETs are required and tight WCETs are desirable • Often dependent on the underlying hardware, operating system and virtual-machine • Predictability is the key! • Schedulability analysis • “Tightness” of schedulability analysis desirable • Must take necessary factors into account to ensure the schedulability 15
  • 16. Analysing the Program WCET Analysis using WCA 16
  • 17. Analysing the Program Schedulability Analysis using TIMES Idle waterLevelChanged==1 go? C WaterDetection C Low C High SporadicLowWaterLevel SporadicHighWaterLevel C Cleanup waterLevelChanged:=0 Furthermore schedulability analysis was also conducted using 17
  • 18. Summary • The Java language is being adapted for easier analysis through profiles • Tools can help determine properties such as WCET and schedulability for the programmer • Still a lot of limitations regarding the capabilities of these tools 18