JavaSplit. A Portable Distributed Runtime for Java. Michael Factor Assaf Schuster Konstantin Shagin

Similar documents
A Platform-Independent Distributed Runtime for Standard Multithreaded Java

Jupiter: A Modular and Extensible JVM

Java Instrumentation for Dynamic Analysis

CSE P 501 Compilers. Java Implementation JVMs, JITs &c Hal Perkins Winter /11/ Hal Perkins & UW CSE V-1

Agenda. CSE P 501 Compilers. Java Implementation Overview. JVM Architecture. JVM Runtime Data Areas (1) JVM Data Types. CSE P 501 Su04 T-1

Delft-Java Link Translation Buffer

1 High-Performance Computing on

cjvm: a Single System Image of a JVM on a Cluster

Run-time Program Management. Hwansoo Han

Cluster Computing with Single Thread Space

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours

History Introduction to Java Characteristics of Java Data types

Outline. Introduction to Java. What Is Java? History. Java 2 Platform. Java 2 Platform Standard Edition. Introduction Java 2 Platform

Chapter 4: Threads. Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples Windows XP Threads Linux Threads

JiST: Java in Simulation Time

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

CS2110 Fall 2011 Lecture 25. Under the Hood: The Java Virtual Machine, Part II

Improving Java Code Performance. Make your Java/Dalvik VM happier

Shared Mutable State SWEN-220

Lecture 1: Overview of Java

B2.52-R3: INTRODUCTION TO OBJECT ORIENTATED PROGRAMMING THROUGH JAVA

Compiling Java For High Performance on Servers

DISTRIBUTED SYSTEMS [COMP9243] Lecture 3b: Distributed Shared Memory DISTRIBUTED SHARED MEMORY (DSM) DSM consists of two components:

JVML Instruction Set. How to get more than 256 local variables! Method Calls. Example. Method Calls

Objectives. Problem Solving. Introduction. An overview of object-oriented concepts. Programming and programming languages An introduction to Java

Introduction to Java

Jaos - Java on Aos. Oberon Event 03 Patrik Reali

Java Overview An introduction to the Java Programming Language

Introduction to Java Programming CPIT 202. WEWwwbvxnvbxmnhsgfkdjfcn

Java and C II. CSE 351 Spring Instructor: Ruth Anderson

Portable Resource Control in Java The J-SEAL2 Approach

Chapter 1 Introduction to Java

20 Most Important Java Programming Interview Questions. Powered by

Chapter 4: Threads. Chapter 4: Threads. Overview Multicore Programming Multithreading Models Thread Libraries Implicit Threading Threading Issues

SOFTWARE ARCHITECTURE 7. JAVA VIRTUAL MACHINE

Distributed Shared Memory. Presented by Humayun Arafat

A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler

Administration CS 412/413. Why build a compiler? Compilers. Architectural independence. Source-to-source translator

The Java Language Implementation

Course Overview. PART I: overview material. PART II: inside a compiler. PART III: conclusion

JVM. What This Topic is About. Course Overview. Recap: Interpretive Compilers. Abstract Machines. Abstract Machines. Class Files and Class File Format

Improving Java Performance

Delft-Java Dynamic Translation

OPERATING SYSTEM. Chapter 4: Threads

Java On Steroids: Sun s High-Performance Java Implementation. History

1 Shyam sir JAVA Notes

Jupiter/SVM: A JVM-based Single System Image for Clusters of Workstations

The Java Programming Language

Special Topics: Programming Languages

Index. Course Outline. Grading Policy. Lab Time Distribution. Important Instructions

JSR 292 backport. (Rémi Forax) University Paris East

Welcome to the session...

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

15CS45 : OBJECT ORIENTED CONCEPTS

A JAVA VIRTUAL MACHINE FOR RISC-V PORTING THE JIKES RESEARCH VM

Today. Instance Method Dispatch. Instance Method Dispatch. Instance Method Dispatch 11/29/11. today. last time

A Quantitative Evaluation of the Contribution of Native Code to Java Workloads

JAVA MOCK TEST JAVA MOCK TEST III

Learning objectives. The Java Environment. Java timeline (cont d) Java timeline. Understand the basic features of Java

1. Java is a... language. A. moderate typed B. strogly typed C. weakly typed D. none of these. Answer: B

High-Level Language VMs

Java Class Loading and Bytecode Verification

Java Application Development

generate-jvm-report shows the threads, classes, memory, and loggers for a given target instance. Name Synopsis

Lecture 1: Introduction to Java

Transparent Program Transformations in the Presence of Opaque Code

Chapter 4: Threads. Chapter 4: Threads

Compact and Efficient Strings for Java

invokedynamic IN 45 MINUTES!!! Wednesday, February 6, 13

Last class: OS and Architecture. OS and Computer Architecture

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components

Fault Tolerant Java Virtual Machine. Roy Friedman and Alon Kama Technion Haifa, Israel

Distributed Object Sharing for Cluster-based Java Virtual Machine

Core JAVA Training Syllabus FEE: RS. 8000/-

On the Design of Global Object Space for Efficient Multi-threading Java Computing on Clusters 1

Efficient Object Placement including Node Selection in a Distributed Virtual Machine

A High Performance Cluster JVM Presenting a Pure Single System Image

PennBench: A Benchmark Suite for Embedded Java

02 B The Java Virtual Machine

Chapter 4 Java Language Fundamentals

LDetector: A low overhead data race detector for GPU programs

Introduction to Visual Basic and Visual C++ Introduction to Java. JDK Editions. Overview. Lesson 13. Overview

Programming Techniques Programming Languages Programming Languages

Character Stream : It provides a convenient means for handling input and output of characters.

AdJava Automatic Distribution of Java Applications

Managed runtimes & garbage collection

Chapter 4: Multi-Threaded Programming

Interaction of JVM with x86, Sparc and MIPS

A Stack-On-Demand Execution Model for Elastic Computing

Verifying a Compiler for Java Threads

Managed runtimes & garbage collection. CSE 6341 Some slides by Kathryn McKinley

Dispatch techniques and closure representations

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

Bytecode Manipulation Techniques for Dynamic Applications for the Java Virtual Machine

VM instruction formats. Bytecode translator

Seminar report Java Submitted in partial fulfillment of the requirement for the award of degree Of CSE

Manchester University Transactions for Scala

Java Security. Compiler. Compiler. Hardware. Interpreter. The virtual machine principle: Abstract Machine Code. Source Code

StackVsHeap SPL/2010 SPL/20

Complex, concurrent software. Precision (no false positives) Find real bugs in real executions

Transcription:

JavaSplit A Portable Distributed Runtime for Java Michael Factor Assaf Schuster Konstantin Shagin

Motivation Interconnected commodity workstations can yield a cost-effective substitute to super-computers. Suitable for computation intensive applications Need a comfortable programming paradigm Message passing programming is complex Shared memory abstraction is desirable Java is popular and comfortable Supports multithreading and synchronization

The Goal Create a runtime environment that utilizes a set of interconnected machines to execute a standard multithreaded Java application Required features: Transparency (implied by the goal) Cross-platform portability Scalability

Related Work Distributed (non standard) JVMs Java/DSM (1997), Cluster VM for Java (former cjvm) (1999), JESSICA (1999) Sacrifice portability Translation to native code combined with a DSM Hyperion (2001), Jackal (2001) Also not portable Perform compiler optimizations Systems built on top of standard JVMs JavaParty(1997), ProActive (1998), JSDM (2001) Introduce unorthodox programming constructs and style

Our Approach - JavaSplit Works through bytecode instrumentation The bytecodes of the application are tied to the bytecodes of the runtime logic (written in Java) Does not require the source code, which can be unavailable Uses standard JVMs at each node JavaSplit is a distributed JVM built on top of standard JVMs. Any machine with a JVM can be utilized (portability) Can use Just-in-Time compiler (JIT) Able to employ the standard garbage collector No need to install a specialized JVM or any other software Utilizes IP-based communication through Java sockets Incorporates a scalable object-based DSM

Bytecode Instrumentation JavaSplit Runtime modules Multithreaded Java Application Bytecode Rewriter Distributed Java Application

Intercepted Events Thread creation: for shipping threads to other nodes somethread.start(); fi JS.Handler.startThread(someThread); Synchronization: for distributed synchronization synchronized(lock){ } fi JS.Handler.acquire(lock); JS.Handler.release(lock); Field and array element accesses: for data consistency var = obj.intfield; if(obj. JS state == 0) fi JS.Handler. readmiss(obj); var = obj.intfield;

Read Access Check Example ALOAD 1 DUP GETFIELD IFNE DUP INVOKESTATIC GETFIELD // load instance of A // duplicate instance of A on stack A::byte JS state // jump if the state allows reading // duplicate instance of A on stack JS.Handler::readMiss JS.A::intField

Access Check Elimination Examples A aobject = new A(); <WRITE ACCESS CHECK of aobject> aobject.intfield = 2003; // no lock acquires <READ ACCESS CHECK of aobject> for(int k=0; k<n; k++){ // no lock acquires <READ ACCESS CHECK of aobject> System.out.println(k+aObject.intField); // no lock acquires }

Additional Bytecode Transformations The rewritten classes are renamed to enable sound loading and usage of rewritten bootstrap classes All the references to classes in bytecode are replaced with the new names The classes are augmented with utility fields and methods

Original Class Hierarchy java.lang.object java.util.abstractcollection userpkg.userbase java.util.abstractset java.util.abstractlist java.lang.number userpkg.userderived userpkg.otherderived java.util.hashset java.util.treeset java.util.vector java.util.arraylist java.lang.integer java.lang.double java.lang.long

Twin Class Hierarchy java.lang.object JS.java.lang.Object JS.java.util.AbstractCollection JS.userpkg.UserBase JS.java.util.AbstractSet JS.java.util.AbstractList JS.userpkg.UserDerived JS.userpkg.OtherDerived JS.java.lang.Number JS.java.util.HashSet JS.java.util.TreeSet JS.java.util.Vector JS.java.util.ArrayList JS.java.lang.Integer JS.java.lang.Double JS.java.lang.Long

class A extends somepkg.c { } private int intfield; public B reffield; protected void dosomething (java.lang.string str, int n) { } _JS_diff diff = super._js_serialize(out); super._js_compare(other); out.writeint(intfield); if(this.intfield!= other.intfield) { out.writeref(reffield); // add to diff } if(this.reffield!= other.reffield) { super._js_deserialize(in); // add to diff intfield = in.readint(); } reffield = (JS.B)in.readRef(); return diff; class JS.A extends JS.somepkg.C { private int intfield; public JS.B reffield; } protected void dosomething (JS.java.lang.String str, int n) { } // inherited utility fields public byte JS state; public int JS version; public long JS globalid; public void _JS_serialize (OutputStream out) { } public void _JS_deserialize (InputStream in) { } public _JS_Diff _JS_compare (JS.A other) { }

Efficient Synchronization Java application contain a great amount of unneeded synchronization May cause significant performance degradation in instrumented classes We distinguish between synchronization operations on local and shared objects A handler is invoked for shared objects Local objects avoid calling the handler (but rather manage a variable indicating whether the object is locked or not) As a result, synchronization of local objects is 4.5 times cheaper than in original Java

Performance Execution time TSP Speedup JavaSplit Sun JavaSplit IBM Original Sun Original IBM Sun speedup IBM speedup Number of nodes IBM JDK 1.3.0 Sun JDK 1.4.1

Future Work DSM optimizations Load balancing Data distribution Compiler optimizations Inter-procedural access check elimination Static detection of local objects and classes by the means of escape analysis High availability For wide-area cycle stealing An algorithm is ready, need only to implement