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

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

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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
 
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...Miguel Araújo
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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...Enterprise Knowledge
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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 2024Rafal Los
 
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.pptxEarley Information Science
 
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.pdfUK Journal
 
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 AutomationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
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...
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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...
 
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...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
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
 
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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

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