SlideShare a Scribd company logo
Towards Distributed Garbage Collection for
Distributed Real-Time Java
Pablo Basanta Val and Marisol García Valls
Universidad Carlos III de Madrid (SPAIN)
www.it.uc3m.es/drequiem/
Outline (概述)
 Context & Approach
 Real-time Java status
 Motivations for having a DGC service
 Strategies for a RT-DGC service
 Turning-off the DGC service
 Defining a simple RT-DGC service
 Evaluation
 Priority inversion illustration
 Blocking time introduced in remote communications
 Leasing overhead
 Conclusions and future work
2
Context
 Next generation real-time systems
 More dynamic & complex
 One approach to address this issue is to use high-level development
languages like real-time Java
 Provide developers with libraries and potentially may reduce the development
cost of applications
 However, Java was not initially designed for real-time systems
 Many features (e.g. garbage collectors collide with real-time performance)
 Research efforts are required to harmonize real-time performance with Java
3
State of the Art in Real-time Java
 Centralized systems
 Java VM, Specifications (RTSJ), Running products (Oracle, IBM, Jamaica)
 Currently in refinement in JSR-282
 Safety critical applications
 Ongoing specifications and implementations
 Active in JSR-302
 Distributed real-time Java
 Ongoing specifications (DRTSJ), and partial implementations (based on Java’s RMI)
 Stalled in JSR-50 and relaunched in 2012
4
This work contribution
 Improves garbage collection mechanisms included in Java’s RMI with real-
time performance
 Characterization of messages
 Initial performance indicators and clues
 Evaluation of different alternatives
 Benefits for the real-time Java community
 Useful for DRTSJ and other real-time RMI implementations
 Currently they do not provide operative approaches
 Backward compatible with RTSJ (no changes required)
5
Distribution real-time Java model
 Based on the DREQUIEMI’s framework for
distributed real-time Java
 It runs directly on RTSJ
 It extends Java’s RMI (Remote Method Invocations)
with predictability
 It offers a predictable garbage collector for RMI
Predictable =
configurable priorities + scheduling
parameterization
6
API of the scheduling service
(in DREQUIEI)
package es.uc3m.it.drequiem.rtrmi.server.dgc;
import java.rmi.server.dgc.*;
public interface RTDGCInterface extends java.rmi.Remote{
public void referenced(java.rmi.server.ObjID objid)
throws java.rmi.RemoteException;
public void unreferenced(java.rmi.server.ObjID objid)
throws java.rmi.RemoteException;
}
7
Motivation for having a
distributed garbage collector
 Java requires a garbage collector
 50% of all Java methods may allocate objects
 Static allocation is not a practical solution
 A distributed garbage collector is not mandatory in real-time Java
 It is not no so necessary as a local garbage collector (remote objects may be
removed manually like in CORBA)
 However, it may be beneficial in terms of collecting unused remote objects
 RMI uses the model
 To remove unwanted remote objects
8
Memory Leaks
avoided in Sun DGC
 DGC in RMI is based on
counting algorithms
 It is not able to remove
remote object cycles (to
avoid problems)
 Acyclic structures may be
collected
 (like the one in the figure)
9
Memory Leaks
avoided in Sun DGC
(2)
 Each potential invoation
to remoteObjectLeak
creates a memory leak
 After n invocations, there
are n remote objects that
may be collected
10
Relationship between the registry and the
DGC service
 The registry holds references to remote objects !!!
11
Sun’s DGC algorithm sketched
-reference list
 Based in leasing and
reference lists
 Based on a algorithm
described by Birrell
previously
 Reference lists prevent
remote object
deallocation
Remote references avoid remote object destruction
12
Sun’s DGC algorithm sketched
-Leasing
 Leasing
 To deal with faulty
scenarios
 Basic idea to wait for an
update
 periodically
Periodical renewal associated to a remote reference
13
Strategies for a real-time DGC service
 Two approaches
 To turn off DGC
 it requires new API methods to remove remote objects
 To produce a predictable version of DGC
 Requires a clear definition of priorities, periods
(So that it may be schedulable as a real-time task)
14
Strategies for a real-time DGC service
Turning DGC off
 Remote objects may removed at the server (with
current API).
00:UnicastRemoteObject
01: static boolean
02: unexportObject
03: (Remote r, bolean force)
04: throws NoSuchObjectException;
 But it could be extended with a method to list all
objects
00: UnicastRealtimeRemoteObject
01: static Vector
02: listExportedRemoteObjects();
Server node
15
Strategies for a real-time DGC service
Turning DGC off (2)
 To allow explicit deallocation from a client
00: RealtimeRemote
01: boolean unReference(Remote r)
02: throw NoSuchObjectException;
16
Strategies for a real-time DGC service
Turning DGC off
 Remote objects may removed at the server (with
current API).
00:UnicastRemoteObject
01: static boolean
02: unexportObject
03: (Remote r, bolean force)
04: throws NoSuchObjectException;
 But it could be extended with a method to list all
objects
00: UnicastRealtimeRemoteObject
01: static Vector
02: listExportedRemoteObjects();
Server node
17
Strategies for a real-time DGC service
real-time DGC
 Based on the redefinition of:
 Reference method
 Unreference method
 Leasing mechanism
18
Strategies for a real-time DGC service
real-time DGC- reference
 Reference
 Invoked each time a remote reference abandons a node
 The priority of the transaction is the priority of the thread that carries out that action
19
Strategies for a real-time DGC service
real-time DGC- unreference
 Reference
 Invoked each time a remote
reference is invoked
 The priority of the transaction is
the priority of the thread that
carries out that action
20
Strategies for a real-time DGC service
real-time DGC- lease
 Lease
 Invoked periodically
 Modeled as periodic real-time invocation (T,D,C, Priority)
21
Strategies for a real-time DGC service
real-time DGC- decoupled mechanisms
 To avoid synchronous
reference and unreference
methods
 Able decouple cost from
remote invocations
 The reference and
unreference methods are
modelled as T,D,C
transactions
22
Performance evaluation
goals
 To build an scenario that illustrates that illustrates
performance trends of current
 To evaluate the overhead introduced by the
synchronous/asynchronous remote invocations
 To evaluate the overhead introduced by the leasing
mechanism
 Reference software
 796 Mhz machines x 1 real-time router (100 Mbits second)
23
Performance evaluation
priority inversion trends
 A scenario that shows
unbounded priority
inversion was build
 Thread in client suffers
priority inversion of al
24
Performance evaluation
priority inversion due to DGC
 The real-time garbage collector may handle the priority
properly
100
400
1600
6400
25600
100
1300
2500
3700
4900
6100
7300
8500
9700
10900
12100
WCRT(µs)
T3_WCET (µs)
RT-DGC and DGC impact on Worst Case Response Times
CLIENT (with DGC)
CLIENT (with RT-DGC)
T3 (with DGC & RT-DGC )
25
Performance evaluation
deferred vs. synchronous costs
 Defered DGC reduces response times
26
Performance evaluation
leasing trends
 Above 1 minute the cost reduces remarkably (RMI default is 5 mins)
27
Conclusions (结论)
 Distributed real-time Java applications require to deal with the garbage
collector issue (disabling the DGC)
 Illustrated empirically
 The paper provides mechanisms to reduce the cost of garbage collection in
distributed real-time Java
 Illustrated empirically
28
Ongoing work
 Extensive evaluation and formalization
 Benchmarks and formalism for the real-time DGC
 An extension to other real-time infrastructures
 Used to collect real-time SOA
29
Thank you (谢谢)
30

More Related Content

Similar to Towards a garbage collector for distributed real-time Java

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
Universidad Carlos III de Madrid
 
IRJET- Performance Comparison of Real-Time Garbage Collection in the Sun ...
IRJET-  	  Performance Comparison of Real-Time Garbage Collection in the Sun ...IRJET-  	  Performance Comparison of Real-Time Garbage Collection in the Sun ...
IRJET- Performance Comparison of Real-Time Garbage Collection in the Sun ...
IRJET Journal
 
Real-time Programming in Java
Real-time Programming in JavaReal-time Programming in Java
Real-time Programming in Java
Aleš Plšek
 
remote method invocation
remote method invocationremote method invocation
remote method invocation
Arun Nair
 
Java - Concurrent programming - Thread's advanced concepts
Java - Concurrent programming - Thread's advanced conceptsJava - Concurrent programming - Thread's advanced concepts
Java - Concurrent programming - Thread's advanced concepts
Riccardo Cardin
 
Temadag om-java-jamaica vm-2013-09
Temadag om-java-jamaica vm-2013-09Temadag om-java-jamaica vm-2013-09
Temadag om-java-jamaica vm-2013-09
InfinIT - Innovationsnetværket for it
 
Java RMI
Java RMIJava RMI
Java RMI
Prajakta Nimje
 
Java rmi example program with code
Java rmi example program with codeJava rmi example program with code
Java rmi example program with code
kamal kotecha
 
this-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptxthis-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptx
Tier1 app
 
VideoMR - A Map and Reduce Framework for Real-time Video Processing
VideoMR - A Map and Reduce Framework for Real-time Video ProcessingVideoMR - A Map and Reduce Framework for Real-time Video Processing
VideoMR - A Map and Reduce Framework for Real-time Video Processing
Matthias Trapp
 
Service Virtualization - Next Gen Testing Conference Singapore 2013
Service Virtualization - Next Gen Testing Conference Singapore 2013Service Virtualization - Next Gen Testing Conference Singapore 2013
Service Virtualization - Next Gen Testing Conference Singapore 2013
Min Fang
 
Software Defined Service Networking (SDSN) - by Dr. Indika Kumara
Software Defined Service Networking (SDSN) - by Dr. Indika KumaraSoftware Defined Service Networking (SDSN) - by Dr. Indika Kumara
Software Defined Service Networking (SDSN) - by Dr. Indika Kumara
Thejan Wijesinghe
 
Unified Stream Processing at Scale with Apache Samza - BDS2017
Unified Stream Processing at Scale with Apache Samza - BDS2017Unified Stream Processing at Scale with Apache Samza - BDS2017
Unified Stream Processing at Scale with Apache Samza - BDS2017
Jacob Maes
 
Analyzing the Performance of Mobile Web
Analyzing the Performance of Mobile WebAnalyzing the Performance of Mobile Web
Analyzing the Performance of Mobile Web
Ariya Hidayat
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
Ariya Hidayat
 
20160609 nike techtalks reactive applications tools of the trade
20160609 nike techtalks reactive applications   tools of the trade20160609 nike techtalks reactive applications   tools of the trade
20160609 nike techtalks reactive applications tools of the trade
shinolajla
 
Reactive robotics io_t_2017
Reactive robotics io_t_2017Reactive robotics io_t_2017
Reactive robotics io_t_2017
Trayan Iliev
 
IOT model to Unified Communication Events in SDN
IOT model to Unified Communication  Events in SDNIOT model to Unified Communication  Events in SDN
IOT model to Unified Communication Events in SDN
Chandrashekhar Rao
 
Reactive Java: Promises and Streams with Reakt (JavaOne Talk 2016)
Reactive Java:  Promises and Streams with Reakt (JavaOne Talk 2016)Reactive Java:  Promises and Streams with Reakt (JavaOne Talk 2016)
Reactive Java: Promises and Streams with Reakt (JavaOne Talk 2016)
Rick Hightower
 
Reactive Java: Promises and Streams with Reakt (JavaOne talk 2016)
Reactive Java: Promises and Streams with Reakt  (JavaOne talk 2016)Reactive Java: Promises and Streams with Reakt  (JavaOne talk 2016)
Reactive Java: Promises and Streams with Reakt (JavaOne talk 2016)
Rick Hightower
 

Similar to Towards a garbage collector for distributed real-time Java (20)

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
 
IRJET- Performance Comparison of Real-Time Garbage Collection in the Sun ...
IRJET-  	  Performance Comparison of Real-Time Garbage Collection in the Sun ...IRJET-  	  Performance Comparison of Real-Time Garbage Collection in the Sun ...
IRJET- Performance Comparison of Real-Time Garbage Collection in the Sun ...
 
Real-time Programming in Java
Real-time Programming in JavaReal-time Programming in Java
Real-time Programming in Java
 
remote method invocation
remote method invocationremote method invocation
remote method invocation
 
Java - Concurrent programming - Thread's advanced concepts
Java - Concurrent programming - Thread's advanced conceptsJava - Concurrent programming - Thread's advanced concepts
Java - Concurrent programming - Thread's advanced concepts
 
Temadag om-java-jamaica vm-2013-09
Temadag om-java-jamaica vm-2013-09Temadag om-java-jamaica vm-2013-09
Temadag om-java-jamaica vm-2013-09
 
Java RMI
Java RMIJava RMI
Java RMI
 
Java rmi example program with code
Java rmi example program with codeJava rmi example program with code
Java rmi example program with code
 
this-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptxthis-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptx
 
VideoMR - A Map and Reduce Framework for Real-time Video Processing
VideoMR - A Map and Reduce Framework for Real-time Video ProcessingVideoMR - A Map and Reduce Framework for Real-time Video Processing
VideoMR - A Map and Reduce Framework for Real-time Video Processing
 
Service Virtualization - Next Gen Testing Conference Singapore 2013
Service Virtualization - Next Gen Testing Conference Singapore 2013Service Virtualization - Next Gen Testing Conference Singapore 2013
Service Virtualization - Next Gen Testing Conference Singapore 2013
 
Software Defined Service Networking (SDSN) - by Dr. Indika Kumara
Software Defined Service Networking (SDSN) - by Dr. Indika KumaraSoftware Defined Service Networking (SDSN) - by Dr. Indika Kumara
Software Defined Service Networking (SDSN) - by Dr. Indika Kumara
 
Unified Stream Processing at Scale with Apache Samza - BDS2017
Unified Stream Processing at Scale with Apache Samza - BDS2017Unified Stream Processing at Scale with Apache Samza - BDS2017
Unified Stream Processing at Scale with Apache Samza - BDS2017
 
Analyzing the Performance of Mobile Web
Analyzing the Performance of Mobile WebAnalyzing the Performance of Mobile Web
Analyzing the Performance of Mobile Web
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
 
20160609 nike techtalks reactive applications tools of the trade
20160609 nike techtalks reactive applications   tools of the trade20160609 nike techtalks reactive applications   tools of the trade
20160609 nike techtalks reactive applications tools of the trade
 
Reactive robotics io_t_2017
Reactive robotics io_t_2017Reactive robotics io_t_2017
Reactive robotics io_t_2017
 
IOT model to Unified Communication Events in SDN
IOT model to Unified Communication  Events in SDNIOT model to Unified Communication  Events in SDN
IOT model to Unified Communication Events in SDN
 
Reactive Java: Promises and Streams with Reakt (JavaOne Talk 2016)
Reactive Java:  Promises and Streams with Reakt (JavaOne Talk 2016)Reactive Java:  Promises and Streams with Reakt (JavaOne Talk 2016)
Reactive Java: Promises and Streams with Reakt (JavaOne Talk 2016)
 
Reactive Java: Promises and Streams with Reakt (JavaOne talk 2016)
Reactive Java: Promises and Streams with Reakt  (JavaOne talk 2016)Reactive Java: Promises and Streams with Reakt  (JavaOne talk 2016)
Reactive Java: Promises and Streams with Reakt (JavaOne talk 2016)
 

More from Universidad Carlos III de Madrid

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
Universidad Carlos III de Madrid
 
A simple data muling protocol
A simple data muling protocolA simple data muling protocol
A simple data muling protocol
Universidad Carlos III de Madrid
 
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
Universidad Carlos III de Madrid
 
Fine
FineFine
Basanta jtr2009
Basanta jtr2009Basanta jtr2009
No Heap Remote Objects for Distributed real-time Java
No Heap Remote Objects for Distributed real-time JavaNo Heap Remote Objects for Distributed real-time Java
No Heap Remote Objects for Distributed real-time Java
Universidad Carlos III de Madrid
 
A synchronous scheduling service for distributed real-time Java
A synchronous scheduling service for distributed real-time JavaA synchronous scheduling service for distributed real-time Java
A synchronous scheduling service for distributed real-time Java
Universidad Carlos III de Madrid
 
Simple asynchronous remote invocations for distributed real-time Java
Simple asynchronous remote invocations for distributed real-time JavaSimple asynchronous remote invocations for distributed real-time Java
Simple asynchronous remote invocations for distributed real-time Java
Universidad Carlos III de Madrid
 
Pbasanta@jtres06 extendedportal
Pbasanta@jtres06 extendedportalPbasanta@jtres06 extendedportal
Pbasanta@jtres06 extendedportal
Universidad Carlos III de Madrid
 
Enhancing the region model of RTSJ
Enhancing the region model of RTSJEnhancing the region model of RTSJ
Enhancing the region model of RTSJ
Universidad Carlos III de Madrid
 

More from Universidad Carlos III de Madrid (10)

Tecnicas y extensiones para Java de tiempo real
Tecnicas y extensiones para Java de tiempo realTecnicas y extensiones para Java de tiempo real
Tecnicas y extensiones para Java de tiempo real
 
A simple data muling protocol
A simple data muling protocolA simple data muling protocol
A simple data muling protocol
 
Mejoras a la predictibilidad de la tecnología Java EE
Mejoras a la predictibilidad de la tecnología Java EEMejoras a la predictibilidad de la tecnología Java EE
Mejoras a la predictibilidad de la tecnología Java EE
 
Fine
FineFine
Fine
 
Basanta jtr2009
Basanta jtr2009Basanta jtr2009
Basanta jtr2009
 
No Heap Remote Objects for Distributed real-time Java
No Heap Remote Objects for Distributed real-time JavaNo Heap Remote Objects for Distributed real-time Java
No Heap Remote Objects for Distributed real-time Java
 
A synchronous scheduling service for distributed real-time Java
A synchronous scheduling service for distributed real-time JavaA synchronous scheduling service for distributed real-time Java
A synchronous scheduling service for distributed real-time Java
 
Simple asynchronous remote invocations for distributed real-time Java
Simple asynchronous remote invocations for distributed real-time JavaSimple asynchronous remote invocations for distributed real-time Java
Simple asynchronous remote invocations for distributed real-time Java
 
Pbasanta@jtres06 extendedportal
Pbasanta@jtres06 extendedportalPbasanta@jtres06 extendedportal
Pbasanta@jtres06 extendedportal
 
Enhancing the region model of RTSJ
Enhancing the region model of RTSJEnhancing the region model of RTSJ
Enhancing the region model of RTSJ
 

Recently uploaded

Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
PsychoTech Services
 
molar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptxmolar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptx
Anagha Prasad
 
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
Advanced-Concepts-Team
 
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdfMending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Selcen Ozturkcan
 
Pests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdfPests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdf
PirithiRaju
 
Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.
Aditi Bajpai
 
Sciences of Europe journal No 142 (2024)
Sciences of Europe journal No 142 (2024)Sciences of Europe journal No 142 (2024)
Sciences of Europe journal No 142 (2024)
Sciences of Europe
 
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Leonel Morgado
 
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
frank0071
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
Sérgio Sacani
 
23PH301 - Optics - Optical Lenses.pptx
23PH301 - Optics  -  Optical Lenses.pptx23PH301 - Optics  -  Optical Lenses.pptx
23PH301 - Optics - Optical Lenses.pptx
RDhivya6
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
Carl Bergstrom
 
HOW DO ORGANISMS REPRODUCE?reproduction part 1
HOW DO ORGANISMS REPRODUCE?reproduction part 1HOW DO ORGANISMS REPRODUCE?reproduction part 1
HOW DO ORGANISMS REPRODUCE?reproduction part 1
Shashank Shekhar Pandey
 
Gadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdfGadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdf
PirithiRaju
 
Eukaryotic Transcription Presentation.pptx
Eukaryotic Transcription Presentation.pptxEukaryotic Transcription Presentation.pptx
Eukaryotic Transcription Presentation.pptx
RitabrataSarkar3
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
MaheshaNanjegowda
 
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of ProteinsGBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
Areesha Ahmad
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
University of Maribor
 
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills MN
 
Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
Vandana Devesh Sharma
 

Recently uploaded (20)

Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
Sexuality - Issues, Attitude and Behaviour - Applied Social Psychology - Psyc...
 
molar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptxmolar-distalization in orthodontics-seminar.pptx
molar-distalization in orthodontics-seminar.pptx
 
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
ESA/ACT Science Coffee: Diego Blas - Gravitational wave detection with orbita...
 
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdfMending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
Mending Clothing to Support Sustainable Fashion_CIMaR 2024.pdf
 
Pests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdfPests of Storage_Identification_Dr.UPR.pdf
Pests of Storage_Identification_Dr.UPR.pdf
 
Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.Micronuclei test.M.sc.zoology.fisheries.
Micronuclei test.M.sc.zoology.fisheries.
 
Sciences of Europe journal No 142 (2024)
Sciences of Europe journal No 142 (2024)Sciences of Europe journal No 142 (2024)
Sciences of Europe journal No 142 (2024)
 
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
Describing and Interpreting an Immersive Learning Case with the Immersion Cub...
 
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
Juaristi, Jon. - El canon espanol. El legado de la cultura española a la civi...
 
The binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defectsThe binding of cosmological structures by massless topological defects
The binding of cosmological structures by massless topological defects
 
23PH301 - Optics - Optical Lenses.pptx
23PH301 - Optics  -  Optical Lenses.pptx23PH301 - Optics  -  Optical Lenses.pptx
23PH301 - Optics - Optical Lenses.pptx
 
The cost of acquiring information by natural selection
The cost of acquiring information by natural selectionThe cost of acquiring information by natural selection
The cost of acquiring information by natural selection
 
HOW DO ORGANISMS REPRODUCE?reproduction part 1
HOW DO ORGANISMS REPRODUCE?reproduction part 1HOW DO ORGANISMS REPRODUCE?reproduction part 1
HOW DO ORGANISMS REPRODUCE?reproduction part 1
 
Gadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdfGadgets for management of stored product pests_Dr.UPR.pdf
Gadgets for management of stored product pests_Dr.UPR.pdf
 
Eukaryotic Transcription Presentation.pptx
Eukaryotic Transcription Presentation.pptxEukaryotic Transcription Presentation.pptx
Eukaryotic Transcription Presentation.pptx
 
Basics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different formsBasics of crystallography, crystal systems, classes and different forms
Basics of crystallography, crystal systems, classes and different forms
 
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of ProteinsGBSN - Biochemistry (Unit 6) Chemistry of Proteins
GBSN - Biochemistry (Unit 6) Chemistry of Proteins
 
Randomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNERandomised Optimisation Algorithms in DAPHNE
Randomised Optimisation Algorithms in DAPHNE
 
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
Travis Hills of MN is Making Clean Water Accessible to All Through High Flux ...
 
Compexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titrationCompexometric titration/Chelatorphy titration/chelating titration
Compexometric titration/Chelatorphy titration/chelating titration
 

Towards a garbage collector for distributed real-time Java

  • 1. Towards Distributed Garbage Collection for Distributed Real-Time Java Pablo Basanta Val and Marisol García Valls Universidad Carlos III de Madrid (SPAIN) www.it.uc3m.es/drequiem/
  • 2. Outline (概述)  Context & Approach  Real-time Java status  Motivations for having a DGC service  Strategies for a RT-DGC service  Turning-off the DGC service  Defining a simple RT-DGC service  Evaluation  Priority inversion illustration  Blocking time introduced in remote communications  Leasing overhead  Conclusions and future work 2
  • 3. Context  Next generation real-time systems  More dynamic & complex  One approach to address this issue is to use high-level development languages like real-time Java  Provide developers with libraries and potentially may reduce the development cost of applications  However, Java was not initially designed for real-time systems  Many features (e.g. garbage collectors collide with real-time performance)  Research efforts are required to harmonize real-time performance with Java 3
  • 4. State of the Art in Real-time Java  Centralized systems  Java VM, Specifications (RTSJ), Running products (Oracle, IBM, Jamaica)  Currently in refinement in JSR-282  Safety critical applications  Ongoing specifications and implementations  Active in JSR-302  Distributed real-time Java  Ongoing specifications (DRTSJ), and partial implementations (based on Java’s RMI)  Stalled in JSR-50 and relaunched in 2012 4
  • 5. This work contribution  Improves garbage collection mechanisms included in Java’s RMI with real- time performance  Characterization of messages  Initial performance indicators and clues  Evaluation of different alternatives  Benefits for the real-time Java community  Useful for DRTSJ and other real-time RMI implementations  Currently they do not provide operative approaches  Backward compatible with RTSJ (no changes required) 5
  • 6. Distribution real-time Java model  Based on the DREQUIEMI’s framework for distributed real-time Java  It runs directly on RTSJ  It extends Java’s RMI (Remote Method Invocations) with predictability  It offers a predictable garbage collector for RMI Predictable = configurable priorities + scheduling parameterization 6
  • 7. API of the scheduling service (in DREQUIEI) package es.uc3m.it.drequiem.rtrmi.server.dgc; import java.rmi.server.dgc.*; public interface RTDGCInterface extends java.rmi.Remote{ public void referenced(java.rmi.server.ObjID objid) throws java.rmi.RemoteException; public void unreferenced(java.rmi.server.ObjID objid) throws java.rmi.RemoteException; } 7
  • 8. Motivation for having a distributed garbage collector  Java requires a garbage collector  50% of all Java methods may allocate objects  Static allocation is not a practical solution  A distributed garbage collector is not mandatory in real-time Java  It is not no so necessary as a local garbage collector (remote objects may be removed manually like in CORBA)  However, it may be beneficial in terms of collecting unused remote objects  RMI uses the model  To remove unwanted remote objects 8
  • 9. Memory Leaks avoided in Sun DGC  DGC in RMI is based on counting algorithms  It is not able to remove remote object cycles (to avoid problems)  Acyclic structures may be collected  (like the one in the figure) 9
  • 10. Memory Leaks avoided in Sun DGC (2)  Each potential invoation to remoteObjectLeak creates a memory leak  After n invocations, there are n remote objects that may be collected 10
  • 11. Relationship between the registry and the DGC service  The registry holds references to remote objects !!! 11
  • 12. Sun’s DGC algorithm sketched -reference list  Based in leasing and reference lists  Based on a algorithm described by Birrell previously  Reference lists prevent remote object deallocation Remote references avoid remote object destruction 12
  • 13. Sun’s DGC algorithm sketched -Leasing  Leasing  To deal with faulty scenarios  Basic idea to wait for an update  periodically Periodical renewal associated to a remote reference 13
  • 14. Strategies for a real-time DGC service  Two approaches  To turn off DGC  it requires new API methods to remove remote objects  To produce a predictable version of DGC  Requires a clear definition of priorities, periods (So that it may be schedulable as a real-time task) 14
  • 15. Strategies for a real-time DGC service Turning DGC off  Remote objects may removed at the server (with current API). 00:UnicastRemoteObject 01: static boolean 02: unexportObject 03: (Remote r, bolean force) 04: throws NoSuchObjectException;  But it could be extended with a method to list all objects 00: UnicastRealtimeRemoteObject 01: static Vector 02: listExportedRemoteObjects(); Server node 15
  • 16. Strategies for a real-time DGC service Turning DGC off (2)  To allow explicit deallocation from a client 00: RealtimeRemote 01: boolean unReference(Remote r) 02: throw NoSuchObjectException; 16
  • 17. Strategies for a real-time DGC service Turning DGC off  Remote objects may removed at the server (with current API). 00:UnicastRemoteObject 01: static boolean 02: unexportObject 03: (Remote r, bolean force) 04: throws NoSuchObjectException;  But it could be extended with a method to list all objects 00: UnicastRealtimeRemoteObject 01: static Vector 02: listExportedRemoteObjects(); Server node 17
  • 18. Strategies for a real-time DGC service real-time DGC  Based on the redefinition of:  Reference method  Unreference method  Leasing mechanism 18
  • 19. Strategies for a real-time DGC service real-time DGC- reference  Reference  Invoked each time a remote reference abandons a node  The priority of the transaction is the priority of the thread that carries out that action 19
  • 20. Strategies for a real-time DGC service real-time DGC- unreference  Reference  Invoked each time a remote reference is invoked  The priority of the transaction is the priority of the thread that carries out that action 20
  • 21. Strategies for a real-time DGC service real-time DGC- lease  Lease  Invoked periodically  Modeled as periodic real-time invocation (T,D,C, Priority) 21
  • 22. Strategies for a real-time DGC service real-time DGC- decoupled mechanisms  To avoid synchronous reference and unreference methods  Able decouple cost from remote invocations  The reference and unreference methods are modelled as T,D,C transactions 22
  • 23. Performance evaluation goals  To build an scenario that illustrates that illustrates performance trends of current  To evaluate the overhead introduced by the synchronous/asynchronous remote invocations  To evaluate the overhead introduced by the leasing mechanism  Reference software  796 Mhz machines x 1 real-time router (100 Mbits second) 23
  • 24. Performance evaluation priority inversion trends  A scenario that shows unbounded priority inversion was build  Thread in client suffers priority inversion of al 24
  • 25. Performance evaluation priority inversion due to DGC  The real-time garbage collector may handle the priority properly 100 400 1600 6400 25600 100 1300 2500 3700 4900 6100 7300 8500 9700 10900 12100 WCRT(µs) T3_WCET (µs) RT-DGC and DGC impact on Worst Case Response Times CLIENT (with DGC) CLIENT (with RT-DGC) T3 (with DGC & RT-DGC ) 25
  • 26. Performance evaluation deferred vs. synchronous costs  Defered DGC reduces response times 26
  • 27. Performance evaluation leasing trends  Above 1 minute the cost reduces remarkably (RMI default is 5 mins) 27
  • 28. Conclusions (结论)  Distributed real-time Java applications require to deal with the garbage collector issue (disabling the DGC)  Illustrated empirically  The paper provides mechanisms to reduce the cost of garbage collection in distributed real-time Java  Illustrated empirically 28
  • 29. Ongoing work  Extensive evaluation and formalization  Benchmarks and formalism for the real-time DGC  An extension to other real-time infrastructures  Used to collect real-time SOA 29