SlideShare a Scribd company logo
1 of 13
Download to read offline
Developing Safety Critical
                     Applications in Java with
                            oSCJ/L0
    Ales Plsek, Lei Zhao, Veysel H. Sahin, Daniel Tang, Tomas Kalibera, Jan Vitek


                                    www.ovmj.net/oscj


         oSCJ
        Open Safety-Critical Java



Friday, August 20, 2010
oSCJ Overview                                     oSCJ
                                                         Open Safety-Critical Java




    SCJ Library                                  oSCJ    Level 2                     L2 -

                 • Level 0 support                                                   L1 -
                                                         Level 1
    SCJ-compliant VM                                                                 L0 -
                                                         Level 0
                 • RTEMS/LEON3 and x86
                          platforms                                                  oSC
                                                        oSCJ VM                      OS o
    Tools

          • Static Checker for SCJ Annotations                 RTEMS                 RTE
          • Technology Compatibility Kit (TCK)
                                                                                     Xilinx
    Benchmark                                           HARDWARE                     LEO
          • miniCDj benchmark

Friday, August 20, 2010
The Mission Concept
                                                                    current mission

                          setup              initialization           execution                 cleanup        teardown



                          ImmortalMemory                             next mission

                             setup                                     missions                           teardown

                                                              MissionSequencer                 - getNextMission()




                                                M1            ...         Mi             ...        Mn

                                                                                   current

                                                                                   - creates MissionMemory
                          MissionMemory                                            - runs in

                            initialization                            execution                               cleanup

                                                                                               - startAll()
                                                                MissionManager
                                                                                               - waitAll()



                                                       SO1               ... ...             SOn



                                                                                                   - runs in

                                              PrivateMemory                        PrivateMemory
Friday, August 20, 2010
Memory Model

                                     Private
                                    Memory 3
         enterPrivate
                                                             executeInArea()
          Memory()
                                     Private
                                    Memory 2
         enterPrivate
          Memory()
                                     Private
                                    Memory 1
                                                  enter()
                          Mission       Mission
                          Memory        Object     PEH 1        PEH 2
  enter()

                                           Immortal Memory
Friday, August 20, 2010
Compliance Levels
        Level 0

             • Only Periodic Event Handlers, single mission, single threaded
             • Frame-based cyclic-execution model
             • No synchronization support required

                          PEH 1   Frame   PEH 2          PEH 1     Frame       PEH 2



        Level 1

            • Aperiodic Event Handlers, fixed-priority preemptive scheduler
        Level 2

             • Sub-missions, ManagedThreads


Friday, August 20, 2010
oSCJ library	

     oSCJ library

                • focused on SCJ Level 0
                                           interface VM_Interface {
                                              Opaque makeExplicitArea (long size);
                                              Opaque makeArea (MemoryArea ma, long size);
                                              Opaque setCurrentArea(Opaque scope);
                                              Opaque getCurrentArea( );
                                              ...
     VM Interface

         • a dedicated interface for           Opaque getCurrentTime{};
            communication with the VM          long getClockResolution();

                                               ...

                                               int delayCurrentThreadAbsolute(long nanos);
                                           }

Friday, August 20, 2010
SCJ VM Design
   • based on Ovm
      • a metacircular Virtual Machine
      • similarly as J9, FijiVM, Squawk VM, etc.        Java Class Library

                                                    Loader               Java code

   • a small C loader is responsible for loading    Verifier       Transformer
      the boot image at runtime.
                                                   Memory            Thread
      • Java code compiled down to C               Manager          Scheduler

                                                              Compiler
   • supported platforms : RTEMS/LEON3,
      x86
                                                   Device Driver Architecture

                                                   I/O Library     Native Code
                                                                            C code
Friday, August 20, 2010
Memory Model Implementation


                                          top level


                                         BS level           BS level


             IM           M1   P1   P2      P3         P1    P2




                                         scope level
Friday, August 20, 2010
Optimizations


     Synchronization Support                Java Object Model

             • Level 0 - single threaded                BluePrint
                                                       Hash-Code
                                                         Monitor
     Primordial Thread                                   GC info
           • modified to be RealtimeThread                 DATA


                                            SCJ Object Model
      Object Model
                                                        BluePrint
         • optimized fields                               Monitor

         • hash-code, GC information                      DATA



Friday, August 20, 2010
Evaluation

     • CDx Benchmark
           • miniCDj - periodic real-time task


     • Platform
       • Xilinx FPGA GR-XC3S-1500 development board
       • LEON3 40 MHz, 8MB flash PROM, 64MB SDRAM, no FPU
       • RTEMS 4.9 OS



     • SCJ configuration
        • no scope checks, miniCDj statically analyzed by SCJ Checker
Friday, August 20, 2010
Results - LEON3 board
                                                                             miniCDj worst case
  Iteration Execution Time




                                                                                        miniCDj
        in Milliseconds




                                                         CDc
                                        CDc worst case
                                                               # Iteration      Results Summary
                  Workload:
                             6 planes                                                        avg   max
                             120 milliseconds                                     CDc       52.8   67.9
                             period
                                                                                miniCDj     69.6   91.2
                             10 000 iterations
                                                                               Overhead:    31%    34%
Friday, August 20, 2010
Results - x86
                                                                   CDc worst case      miniCDj worst case
Iteration Execution Time




                                                                     CDc
      in Milliseconds




                                                 miniCDj


                                                     # Iteration
                                                                     Results Summary
                           Workload:                                                      avg       max
                             60 planes
                             120 milliseconds                                CDc         0.39       0.47
                             period
                                                                            miniCDj      0.34       0.49
                             10 000 iterations
                                                                           Overhead:    -15%       4%
Friday, August 20, 2010
Conclusion
              Implementation Summary

              • SCJ library - 3 months
              • SCJ VM
                 • Memory model - 3 weeks
                 • VM Optimizations - 2 weeks
                 • porting VM to RTEMS - 2 months

           oSCJ Distribution

              • library, VM, tools and benchmark
              • open-source at www.ovmj.net/oscj

                                                    oSCJ
                                                    Open Safety-Critical Java


Friday, August 20, 2010

More Related Content

Viewers also liked (10)

balashsa
balashsabalashsa
balashsa
 
Transfermation
TransfermationTransfermation
Transfermation
 
搜索 VS 查询
搜索 VS 查询搜索 VS 查询
搜索 VS 查询
 
Jtres checker
Jtres checkerJtres checker
Jtres checker
 
Business Golf Challenge 2012
Business Golf Challenge 2012Business Golf Challenge 2012
Business Golf Challenge 2012
 
Crash presentation for class
Crash presentation for classCrash presentation for class
Crash presentation for class
 
People On The Move
People On The MovePeople On The Move
People On The Move
 
Sumer
SumerSumer
Sumer
 
The World of Google: US Vs. Europe
The World of Google: US Vs. EuropeThe World of Google: US Vs. Europe
The World of Google: US Vs. Europe
 
Beyond 10 Blue Links: The Future of Ranking
Beyond 10 Blue Links: The Future of RankingBeyond 10 Blue Links: The Future of Ranking
Beyond 10 Blue Links: The Future of Ranking
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

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
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

oSCJ : Safety Critical Java Virtual Machine Development

  • 1. Developing Safety Critical Applications in Java with oSCJ/L0 Ales Plsek, Lei Zhao, Veysel H. Sahin, Daniel Tang, Tomas Kalibera, Jan Vitek www.ovmj.net/oscj oSCJ Open Safety-Critical Java Friday, August 20, 2010
  • 2. oSCJ Overview oSCJ Open Safety-Critical Java SCJ Library oSCJ Level 2 L2 - • Level 0 support L1 - Level 1 SCJ-compliant VM L0 - Level 0 • RTEMS/LEON3 and x86 platforms oSC oSCJ VM OS o Tools • Static Checker for SCJ Annotations RTEMS RTE • Technology Compatibility Kit (TCK) Xilinx Benchmark HARDWARE LEO • miniCDj benchmark Friday, August 20, 2010
  • 3. The Mission Concept current mission setup initialization execution cleanup teardown ImmortalMemory next mission setup missions teardown MissionSequencer - getNextMission() M1 ... Mi ... Mn current - creates MissionMemory MissionMemory - runs in initialization execution cleanup - startAll() MissionManager - waitAll() SO1 ... ... SOn - runs in PrivateMemory PrivateMemory Friday, August 20, 2010
  • 4. Memory Model Private Memory 3 enterPrivate executeInArea() Memory() Private Memory 2 enterPrivate Memory() Private Memory 1 enter() Mission Mission Memory Object PEH 1 PEH 2 enter() Immortal Memory Friday, August 20, 2010
  • 5. Compliance Levels Level 0 • Only Periodic Event Handlers, single mission, single threaded • Frame-based cyclic-execution model • No synchronization support required PEH 1 Frame PEH 2 PEH 1 Frame PEH 2 Level 1 • Aperiodic Event Handlers, fixed-priority preemptive scheduler Level 2 • Sub-missions, ManagedThreads Friday, August 20, 2010
  • 6. oSCJ library oSCJ library • focused on SCJ Level 0 interface VM_Interface { Opaque makeExplicitArea (long size); Opaque makeArea (MemoryArea ma, long size); Opaque setCurrentArea(Opaque scope); Opaque getCurrentArea( ); ... VM Interface • a dedicated interface for Opaque getCurrentTime{}; communication with the VM long getClockResolution(); ... int delayCurrentThreadAbsolute(long nanos); } Friday, August 20, 2010
  • 7. SCJ VM Design • based on Ovm • a metacircular Virtual Machine • similarly as J9, FijiVM, Squawk VM, etc. Java Class Library Loader Java code • a small C loader is responsible for loading Verifier Transformer the boot image at runtime. Memory Thread • Java code compiled down to C Manager Scheduler Compiler • supported platforms : RTEMS/LEON3, x86 Device Driver Architecture I/O Library Native Code C code Friday, August 20, 2010
  • 8. Memory Model Implementation top level BS level BS level IM M1 P1 P2 P3 P1 P2 scope level Friday, August 20, 2010
  • 9. Optimizations Synchronization Support Java Object Model • Level 0 - single threaded BluePrint Hash-Code Monitor Primordial Thread GC info • modified to be RealtimeThread DATA SCJ Object Model Object Model BluePrint • optimized fields Monitor • hash-code, GC information DATA Friday, August 20, 2010
  • 10. Evaluation • CDx Benchmark • miniCDj - periodic real-time task • Platform • Xilinx FPGA GR-XC3S-1500 development board • LEON3 40 MHz, 8MB flash PROM, 64MB SDRAM, no FPU • RTEMS 4.9 OS • SCJ configuration • no scope checks, miniCDj statically analyzed by SCJ Checker Friday, August 20, 2010
  • 11. Results - LEON3 board miniCDj worst case Iteration Execution Time miniCDj in Milliseconds CDc CDc worst case # Iteration Results Summary Workload: 6 planes avg max 120 milliseconds CDc 52.8 67.9 period miniCDj 69.6 91.2 10 000 iterations Overhead: 31% 34% Friday, August 20, 2010
  • 12. Results - x86 CDc worst case miniCDj worst case Iteration Execution Time CDc in Milliseconds miniCDj # Iteration Results Summary Workload: avg max 60 planes 120 milliseconds CDc 0.39 0.47 period miniCDj 0.34 0.49 10 000 iterations Overhead: -15% 4% Friday, August 20, 2010
  • 13. Conclusion Implementation Summary • SCJ library - 3 months • SCJ VM • Memory model - 3 weeks • VM Optimizations - 2 weeks • porting VM to RTEMS - 2 months oSCJ Distribution • library, VM, tools and benchmark • open-source at www.ovmj.net/oscj oSCJ Open Safety-Critical Java Friday, August 20, 2010