SlideShare a Scribd company logo
1 of 21
Enhancing OSGi
          with real-time Java support

      Pablo Basanta-Val, Marisol García-Valls,
              and Iria Estévez-Ayres
                mailto:pbasanta@it.uc3m.es


†Jornadas de Tiempo Real 2012- Santander (        )
  Acceptado en Software Practice and Experience (SPE)
Outline
• OSGi and RTSJ
  – Motivation and interesting issues
• TROSGi (real-Time foR OSGi)
  – Architecture: L0, L1, L2
  – API
  – Performance results
• Conclusion and ongoing work




                                        2
Context
• Java programmers may use OSGi for
   – Life-cycle management of Java applications
     called bundles
       • start/stop/update bundles
       • export/lookup/unexport bundles/services
         from the framework
       • Runlevels

• Some pieces work has addressed the provision of real-
  time with OSGi
   – [hybrid approaches]
       • Java for soft-real time + C modules for hard real-time
   – [pure Java approaches]
       • Using RTSJ (i.e., The Real-Time Specification for Java)
                                                    JRT-12         3
Some issues in OSGi and RTSJ integration
• Access to real-time Java facilities
   – I.e. RTSJ and/or DRTSJ
• Improving the predictability of the framework
   – Definition of a real-time bundle
       • Real-time characterization
       • Access/modification of the characterization
       • Backward compatibility
   – Predictability in bundle management
       • Execution environment, security, underlying OS
• New real-time services for OSGi
   – New APIs
• Other real-time improvements on exiting services
   – E.g. Real-time framework, real-time HTTP             4
In this work: TROSGi
• Primary goal:
   – Real-time and OSGi integration
• This presentation
   – Introducing the integration framework
     proposed with RTSJ
       • Integration levels, architecture, and AP

• Outcomes,
   – TROSGi=={real-time for OSGi}




                                                    5
TROSGi: Level 0


                  • Minimal access to real-time Java
                    and OSGi
                  • Changes required from the env.:
                     – javax.realtime.
                     – Real-time operating system (if any)
                     – OSGi should export javax.realtime
                     – Bundles should import
                       javax.realtime




                                                      6
TROSGi: Level 0 – Example (1/2)
 00: import javax.realtime.*;
 01: import org.osgi.framework.*;
 02: public class ExampleRT implements BundleActivator{
 03: BundleContext ctx;
 04: RealtimeThread rt;
 05: public void start(BundleContext context) throws Exception {
 06:       rt=new RealtimeThread(){
 07:        public void run(){
 08:         try{
 09:             do{ System.out.println(“RT hello”);
 10:            RealtimeThread.sleep(new AbsoluteTime(10,0)); //mit=10 ms
 11:           }while (true);
 12:          }catch(Exception e){
 13:             System.out.println(“STOP called: bye, bye”);}
 14:       };
 15:       rt.start(); //Launch the real-time thread
 16: }
 17: public void stop(BundleContext context) throws Exception {
 18:       rt.interrupt(); //Launch an exception
 19: }
 20:.}


                        Listing 1. Example of a bundle activator that
                                starts/stops a real-time thread             7
TROSGi: Level 0 – Example (2/2)


00:   Bundle-Name: Hello RT Threads
01:   Bundle-SymbolicName: es.uc3m.it.drequiem.trosgi.Rtthreads
02:   Bundle-Description: A Hello World bundle for RTSJ
03:   Bundle-ManifestVersion: 2
04:   Bundle-Version: 1.0.0
05:   Bundle-Activator: ExampleRT
06:   Import-Package: org.osgi.framework, javax.realtime

                          Listing 2. Bundle descriptor




                                                                  8
TROSGi: Level 1 –
Real-time characterization service
• Goal:
   – Real-time charaterization
• Solution:
   – Stored in the bundle in an xml file
   – Accessed from the bundle using a
     service




  00: <!--Bundle-Name: Hello RT Threads ->
  01: <schedulable name="RTHello">
  02:    <mit>10000</mit>
  03: </schedulable>
                                             9
TROSGi-Level 1: Example and API
  00:   import javax.realtime.*;
  01:   import org.osgi.framework.*;
  02:   import es.uc3m.it.trosgi.*;
  03:   import org.w3c.dom.*;
  04:   public class ExampleRT implements BundleActivator{
  05:   BundleContext ctx;
  06:   RealtimeThread rt;
  07:   int mit=0;
  08:   public void start(BundleContext context) throws Exception {
  09:      rt=new RealtimeThread(){
  10:        public void run(){
  11:      ServiceReference c_rf1= // Ref to the service
  12:        Context.getServiceReference(“CharacterizationService”);
  13:        RealtimeCharacterizationService client1=
  14:     (RealtimeCharacterizationService) context.getService(c_rf1);
  15:        Bundle bundle=context.getBundle();
  16:        Document doc=client1.getRealtimeCharacterization(bundle);
  17:        NodeListlist nlist=doc.getElementsByTagName("mit");



00: import org.osgi.framework.*;
01: public interface RealtimeCharacterizationService
02:                 extends RealTimeService{
03:   public Document
04:          getRealtimeCharacterization(Bundle b);
05:   public boolean setRealtimeCharacterization(
06:                Bundle bnd, Document doc);
07:}
                                         JTR-12                          10
TROSGi: Level 2 –
Real-time characterization service
• Three new services:
   – Admission controlers
       • Based on RTSJ’s model
   – Fault-tolerance
       • Partiatilly taken from DRTSJ
   – Compositor
       • Inspired in iLAND gained
         experience and
       • DRTSJ’s distributable threads




                                        JTR-12   11
TROSGi: Level 2 – API:
  BundleScheduler, BundleRecover,
  BundleCompositor
00:   import org.osgi.framework.*;
01:   import org.w3c.dom.*;
02:   public interface BundleSchedulerService
03:                   extends RealTimeService{
04:      public boolean setIfFeassible(Bundle bnd);
05:      public boolean removeFromScheduler(Bundle bnd);
06:   }

00: import org.osgi.framework.*;
01: public interface BundleRecoverService
03:                 extends RealTimeService{
04:    public boolean addBundle(Bundle bnd);
05:    public boolean removeBundle(Bundle bnd);
}


00: import org.osgi.framework.*;
01: public interface BundleCompositorService
03:                 extends RealTimeService{
03:    public boolean addComposedBundle(Bundle bnd);
04:    public boolean removeComposedBundle(Bundle bnd);
}


                                            JTR-12         12
Level 2: Common Services API
(inspired in RTSJ’s resource model)f

 00:   <!DOCTYPE resourcemodel[
 01:   <!ELEMENT resourcemodel(bundlescheduler|
 02:          bundlerecover|bundlecompositor)
 03:   <!ELEMENT bundlescheduler(schedulable*)>
 04:    <!ELEMENT schedulable (releaseparameters?,scheduling?)>
 05:      <!ATTLIST alt name (#PCDATA)>
 06:      <!ELEMENT releaseparameters (periodic|sporadic
 07:                                  |aperiodic)>
 08:       <!ELEMENT periodic (start?,period?,cost?,deadline?)>
 09:        <!ELEMENT sporadic (start?,mit?,cost?,deadline?)>
 10:        <!ELEMENT aperiodic>
 11:        <!ELEMENT start (#PCDATA)>
 12:        <!ELEMENT period (#PCDATA)>
 13:        <!ELEMENT cost (#PCDATA)>
 14:        <!ELEMENT deadline (#PCDATA)>
 15:        <!ELEMENT mit (#PCDATA)>
 16:   <!ELEMENT scheduling (priority?)>
 17:       <!ELEMENT priority (#PCDATA)>
 18:   <!ELEMENT bundlerecover (policy+)>
 19:   <!ELEMENT policy (mit?, cost?,deadline?,priority?)>
 20:      <!ATTLIST policy name #PCDATA>
 21:   <!ELEMENT bundlecompositor (alt*)>
 22:    <!ELEMENT alt (block+)>
 23:      <!ATTLIST alt type (#PCDATA)>
 24:    <!ELEMENT block (schedulable*)>
 25:   ]>




                                                  JTR-12          13
Implementation
• Prototype:                                                       Characterization     Scheduler
                                                                      Service            Service

   – Oracle’s JTR                             TROSGi
                                              Services                Recovery
                                                                       Service
                                                                                        Compositor
                                                                                         Service
   – Real-time Linux kernel 2.6.28
                                                                                      Real-Time Java

   – Knopflerfish 3.0                                                                    Access


                                              OSGi
                                              (knopflerfish 3.0)


• TROSGi                                      Real-time Java
                                              (1.5.0_20_Java_RTS-2.2.fcs_b19)
   – RUB admission controller
   – Re-starting fault policy                 Real-time operating system
                                              (2.6.28-3-rt)

   – Multi-constrained recovery                    CPU             Memory
     service
                                                                                         Network
                                                (1.5 Ghz)          (5 Gb)


   – 50 kbytes footprint


                                     JTR-12                                                            14
Level 0     and Level 1 results




          JTR-12                  15
Level 2: BundleScheduler results




• Admission control takes reduced amout of time (see 1st
  figure)
   – 1024 tasks in 50 ms
• Most of the time consumed in XML processing (see 2nd
  figure)
                             JTR-12                        16
Level 2: RecoveryService results
                                                               Soft (99%)
                                                  Worst Case
             Approach                                           Case Cost
                                                   Cost (ms)
                                                                      (ms)
Including Installation Cost
(full installation)                                     257           157
Without Installation Cost (start only)                  177           137




                                         JTR-12                              17
Level 2: Bundle
Compositor results


 Much overhead !!!
 - Compared against the
 scheduler service




                          JTR-12   18
Conclusions
• The definition of real-time OSGi is a rather open issue
   – No standard, nor functional solutions


• TROSGi offers a service-based approach for real-time
  integrations
   – Three integration levels : L0, L1, and L2
   – Tested on RTSJ, and validated with simple implementation services




                                  JTR-12                                 19
Ongoing work

• Two main ongoing issues
  – Improving the implementation
     • Use of DRTSJ, new service implementations, real-time
       security
     • New compositor policies
  – Introducing hooks for other languages
     • C and Ada integration




                                                              20
JTR-12   21

More Related Content

What's hot

Slides for a talk on UML Semantics in Nuremberg in 2005
Slides for a talk on UML Semantics in Nuremberg in 2005Slides for a talk on UML Semantics in Nuremberg in 2005
Slides for a talk on UML Semantics in Nuremberg in 2005Alin Stefanescu
 
4th European Lisp Symposium: Jobim: an Actors Library for the Clojure Program...
4th European Lisp Symposium: Jobim: an Actors Library for the Clojure Program...4th European Lisp Symposium: Jobim: an Actors Library for the Clojure Program...
4th European Lisp Symposium: Jobim: an Actors Library for the Clojure Program...Antonio Garrote Hernández
 
Marco Cattaneo "Event data processing in LHCb"
Marco Cattaneo "Event data processing in LHCb"Marco Cattaneo "Event data processing in LHCb"
Marco Cattaneo "Event data processing in LHCb"Yandex
 
Adaptive Linear Solvers and Eigensolvers
Adaptive Linear Solvers and EigensolversAdaptive Linear Solvers and Eigensolvers
Adaptive Linear Solvers and Eigensolversinside-BigData.com
 
java memory management & gc
java memory management & gcjava memory management & gc
java memory management & gcexsuns
 
Using Flame Graphs
Using Flame GraphsUsing Flame Graphs
Using Flame GraphsIsuru Perera
 
A Language Support for Exhaustive Fault-Injection in Message-Passing System M...
A Language Support for Exhaustive Fault-Injection in Message-Passing System M...A Language Support for Exhaustive Fault-Injection in Message-Passing System M...
A Language Support for Exhaustive Fault-Injection in Message-Passing System M...Takuo Watanabe
 
Crossing the border with Qt: the i18n system
Crossing the border with Qt: the i18n systemCrossing the border with Qt: the i18n system
Crossing the border with Qt: the i18n systemDeveler S.r.l.
 
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 SystemJames Gan
 
Clockless design language - ilia greenblat
Clockless design language - ilia greenblatClockless design language - ilia greenblat
Clockless design language - ilia greenblatchiportal
 
The new ehcache 2.0 and hibernate spi
The new ehcache 2.0 and hibernate spiThe new ehcache 2.0 and hibernate spi
The new ehcache 2.0 and hibernate spiCyril Lakech
 
General Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics HardwareGeneral Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics HardwareDaniel Blezek
 
[GEG1] 10.camera-centric engine design for multithreaded rendering
[GEG1] 10.camera-centric engine design for multithreaded rendering[GEG1] 10.camera-centric engine design for multithreaded rendering
[GEG1] 10.camera-centric engine design for multithreaded rendering종빈 오
 

What's hot (20)

Java in flames
Java in flamesJava in flames
Java in flames
 
Qt Quick in depth
Qt Quick in depthQt Quick in depth
Qt Quick in depth
 
Slides for a talk on UML Semantics in Nuremberg in 2005
Slides for a talk on UML Semantics in Nuremberg in 2005Slides for a talk on UML Semantics in Nuremberg in 2005
Slides for a talk on UML Semantics in Nuremberg in 2005
 
4th European Lisp Symposium: Jobim: an Actors Library for the Clojure Program...
4th European Lisp Symposium: Jobim: an Actors Library for the Clojure Program...4th European Lisp Symposium: Jobim: an Actors Library for the Clojure Program...
4th European Lisp Symposium: Jobim: an Actors Library for the Clojure Program...
 
2017 10 17_quantum_program_v2
2017 10 17_quantum_program_v22017 10 17_quantum_program_v2
2017 10 17_quantum_program_v2
 
Marco Cattaneo "Event data processing in LHCb"
Marco Cattaneo "Event data processing in LHCb"Marco Cattaneo "Event data processing in LHCb"
Marco Cattaneo "Event data processing in LHCb"
 
Adaptive Linear Solvers and Eigensolvers
Adaptive Linear Solvers and EigensolversAdaptive Linear Solvers and Eigensolvers
Adaptive Linear Solvers and Eigensolvers
 
java memory management & gc
java memory management & gcjava memory management & gc
java memory management & gc
 
Using Flame Graphs
Using Flame GraphsUsing Flame Graphs
Using Flame Graphs
 
A Language Support for Exhaustive Fault-Injection in Message-Passing System M...
A Language Support for Exhaustive Fault-Injection in Message-Passing System M...A Language Support for Exhaustive Fault-Injection in Message-Passing System M...
A Language Support for Exhaustive Fault-Injection in Message-Passing System M...
 
Crossing the border with Qt: the i18n system
Crossing the border with Qt: the i18n systemCrossing the border with Qt: the i18n system
Crossing the border with Qt: the i18n system
 
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
 
Clockless design language - ilia greenblat
Clockless design language - ilia greenblatClockless design language - ilia greenblat
Clockless design language - ilia greenblat
 
Tr ns802 11
Tr ns802 11Tr ns802 11
Tr ns802 11
 
The new ehcache 2.0 and hibernate spi
The new ehcache 2.0 and hibernate spiThe new ehcache 2.0 and hibernate spi
The new ehcache 2.0 and hibernate spi
 
Ns2
Ns2Ns2
Ns2
 
General Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics HardwareGeneral Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics Hardware
 
Hp rhev-m-driver
Hp rhev-m-driverHp rhev-m-driver
Hp rhev-m-driver
 
[GEG1] 10.camera-centric engine design for multithreaded rendering
[GEG1] 10.camera-centric engine design for multithreaded rendering[GEG1] 10.camera-centric engine design for multithreaded rendering
[GEG1] 10.camera-centric engine design for multithreaded rendering
 
How long can you afford to Stop The World?
How long can you afford to Stop The World?How long can you afford to Stop The World?
How long can you afford to Stop The World?
 

Similar to 2011.jtr.pbasanta.

LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1Hajime Tazaki
 
Towards a garbage collector for distributed real-time Java
Towards a garbage collector for distributed real-time JavaTowards a garbage collector for distributed real-time Java
Towards a garbage collector for distributed real-time JavaUniversidad Carlos III de Madrid
 
Новый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныНовый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныTimur Safin
 
Playing BBR with a userspace network stack
Playing BBR with a userspace network stackPlaying BBR with a userspace network stack
Playing BBR with a userspace network stackHajime Tazaki
 
OpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and KubernetesOpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and KubernetesJinwoong Kim
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitAriya Hidayat
 
IJCER (www.ijceronline.com) International Journal of computational Engineeri...
 IJCER (www.ijceronline.com) International Journal of computational Engineeri... IJCER (www.ijceronline.com) International Journal of computational Engineeri...
IJCER (www.ijceronline.com) International Journal of computational Engineeri...ijceronline
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationBen Hall
 
Project Reactor Now and Tomorrow
Project Reactor Now and TomorrowProject Reactor Now and Tomorrow
Project Reactor Now and TomorrowVMware Tanzu
 
The Ring programming language version 1.9 book - Part 81 of 210
The Ring programming language version 1.9 book - Part 81 of 210The Ring programming language version 1.9 book - Part 81 of 210
The Ring programming language version 1.9 book - Part 81 of 210Mahmoud Samir Fayed
 
Real-time Programming in Java
Real-time Programming in JavaReal-time Programming in Java
Real-time Programming in JavaAleš Plšek
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementationRajan Kumar
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionMiloš Zubal
 
Structured concurrency with Kotlin Coroutines
Structured concurrency with Kotlin CoroutinesStructured concurrency with Kotlin Coroutines
Structured concurrency with Kotlin CoroutinesVadims Savjolovs
 
Microservices and modularity with java
Microservices and modularity with javaMicroservices and modularity with java
Microservices and modularity with javaDPC Consulting Ltd
 
TorqueBox at GNUnify 2012
TorqueBox at GNUnify 2012TorqueBox at GNUnify 2012
TorqueBox at GNUnify 2012Saleem Ansari
 
Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesPhil Estes
 
Event Driven Microservices
Event Driven MicroservicesEvent Driven Microservices
Event Driven MicroservicesFabrizio Fortino
 

Similar to 2011.jtr.pbasanta. (20)

LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1
 
Towards a garbage collector for distributed real-time Java
Towards a garbage collector for distributed real-time JavaTowards a garbage collector for distributed real-time Java
Towards a garbage collector for distributed real-time Java
 
Новый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныНовый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоны
 
Playing BBR with a userspace network stack
Playing BBR with a userspace network stackPlaying BBR with a userspace network stack
Playing BBR with a userspace network stack
 
OpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and KubernetesOpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and Kubernetes
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
 
Grizzly 20080925 V2
Grizzly 20080925 V2Grizzly 20080925 V2
Grizzly 20080925 V2
 
IJCER (www.ijceronline.com) International Journal of computational Engineeri...
 IJCER (www.ijceronline.com) International Journal of computational Engineeri... IJCER (www.ijceronline.com) International Journal of computational Engineeri...
IJCER (www.ijceronline.com) International Journal of computational Engineeri...
 
Postgres clusters
Postgres clustersPostgres clusters
Postgres clusters
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS Application
 
Project Reactor Now and Tomorrow
Project Reactor Now and TomorrowProject Reactor Now and Tomorrow
Project Reactor Now and Tomorrow
 
The Ring programming language version 1.9 book - Part 81 of 210
The Ring programming language version 1.9 book - Part 81 of 210The Ring programming language version 1.9 book - Part 81 of 210
The Ring programming language version 1.9 book - Part 81 of 210
 
Real-time Programming in Java
Real-time Programming in JavaReal-time Programming in Java
Real-time Programming in Java
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementation
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Structured concurrency with Kotlin Coroutines
Structured concurrency with Kotlin CoroutinesStructured concurrency with Kotlin Coroutines
Structured concurrency with Kotlin Coroutines
 
Microservices and modularity with java
Microservices and modularity with javaMicroservices and modularity with java
Microservices and modularity with java
 
TorqueBox at GNUnify 2012
TorqueBox at GNUnify 2012TorqueBox at GNUnify 2012
TorqueBox at GNUnify 2012
 
Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use cases
 
Event Driven Microservices
Event Driven MicroservicesEvent Driven Microservices
Event Driven Microservices
 

More from Universidad Carlos III de Madrid (7)

Tecnicas y extensiones para Java de tiempo real
Tecnicas y extensiones para Java de tiempo realTecnicas y extensiones para Java de tiempo real
Tecnicas y extensiones para Java de tiempo real
 
A simple data muling protocol
A simple data muling protocolA simple data muling protocol
A simple data muling protocol
 
Mejoras a la predictibilidad de la tecnología Java EE
Mejoras a la predictibilidad de la tecnología Java EEMejoras a la predictibilidad de la tecnología Java EE
Mejoras a la predictibilidad de la tecnología Java EE
 
Remote Memory Areas for distributed real-time Java
Remote Memory Areas for distributed real-time JavaRemote Memory Areas for distributed real-time Java
Remote Memory Areas for distributed real-time Java
 
Towards a real-time reconfiguration service for distributed Java
Towards a real-time reconfiguration service for distributed JavaTowards a real-time reconfiguration service for distributed Java
Towards a real-time reconfiguration service for distributed Java
 
Fine
FineFine
Fine
 
Pbasanta@jtres06 extendedportal
Pbasanta@jtres06 extendedportalPbasanta@jtres06 extendedportal
Pbasanta@jtres06 extendedportal
 

Recently uploaded

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesShubhangi Sonawane
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxNikitaBankoti2
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 

2011.jtr.pbasanta.

  • 1. Enhancing OSGi with real-time Java support Pablo Basanta-Val, Marisol García-Valls, and Iria Estévez-Ayres mailto:pbasanta@it.uc3m.es †Jornadas de Tiempo Real 2012- Santander ( ) Acceptado en Software Practice and Experience (SPE)
  • 2. Outline • OSGi and RTSJ – Motivation and interesting issues • TROSGi (real-Time foR OSGi) – Architecture: L0, L1, L2 – API – Performance results • Conclusion and ongoing work 2
  • 3. Context • Java programmers may use OSGi for – Life-cycle management of Java applications called bundles • start/stop/update bundles • export/lookup/unexport bundles/services from the framework • Runlevels • Some pieces work has addressed the provision of real- time with OSGi – [hybrid approaches] • Java for soft-real time + C modules for hard real-time – [pure Java approaches] • Using RTSJ (i.e., The Real-Time Specification for Java) JRT-12 3
  • 4. Some issues in OSGi and RTSJ integration • Access to real-time Java facilities – I.e. RTSJ and/or DRTSJ • Improving the predictability of the framework – Definition of a real-time bundle • Real-time characterization • Access/modification of the characterization • Backward compatibility – Predictability in bundle management • Execution environment, security, underlying OS • New real-time services for OSGi – New APIs • Other real-time improvements on exiting services – E.g. Real-time framework, real-time HTTP 4
  • 5. In this work: TROSGi • Primary goal: – Real-time and OSGi integration • This presentation – Introducing the integration framework proposed with RTSJ • Integration levels, architecture, and AP • Outcomes, – TROSGi=={real-time for OSGi} 5
  • 6. TROSGi: Level 0 • Minimal access to real-time Java and OSGi • Changes required from the env.: – javax.realtime. – Real-time operating system (if any) – OSGi should export javax.realtime – Bundles should import javax.realtime 6
  • 7. TROSGi: Level 0 – Example (1/2) 00: import javax.realtime.*; 01: import org.osgi.framework.*; 02: public class ExampleRT implements BundleActivator{ 03: BundleContext ctx; 04: RealtimeThread rt; 05: public void start(BundleContext context) throws Exception { 06: rt=new RealtimeThread(){ 07: public void run(){ 08: try{ 09: do{ System.out.println(“RT hello”); 10: RealtimeThread.sleep(new AbsoluteTime(10,0)); //mit=10 ms 11: }while (true); 12: }catch(Exception e){ 13: System.out.println(“STOP called: bye, bye”);} 14: }; 15: rt.start(); //Launch the real-time thread 16: } 17: public void stop(BundleContext context) throws Exception { 18: rt.interrupt(); //Launch an exception 19: } 20:.} Listing 1. Example of a bundle activator that starts/stops a real-time thread 7
  • 8. TROSGi: Level 0 – Example (2/2) 00: Bundle-Name: Hello RT Threads 01: Bundle-SymbolicName: es.uc3m.it.drequiem.trosgi.Rtthreads 02: Bundle-Description: A Hello World bundle for RTSJ 03: Bundle-ManifestVersion: 2 04: Bundle-Version: 1.0.0 05: Bundle-Activator: ExampleRT 06: Import-Package: org.osgi.framework, javax.realtime Listing 2. Bundle descriptor 8
  • 9. TROSGi: Level 1 – Real-time characterization service • Goal: – Real-time charaterization • Solution: – Stored in the bundle in an xml file – Accessed from the bundle using a service 00: <!--Bundle-Name: Hello RT Threads -> 01: <schedulable name="RTHello"> 02: <mit>10000</mit> 03: </schedulable> 9
  • 10. TROSGi-Level 1: Example and API 00: import javax.realtime.*; 01: import org.osgi.framework.*; 02: import es.uc3m.it.trosgi.*; 03: import org.w3c.dom.*; 04: public class ExampleRT implements BundleActivator{ 05: BundleContext ctx; 06: RealtimeThread rt; 07: int mit=0; 08: public void start(BundleContext context) throws Exception { 09: rt=new RealtimeThread(){ 10: public void run(){ 11: ServiceReference c_rf1= // Ref to the service 12: Context.getServiceReference(“CharacterizationService”); 13: RealtimeCharacterizationService client1= 14: (RealtimeCharacterizationService) context.getService(c_rf1); 15: Bundle bundle=context.getBundle(); 16: Document doc=client1.getRealtimeCharacterization(bundle); 17: NodeListlist nlist=doc.getElementsByTagName("mit"); 00: import org.osgi.framework.*; 01: public interface RealtimeCharacterizationService 02: extends RealTimeService{ 03: public Document 04: getRealtimeCharacterization(Bundle b); 05: public boolean setRealtimeCharacterization( 06: Bundle bnd, Document doc); 07:} JTR-12 10
  • 11. TROSGi: Level 2 – Real-time characterization service • Three new services: – Admission controlers • Based on RTSJ’s model – Fault-tolerance • Partiatilly taken from DRTSJ – Compositor • Inspired in iLAND gained experience and • DRTSJ’s distributable threads JTR-12 11
  • 12. TROSGi: Level 2 – API: BundleScheduler, BundleRecover, BundleCompositor 00: import org.osgi.framework.*; 01: import org.w3c.dom.*; 02: public interface BundleSchedulerService 03: extends RealTimeService{ 04: public boolean setIfFeassible(Bundle bnd); 05: public boolean removeFromScheduler(Bundle bnd); 06: } 00: import org.osgi.framework.*; 01: public interface BundleRecoverService 03: extends RealTimeService{ 04: public boolean addBundle(Bundle bnd); 05: public boolean removeBundle(Bundle bnd); } 00: import org.osgi.framework.*; 01: public interface BundleCompositorService 03: extends RealTimeService{ 03: public boolean addComposedBundle(Bundle bnd); 04: public boolean removeComposedBundle(Bundle bnd); } JTR-12 12
  • 13. Level 2: Common Services API (inspired in RTSJ’s resource model)f 00: <!DOCTYPE resourcemodel[ 01: <!ELEMENT resourcemodel(bundlescheduler| 02: bundlerecover|bundlecompositor) 03: <!ELEMENT bundlescheduler(schedulable*)> 04: <!ELEMENT schedulable (releaseparameters?,scheduling?)> 05: <!ATTLIST alt name (#PCDATA)> 06: <!ELEMENT releaseparameters (periodic|sporadic 07: |aperiodic)> 08: <!ELEMENT periodic (start?,period?,cost?,deadline?)> 09: <!ELEMENT sporadic (start?,mit?,cost?,deadline?)> 10: <!ELEMENT aperiodic> 11: <!ELEMENT start (#PCDATA)> 12: <!ELEMENT period (#PCDATA)> 13: <!ELEMENT cost (#PCDATA)> 14: <!ELEMENT deadline (#PCDATA)> 15: <!ELEMENT mit (#PCDATA)> 16: <!ELEMENT scheduling (priority?)> 17: <!ELEMENT priority (#PCDATA)> 18: <!ELEMENT bundlerecover (policy+)> 19: <!ELEMENT policy (mit?, cost?,deadline?,priority?)> 20: <!ATTLIST policy name #PCDATA> 21: <!ELEMENT bundlecompositor (alt*)> 22: <!ELEMENT alt (block+)> 23: <!ATTLIST alt type (#PCDATA)> 24: <!ELEMENT block (schedulable*)> 25: ]> JTR-12 13
  • 14. Implementation • Prototype: Characterization Scheduler Service Service – Oracle’s JTR TROSGi Services Recovery Service Compositor Service – Real-time Linux kernel 2.6.28 Real-Time Java – Knopflerfish 3.0 Access OSGi (knopflerfish 3.0) • TROSGi Real-time Java (1.5.0_20_Java_RTS-2.2.fcs_b19) – RUB admission controller – Re-starting fault policy Real-time operating system (2.6.28-3-rt) – Multi-constrained recovery CPU Memory service Network (1.5 Ghz) (5 Gb) – 50 kbytes footprint JTR-12 14
  • 15. Level 0 and Level 1 results JTR-12 15
  • 16. Level 2: BundleScheduler results • Admission control takes reduced amout of time (see 1st figure) – 1024 tasks in 50 ms • Most of the time consumed in XML processing (see 2nd figure) JTR-12 16
  • 17. Level 2: RecoveryService results Soft (99%) Worst Case Approach Case Cost Cost (ms) (ms) Including Installation Cost (full installation) 257 157 Without Installation Cost (start only) 177 137 JTR-12 17
  • 18. Level 2: Bundle Compositor results Much overhead !!! - Compared against the scheduler service JTR-12 18
  • 19. Conclusions • The definition of real-time OSGi is a rather open issue – No standard, nor functional solutions • TROSGi offers a service-based approach for real-time integrations – Three integration levels : L0, L1, and L2 – Tested on RTSJ, and validated with simple implementation services JTR-12 19
  • 20. Ongoing work • Two main ongoing issues – Improving the implementation • Use of DRTSJ, new service implementations, real-time security • New compositor policies – Introducing hooks for other languages • C and Ada integration 20
  • 21. JTR-12 21