SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

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

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

Más 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
 

Último

SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
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
 
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
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
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
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
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
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 

Último (20)

SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
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
 
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
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
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.
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
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
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 

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

Notas del editor

  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.