SlideShare une entreprise Scribd logo
1  sur  20
No Heap Remote Objects for Distributed
Real-Time Java

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


†Jornadas de Tiempo Real 2011- Madrid(     )
  Publicado en ACM Transactions On Embedded Systems
Outline
• Context and Motivation
• No-Heap Remote Objects
  – Basic Model
     • Programming model
     • Example
     • Performance
  – Extended Model
     • Programming patterns
     • Extended model
     • Performance
• Conclusion and ongoing work
                                2
Memory management for real-
time Java
• Techniques used for memory management in real-time Java
  (RTSJ)
   – Auto-managed memory (object pools)
   – Garbage collection (and its RT* variants)
   – Regions (ScopedMemory)
• Memory management issues in distributed real-time Java
  (DRTSJ)
   – Real-time garbage collection
   – Distributed Garbage Collection
   – Regions
• Current garbage collectors may be not enough for
  distributed real-time applications
   – E.g. a heap with 1Gb may introduce a 30 seconds delay
                                  JRT-11                     3
State of the art
Denomination       Technologies   Goals
                     RT- CORBA+    Implementation of RT-CORBA with RTSJ
 RTZen
                     RTSJ
 DRTSJ               RMI+RTSJ       A specification for distributed real-time Java

 RT-RMI-York         RMI+RTSJ       A framework for distributed real-time Java.

 RT-RMI-UPM          RMI+RTSJ       Profiles for distributed real-time Java

 DRTJava-on-CSP      CSP+Java       Produce an alternative based on CSP formalisms

 RTJ-COM             RTSJ           A component framework for embedded Java

 Scratchpad          RTSJ           A no-heap component model for real-time Java
                                    A distributed real-time object-oriented platform
 APICOM              RTSJ +CAN


• There is not a simple technique to remove the GC’s from the
  server side !!!
    •    RTZen hybrid approach,
    •    DRTSJ , RTRMI-York, RTRMI-UPM take non-heap as a requirement
                                    JRT-11                                             4
RTSJ region-based memory model

 • Three types of memory areas       :O1=new Object
   – Heap
   – Immortal Memory (I)
   – Scoped Memory (Sx)
                                                O1
 • A selector mechanism               Sa
                                                         1
   – One scope stack per thread
   – Enter, executeInArea             Sb
                                                O2
                                                         1
 • Destruction mechanism              I
   – Stack discipline (counter)
 • Safety mechanism                        Scope Stack

   – Assignment rule
   – Single parent rule           Forbidden assignment
                                  Default allocation
                                                  5
                                  context
Calculator()   Calculator()


NhRo: memory model
                                                    lastInteger    lastInteger


                                                    add()          add()
                                                    lastResult()   lastResult()
                                                    doNothing()    doNothing()


• Fragmented memory model
   – Creation Context
      • Represents the state of the remote object
   – Invocation Context
      • Objects created during remote invocation
• Safe nesting of contexts
   – NhRo-rule: references from creation to invocation are
     forbidden
   – References from invocation to creation are allowed



                                                                           6
NhRo:
Example




          JRT-11   7
NhRo: Impact on the middleware
Scoped or Immortal




                     CalculatorImpl_Stub                          CalculatorImpl
                                                                      lastInteger
                             add()                                       add()
                          lastResult()                               lastResult()
                         doNothing()                                doNothing()                                                   Programmer
                                                                                                                                  Layer


                                                             ObjId Ref CC




                                                                                                             Invocation max
                                                                                          Invocation 1
                                                             CalcID
 Immortal memory




                                                                                                         0


                                                                                                                              0
                                                             Remote Object Table Thread   Memory Area
                                                                                 Pool     Pool        Middleware
                                                                                                                                  Layer


                                                 JRMP/IIOP
                                     Transport               Transport

                                                                                                                                  RTSJ
                                                                                                                                  Virtual
                                                                                                                                  Machine
                     Client                                                  Server
                                                                                                                                            8
NhRo in action
                                                            Calculator()      Creation Context
                                                            lastInteger
                                                                              (Immortal Memory)
                                                            add()
                                                            lastResult()        Invoc. Context
                                                            doNothing()
                                                                                (LTMemory)


                                                      CalcID   Ref




                                                  OBJId Table


                                              enter

                                                        0      0     1
                                                                     0

                                    Thread        Memory Area                            objID a      b
                                    pool          pool


                                                                                         meth tmp ser
                                                                                                      1
                                      Transport
CalcID.add(DataInt(3),DataInt(4))                                                      Middleware
                                                                           Program
          DataInt(7)                                                       created     created
                                                                           object      object     9
NhRo vs. traditional
                                                    GC’d remote objects

                               Garbage collector RTSJ-RI          Memory area pool                                         Garbage collector RTSJ-RI          Memory area pool
                      8
                                                                                                                16
                      7
                                                                                                                14
                      6
Consummed time (ms)




                                                                                                                12




                                                                                          Consummed time (ms)
                      5
                                                                                                                10
                      4
                                                                                                                8
                      3
                                                                                                                6
                      2                                                                                         4
                      1                                                                                         2
                      0                                                                                         0
                          1   21      41       61          81   101   121      141
                                                                                                                     752




                                                                                                                              1286




                                                                                                                                            1910




                                                                                                                                                       2534




                                                                                                                                                                    3158
                                                                                 sample
                                                                                                                                                                 Alive memory (kB)




                                                                                     JRT-11                                                                                 10
Enhancements to the basic NhRo
model
• Patterns for programming with NhRos
• NhRo stored in scoped memory
  – Scope stack characterization
  – Changes in the middleware
  – Policies for the memory are pool
• Performance issues
  – Dependency on data transmitted


                        JRT-11          11
Calculator()



NhRo: constraints (I)
                                                lastInteger


                                                add()
                                                lastResult()
                                                doNothing()



• NhRo-rule limitations
  – Objects is creation context are destroyed after
    remote invocation by default


• Two patterns to avoid the problem
  – Copy pattern
  – Extended portals



                                                          12
NhRo: Scope Stack at the server




                                                                                          Invocation
                                                                                          context
 :RO1=new RemoteObject                                          Sinv1   a b
                                                 Handler                       1
                                                 Thread
        Sa   RO1                                                Sa      RO1




                                                                                        Creation context
                              Creation context
                        1                                                      1

        Sb                                                      Sb             1
                        1

        I                                                       I

 Scope Stack                                               Scope Stack
 (during remote object creation)                           (during remote invocation)


   •   Creation context: state of the remote object
   •   Invocation context: parameters of remote invocation                                                 13
Decoupling middleware
implemenation from NhRos




              JRT-11       14
Invocationnumber


Memory Area Pool




                                                                       Invocationsize
                                                    0       0     0

                                            Memory Area
• It stores LTMemory instances only         Pool



• It requires two configuration parameters
   – Number of instances in the pool
   – Memory associated to each invocation context

• Auto-collection
   – Invocation context returns automatically to its pool when
     they are not used
      • Internal counter 1→0
      • Avoids memory area leakage



                                                                      15
bytes




                            5000




                        0
                                         10000
                                                                         15000
                                                                                     20000
                                                                                             25000
                                                                                                     30000
                void
            boolean
                byte
                char
               short
                  int
                long
                float
             double
                 null
                Byte
               Short
             Integer
               Long
               Float
             Double
          Character




X
            Boolean
    RtUnRemOb
             String()




JRT-11
          String(10)
                                                                                                             and LTMemory size




          String(25)
          String(50)
         String(100)
           Object[0]
         Object[10D]
         Object[25D]
         Object[50D]
    Object[100D]
           Vector(0)
     Vector(10D)
     Vector(25D)
     Vector(50D)
    Vector(100D)
                                                                                                             Remove invocation parameters




                                   X echo(X)
                                                 X doNothing()
                                                                 void doNothing(X)




16
NhRos vs. (RT*) Garbage Collectors [new]




                  JRT-11               17
Conclusions
• This work has introduced a model able to remove
  the garbage collection from the end-to-end path
   – NhRo model
• Empirical results showed:
   – Its implementation in basic environments is simple
   – The performance patterns offered are powerful




                             JRT-11                       18
Ongoing Work-
• To produce an analytic model for the NhRo
   – Use of heap, and different threads
   – Identification of useful combinations
• Analyze the parentage-rules proposed by Higuera-
  Toledano and integrate them with NhRos
   – A more restricted model




                               JRT-11                19
JRT-11   20

Contenu connexe

Tendances

Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunningguest1f2740
 
Let's talk about Garbage Collection
Let's talk about Garbage CollectionLet's talk about Garbage Collection
Let's talk about Garbage CollectionHaim Yadid
 
[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종빈 오
 
General Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics HardwareGeneral Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics HardwareDaniel Blezek
 
Deuce STM - CMP'09
Deuce STM - CMP'09Deuce STM - CMP'09
Deuce STM - CMP'09Guy Korland
 
Java Performance Tuning
Java Performance TuningJava Performance Tuning
Java Performance TuningMinh Hoang
 
Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...
Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...
Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...Takuo Watanabe
 
Seeing with Python presented at PyCon AU 2014
Seeing with Python presented at PyCon AU 2014Seeing with Python presented at PyCon AU 2014
Seeing with Python presented at PyCon AU 2014Mark Rees
 
java memory management & gc
java memory management & gcjava memory management & gc
java memory management & gcexsuns
 
Qt everywhere a c++ abstraction platform
Qt everywhere   a c++ abstraction platformQt everywhere   a c++ abstraction platform
Qt everywhere a c++ abstraction platformDeveler S.r.l.
 
Using Flame Graphs
Using Flame GraphsUsing Flame Graphs
Using Flame GraphsIsuru Perera
 
Clockless design language - ilia greenblat
Clockless design language - ilia greenblatClockless design language - ilia greenblat
Clockless design language - ilia greenblatchiportal
 
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
 
An Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in JavaAn Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in JavaAbhishek Asthana
 
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
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Marcos García
 
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
 

Tendances (20)

Jvm Performance Tunning
Jvm Performance TunningJvm Performance Tunning
Jvm Performance Tunning
 
Let's talk about Garbage Collection
Let's talk about Garbage CollectionLet's talk about Garbage Collection
Let's talk about Garbage Collection
 
[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
 
General Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics HardwareGeneral Purpose Computing using Graphics Hardware
General Purpose Computing using Graphics Hardware
 
Java in flames
Java in flamesJava in flames
Java in flames
 
Deuce STM - CMP'09
Deuce STM - CMP'09Deuce STM - CMP'09
Deuce STM - CMP'09
 
Java Performance Tuning
Java Performance TuningJava Performance Tuning
Java Performance Tuning
 
Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...
Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...
Towards an Integration of the Actor Model in an FRP Language for Small-Scale ...
 
Seeing with Python presented at PyCon AU 2014
Seeing with Python presented at PyCon AU 2014Seeing with Python presented at PyCon AU 2014
Seeing with Python presented at PyCon AU 2014
 
java memory management & gc
java memory management & gcjava memory management & gc
java memory management & gc
 
Qt everywhere a c++ abstraction platform
Qt everywhere   a c++ abstraction platformQt everywhere   a c++ abstraction platform
Qt everywhere a c++ abstraction platform
 
Using Flame Graphs
Using Flame GraphsUsing Flame Graphs
Using Flame Graphs
 
Clockless design language - ilia greenblat
Clockless design language - ilia greenblatClockless design language - ilia greenblat
Clockless design language - ilia greenblat
 
Qt Quick in depth
Qt Quick in depthQt Quick in depth
Qt Quick in depth
 
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"
 
An Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in JavaAn Introduction to JVM Internals and Garbage Collection in Java
An Introduction to JVM Internals and Garbage Collection in Java
 
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...
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)
 
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
 

Similaire à No Heap Remote Objects for Distributed real-time Java

What is new and cool j2se & java
What is new and cool j2se & javaWhat is new and cool j2se & java
What is new and cool j2se & javaEugene Bogaart
 
Stefano Giordano
Stefano GiordanoStefano Giordano
Stefano GiordanoGoWireless
 
Stefano Giordano
Stefano  GiordanoStefano  Giordano
Stefano GiordanoGoWireless
 
Porting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustPorting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustEvan Chan
 
MARC ONERA Toulouse2012 Altreonic
MARC ONERA Toulouse2012 AltreonicMARC ONERA Toulouse2012 Altreonic
MARC ONERA Toulouse2012 AltreonicEric Verhulst
 
Haskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHCHaskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHCdterei
 
XS Boston 2008 Paravirt Ops in Linux IA64
XS Boston 2008 Paravirt Ops in Linux IA64XS Boston 2008 Paravirt Ops in Linux IA64
XS Boston 2008 Paravirt Ops in Linux IA64The Linux Foundation
 
The Visualization Toolkit (VTK) and why you might care about it
The Visualization Toolkit (VTK) and why you might care about itThe Visualization Toolkit (VTK) and why you might care about it
The Visualization Toolkit (VTK) and why you might care about itJiahao Chen
 
Windows Azure Interoperability
Windows Azure InteroperabilityWindows Azure Interoperability
Windows Azure InteroperabilityMihai Dan Nadas
 
State of the art: Server-Side JavaScript (ParisJS)
State of the art: Server-Side JavaScript  (ParisJS)State of the art: Server-Side JavaScript  (ParisJS)
State of the art: Server-Side JavaScript (ParisJS)Alexandre Morgaut
 
An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011
An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011
An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011Shinya Takamaeda-Y
 
ScalableCore System: A Scalable Many-core Simulator by Employing Over 100 FPGAs
ScalableCore System: A Scalable Many-core Simulator by Employing Over 100 FPGAsScalableCore System: A Scalable Many-core Simulator by Employing Over 100 FPGAs
ScalableCore System: A Scalable Many-core Simulator by Employing Over 100 FPGAsShinya Takamaeda-Y
 
2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven ProgrammingLin Jen-Shin
 
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...Alexandre Morgaut
 
Open Safety-Critical Java
Open Safety-Critical JavaOpen Safety-Critical Java
Open Safety-Critical JavaAleš Plšek
 
Android RenderScript on LLVM
Android RenderScript on LLVMAndroid RenderScript on LLVM
Android RenderScript on LLVMJohn Lee
 
Evented Ruby VS Node.js
Evented Ruby VS Node.jsEvented Ruby VS Node.js
Evented Ruby VS Node.jsNitin Gupta
 

Similaire à No Heap Remote Objects for Distributed real-time Java (20)

What is new and cool j2se & java
What is new and cool j2se & javaWhat is new and cool j2se & java
What is new and cool j2se & java
 
Stefano Giordano
Stefano GiordanoStefano Giordano
Stefano Giordano
 
Stefano Giordano
Stefano  GiordanoStefano  Giordano
Stefano Giordano
 
Porting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to RustPorting a Streaming Pipeline from Scala to Rust
Porting a Streaming Pipeline from Scala to Rust
 
MARC ONERA Toulouse2012 Altreonic
MARC ONERA Toulouse2012 AltreonicMARC ONERA Toulouse2012 Altreonic
MARC ONERA Toulouse2012 Altreonic
 
Haskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHCHaskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHC
 
XS Boston 2008 Paravirt Ops in Linux IA64
XS Boston 2008 Paravirt Ops in Linux IA64XS Boston 2008 Paravirt Ops in Linux IA64
XS Boston 2008 Paravirt Ops in Linux IA64
 
The Visualization Toolkit (VTK) and why you might care about it
The Visualization Toolkit (VTK) and why you might care about itThe Visualization Toolkit (VTK) and why you might care about it
The Visualization Toolkit (VTK) and why you might care about it
 
Windows Azure Interoperability
Windows Azure InteroperabilityWindows Azure Interoperability
Windows Azure Interoperability
 
State of the art: Server-Side JavaScript (ParisJS)
State of the art: Server-Side JavaScript  (ParisJS)State of the art: Server-Side JavaScript  (ParisJS)
State of the art: Server-Side JavaScript (ParisJS)
 
Intro to Cloudstack
Intro to CloudstackIntro to Cloudstack
Intro to Cloudstack
 
An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011
An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011
An FPGA-based Scalable Simulation Accelerator for Tile Architectures @HEART2011
 
ScalableCore System: A Scalable Many-core Simulator by Employing Over 100 FPGAs
ScalableCore System: A Scalable Many-core Simulator by Employing Over 100 FPGAsScalableCore System: A Scalable Many-core Simulator by Employing Over 100 FPGAs
ScalableCore System: A Scalable Many-core Simulator by Employing Over 100 FPGAs
 
2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming2010-02-09 Reactor Pattern & Event Driven Programming
2010-02-09 Reactor Pattern & Event Driven Programming
 
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
 
2012 11 Openstack China
2012 11 Openstack China2012 11 Openstack China
2012 11 Openstack China
 
Open Safety-Critical Java
Open Safety-Critical JavaOpen Safety-Critical Java
Open Safety-Critical Java
 
XS Japan 2008 Xen Mgmt English
XS Japan 2008 Xen Mgmt EnglishXS Japan 2008 Xen Mgmt English
XS Japan 2008 Xen Mgmt English
 
Android RenderScript on LLVM
Android RenderScript on LLVMAndroid RenderScript on LLVM
Android RenderScript on LLVM
 
Evented Ruby VS Node.js
Evented Ruby VS Node.jsEvented Ruby VS Node.js
Evented Ruby VS Node.js
 

Plus de Universidad Carlos III de Madrid (8)

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
 
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
 
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
 

Dernier

ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 

Dernier (20)

ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 

No Heap Remote Objects for Distributed real-time Java

  • 1. No Heap Remote Objects for Distributed Real-Time Java Pablo Basanta-Val, Marisol García-Valls, and Iria Estévez-Ayres mailto:pbasanta@it.uc3m.es †Jornadas de Tiempo Real 2011- Madrid( ) Publicado en ACM Transactions On Embedded Systems
  • 2. Outline • Context and Motivation • No-Heap Remote Objects – Basic Model • Programming model • Example • Performance – Extended Model • Programming patterns • Extended model • Performance • Conclusion and ongoing work 2
  • 3. Memory management for real- time Java • Techniques used for memory management in real-time Java (RTSJ) – Auto-managed memory (object pools) – Garbage collection (and its RT* variants) – Regions (ScopedMemory) • Memory management issues in distributed real-time Java (DRTSJ) – Real-time garbage collection – Distributed Garbage Collection – Regions • Current garbage collectors may be not enough for distributed real-time applications – E.g. a heap with 1Gb may introduce a 30 seconds delay JRT-11 3
  • 4. State of the art Denomination Technologies Goals RT- CORBA+ Implementation of RT-CORBA with RTSJ RTZen RTSJ DRTSJ RMI+RTSJ A specification for distributed real-time Java RT-RMI-York RMI+RTSJ A framework for distributed real-time Java. RT-RMI-UPM RMI+RTSJ Profiles for distributed real-time Java DRTJava-on-CSP CSP+Java Produce an alternative based on CSP formalisms RTJ-COM RTSJ A component framework for embedded Java Scratchpad RTSJ A no-heap component model for real-time Java A distributed real-time object-oriented platform APICOM RTSJ +CAN • There is not a simple technique to remove the GC’s from the server side !!! • RTZen hybrid approach, • DRTSJ , RTRMI-York, RTRMI-UPM take non-heap as a requirement JRT-11 4
  • 5. RTSJ region-based memory model • Three types of memory areas :O1=new Object – Heap – Immortal Memory (I) – Scoped Memory (Sx) O1 • A selector mechanism Sa 1 – One scope stack per thread – Enter, executeInArea Sb O2 1 • Destruction mechanism I – Stack discipline (counter) • Safety mechanism Scope Stack – Assignment rule – Single parent rule Forbidden assignment Default allocation 5 context
  • 6. Calculator() Calculator() NhRo: memory model lastInteger lastInteger add() add() lastResult() lastResult() doNothing() doNothing() • Fragmented memory model – Creation Context • Represents the state of the remote object – Invocation Context • Objects created during remote invocation • Safe nesting of contexts – NhRo-rule: references from creation to invocation are forbidden – References from invocation to creation are allowed 6
  • 7. NhRo: Example JRT-11 7
  • 8. NhRo: Impact on the middleware Scoped or Immortal CalculatorImpl_Stub CalculatorImpl lastInteger add() add() lastResult() lastResult() doNothing() doNothing() Programmer Layer ObjId Ref CC Invocation max Invocation 1 CalcID Immortal memory 0 0 Remote Object Table Thread Memory Area Pool Pool Middleware Layer JRMP/IIOP Transport Transport RTSJ Virtual Machine Client Server 8
  • 9. NhRo in action Calculator() Creation Context lastInteger (Immortal Memory) add() lastResult() Invoc. Context doNothing() (LTMemory) CalcID Ref OBJId Table enter 0 0 1 0 Thread Memory Area objID a b pool pool meth tmp ser 1 Transport CalcID.add(DataInt(3),DataInt(4)) Middleware Program DataInt(7) created created object object 9
  • 10. NhRo vs. traditional GC’d remote objects Garbage collector RTSJ-RI Memory area pool Garbage collector RTSJ-RI Memory area pool 8 16 7 14 6 Consummed time (ms) 12 Consummed time (ms) 5 10 4 8 3 6 2 4 1 2 0 0 1 21 41 61 81 101 121 141 752 1286 1910 2534 3158 sample Alive memory (kB) JRT-11 10
  • 11. Enhancements to the basic NhRo model • Patterns for programming with NhRos • NhRo stored in scoped memory – Scope stack characterization – Changes in the middleware – Policies for the memory are pool • Performance issues – Dependency on data transmitted JRT-11 11
  • 12. Calculator() NhRo: constraints (I) lastInteger add() lastResult() doNothing() • NhRo-rule limitations – Objects is creation context are destroyed after remote invocation by default • Two patterns to avoid the problem – Copy pattern – Extended portals 12
  • 13. NhRo: Scope Stack at the server Invocation context :RO1=new RemoteObject Sinv1 a b Handler 1 Thread Sa RO1 Sa RO1 Creation context Creation context 1 1 Sb Sb 1 1 I I Scope Stack Scope Stack (during remote object creation) (during remote invocation) • Creation context: state of the remote object • Invocation context: parameters of remote invocation 13
  • 15. Invocationnumber Memory Area Pool Invocationsize 0 0 0 Memory Area • It stores LTMemory instances only Pool • It requires two configuration parameters – Number of instances in the pool – Memory associated to each invocation context • Auto-collection – Invocation context returns automatically to its pool when they are not used • Internal counter 1→0 • Avoids memory area leakage 15
  • 16. bytes 5000 0 10000 15000 20000 25000 30000 void boolean byte char short int long float double null Byte Short Integer Long Float Double Character X Boolean RtUnRemOb String() JRT-11 String(10) and LTMemory size String(25) String(50) String(100) Object[0] Object[10D] Object[25D] Object[50D] Object[100D] Vector(0) Vector(10D) Vector(25D) Vector(50D) Vector(100D) Remove invocation parameters X echo(X) X doNothing() void doNothing(X) 16
  • 17. NhRos vs. (RT*) Garbage Collectors [new] JRT-11 17
  • 18. Conclusions • This work has introduced a model able to remove the garbage collection from the end-to-end path – NhRo model • Empirical results showed: – Its implementation in basic environments is simple – The performance patterns offered are powerful JRT-11 18
  • 19. Ongoing Work- • To produce an analytic model for the NhRo – Use of heap, and different threads – Identification of useful combinations • Analyze the parentage-rules proposed by Higuera- Toledano and integrate them with NhRos – A more restricted model JRT-11 19
  • 20. JRT-11 20

Notes de l'éditeur

  1. From the programmer perspective, the memory model of the region based remote objects, the memory is fragmented is fragmented in two contexts. The first of this contexts is the creation context The creation context contains all objects that are accessible from the remote object instance; that is, all objects that are accessible from the state of the attibutes. The second of the contexts is the invocation context. The invocation context contains all objects that are created as consequence of the remote invocation. All objects created in the remote methods of the object belongs to the invocation context. Besides there is a safety rule. This rule is kown as NhRo-rule. It states that the objects created during the remote invocation may not be references from those that belonging the creaation context. The opposite is posible, an object stored in creation context may be referenced from the creation context.