Andy C. King and Richard Jones University of Kent at Canterbury Removing GC Synchronisation.

Slides:



Advertisements
Similar presentations
Dataflow Analysis for Datarace-Free Programs (ESOP 11) Arnab De Joint work with Deepak DSouza and Rupesh Nasre Indian Institute of Science, Bangalore.
Advertisements

Simplifications of Context-Free Grammars
Variations of the Turing Machine
wwwcsif.cs.ucdavis.edu/~jacksoni
UNIT II DATA TYPES OPERATORS AND CONTROL STATEMENT 1.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Shape Analysis for Fine-Grained Concurrency using Thread Quantification Josh Berdine Microsoft Research Joint work with: Tal Lev-Ami, Roman Manevich, Mooly.
Turing Machines.
Intel Software College Tuning Threading Code with Intel® Thread Profiler for Explicit Threads.
1 public class Newton { public static double sqrt(double c) { double epsilon = 1E-15; if (c < 0) return Double.NaN; double t = c; while (Math.abs(t - c/t)
Sample Service Screenshots Enterprise Cloud Service 11.3.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Lecture plan Transaction processing Concurrency control
1 Termination and shape-shifting heaps Byron Cook Microsoft Research, Cambridge Joint work with Josh Berdine, Dino Distefano, and.
Verification and Validation
Wenjin Xu. BasicsAllocationCollectionFinalization GC Mode Sample.
… an introduction Peter Varsanyi Garbage collector Confidential.
A Block-structured Heap Simplifies Parallel GC Simon Marlow (Microsoft Research) Roshan James (U. Indiana) Tim Harris (Microsoft Research) Simon Peyton.
PSSA Preparation.
Cooperative Cache Scrubbing Jennifer B. Sartor, Wim Heirman, Steve Blackburn*, Lieven Eeckhout, Kathryn S. McKinley^ PACT 2014 * ^
Techniques for proving programs with pointers A. Tikhomirov.
A Randomized Dynamic Program Analysis for Detecting Real Deadlocks Pallavi Joshi  Chang-Seo Park  Koushik Sen  Mayur Naik ‡  Par Lab, EECS, UC Berkeley‡
A Coherent and Managed Runtime for ML on the SCC KC SivaramakrishnanLukasz Ziarek Suresh Jagannathan Purdue University SUNY Buffalo Purdue University.
1 Write Barrier Elision for Concurrent Garbage Collectors Martin T. Vechev Cambridge University David F. Bacon IBM T.J.Watson Research Center.
Automatic Memory Management Noam Rinetzky Schreiber 123A /seminar/seminar1415a.html.
Pointer Analysis – Part I Mayur Naik Intel Research, Berkeley CS294 Lecture March 17, 2009.
A Randomized Dynamic Program Analysis for Detecting Real Deadlocks Koushik Sen CS 265.
Lecture 10: Heap Management CS 540 GMU Spring 2009.
CS162 Week 9 Kyle Dewey. Overview What needs to be done Quirks with GC on miniJS Implementing GC on miniJS.
Garbage Collection CSCI 2720 Spring Static vs. Dynamic Allocation Early versions of Fortran –All memory was static C –Mix of static and dynamic.
Guoquing Xu, Atanas Rountev Ohio State University Oct 9 th, 2008 Presented by Eun Jung Park.
1 Maximize Java Performance by using YOURKIT with uPortal development Faizan Ahmed – Sr. Application Developer.
Task-aware Garbage Collection in a Multi-Tasking Virtual Machine Sunil Soman Laurent Daynès Chandra Krintz RACE Lab, UC Santa Barbara Sun Microsystems.
Run-Time Storage Organization
An Adaptive, Region-based Allocator for Java Feng Qian & Laurie Hendren 2002.
1 An Efficient On-the-Fly Cycle Collection Harel Paz, Erez Petrank - Technion, Israel David F. Bacon, V. T. Rajan - IBM T.J. Watson Research Center Elliot.
University of Virginia CSharp (© John Knight 2005) 1 What’s New In C#
Lecture 1: Overview of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed.
1 Overview Assignment 6: hints  Living with a garbage collector Assignment 5: solution  Garbage collection.
SEG Advanced Software Design and Reengineering TOPIC L Garbage Collection Algorithms.
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
An Adaptive, Region-based Allocator for Java Feng Qian, Laurie Hendren {fqian, Sable Research Group School of Computer Science McGill.
Chapter 5: Programming Languages and Constructs by Ravi Sethi Activation Records Dolores Zage.
Today’s Agenda  Quick Review  Finish Java Threads  The CS Problem Advanced Topics in Software Engineering 1.
Message Analysis-Guided Allocation and Low-Pause Incremental Garbage Collection in a Concurrent Language Konstantinos Sagonas Jesper Wilhelmsson Uppsala.
Runtime System CS 153: Compilers. Runtime System Runtime system: all the stuff that the language implicitly assumes and that is not described in the program.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Introduction to Garbage Collection. Garbage Collection It automatically reclaims memory occupied by objects that are no longer in use It frees the programmer.
Pointer and Escape Analysis for Multithreaded Programs Alexandru Salcianu Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology.
® July 21, 2004GC Summer School1 Cycles to Recycle: Copy GC Without Stopping the World The Sapphire Collector Richard L. Hudson J. Eliot B. Moss Originally.
Internet Computing Module II. Syllabus Creating & Using classes in Java – Methods and Classes – Inheritance – Super Class – Method Overriding – Packages.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 12: Automating Memory Management
Core Java Garbage Collection LEVEL – PRACTITIONER.
Topic: Java Garbage Collection
Module 9: Memory and Resource Management
Unit-2 Objects and Classes
Runtime Analysis of Hotspot Java Virtual Machine
Memory Management and Garbage Collection Hal Perkins Autumn 2011
Strategies for automatic memory management
CLEANING UP UNUSED OBJECTS
Threads Chapter 5 2/17/2019 B.Ramamurthy.
Threads Chapter 5 2/23/2019 B.Ramamurthy.
자바 언어를 위한 정적 분석 (Static Analyses for Java) ‘99 한국정보과학회 가을학술발표회 튜토리얼
Still Chapter 2 (Based on Silberchatz’s text and Nachos Roadmap.)
Created By: Asst. Prof. Ashish Shah, J.M.Patel College, Goregoan West
M S COLLEGE ART’S, COMM., SCI. & BMS
Presentation transcript:

Andy C. King and Richard Jones University of Kent at Canterbury Removing GC Synchronisation

Overview The Problem An Observation L & S Heaplets Implementation A Fly in the Ointment Swatting the Fly Measurements Future Work

Concurrency in multi-threaded applications Synchronisation is necessary Language level synchronized VM level mutator and garbage collector (GC) threads suspending threads before collecting the latter can be quite costly The Problem

Objects may be thread-local (L) Reachable only within their allocating thread do not need synchronisation for such objects Can manage these objects locally Place in per-thread heap regions called heaplets No need to stop other threads to collect such objects Shared objects (G) go in global heap An Observation

T1 T2 G L1 L2 L & G Heaplets

Variation on Steensgaard [Stee00] Escape analysis technique automatically determine local objects mark their allocation sites patch to use appropriate heaplet Flow-insensitive Context-sensitive (specialisation) performed at runtime Implementation

Implementation (2) Operates on a snapshot of the world set of classes loaded at that point in time JDK 1.22_06 Production Release for Solaris new GC with heaplets support specialisation patches applied in interpreter patched/specialised methods can be JIT’ed

Dynamic class loading Class loaded after snapshot May override method containing L allocation site Shares the object L allocation site now S (transitive closure) A Fly in the Ointment

1class A { 2public void do( Object o) { } 3} 4class Main { 5public static void main( String [] args) { 6 A a = new A (); 7 foo(a); SNAPSHOT ANALYSIS 30 A a’ = new A’ (); LOAD CLASS A’ 31 foo(a’); 32 } 33 public static void foo( A inA) { 34 Object o = new Object (); 35inA.do(o); 36} 37} A Fly in the Ointment (2)

Truly shared (G) reachable from >1 thread G heap Truly local (L) reachable from exactly 1 thread can prove type L heaplet Optimistically local (OL) reachable from 1 thread cannot prove type OL heaplet Swatting the Fly

T1 T2 G L1 L2 OL1 OL2 Swatting the Fly (2)

Analyse new classes immediately Compare methods If mismatched, OL sites are broken Class is non-conforming OL heaplet becomes G can be done very cheaply only OL heaplets of referring threads are affected Swatting the Fly (3)

T1 T2 G L1 L2 OL1 OL2 Swatting the Fly (4)

Measurements

Measurements (2)

Finally get the bloody numbers from the GC… Future Work

Andy C. King and Richard Jones University of Kent at Canterbury Q&A