JIT-Compiler-Assisted Distributed Java Virtual Machine Wenzhang Zhu, Cho-Li Wang, Weijian Fang and Francis C. M. Lau The Systems Research Group Department of Computer Science and Information Systems The University of Hong Kong Presented by Cho-Li Wang
JIT-Compiler-Assisted Distributed Java Virtual Machine. Wenzhang Zhu, Cho-Li Wang, Weijian Fang and Francis C. M. Lau The Systems Research Group Department of Computer Science and Information Systems The University of Hong Kong Presented by Cho-Li Wang. Outline. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Wenzhang Zhu, Cho-Li Wang, Weijian Fang and Francis C. M. Lau
The Systems Research Group
Department of Computer Science and Information Systems
The University of Hong KongPresented by Cho-Li Wang
TCHPC 2004, Taiwan, Mar, 2004 2
OutlineDistributed Java Virtual Machine (DJVM)Design tradeoffsRelated workJESSICA2 DJVM JIT-compiler-assisted dynamic thread migration Global Object Space (GOS) for location-transparent object
access
Experimental results + A demoConclusion & future work
TCHPC 2004, Taiwan, Mar, 2004 3
Distributed Java Virtual Machine (DJVM)
A distributed Java Virtual Machine (DJVM) consists of a group of extended JVMs running on a distributed environment to support true parallel execution of a multithreaded Java application.
A DJVM provides all the JVM services, that are compliant with the Java language specification.
DJVM provides an illusion that the program is running on a single machine (yet more powerful) -- Single System Image (SSI)
Heap
Bytecode Execution Engine
ClassThread
DJVM
(Single System Image)
import java.util.*;class worker extends Thread{ private long n; public worker(long N){ n=N; } public void run(){ long sum=0; for(long i=0; i<n; i++) sum+=i; System.out.println(“N=“+n+” Sum="+sum);}}public class test { static final int N=100; public static void main(String args[]){ worker [] w= new worker[N]; Random r = new Random(); for (int i=0; i<N; i++) w[i] = new worker(r.nextLong()); for (int i=0; i<N; i++) w[i].start(); try{ for (int i=0; i<N; i++) w[i].join();} catch (Exception e){}}}
Java thread
JVM JVM JVM JVM
TCHPC 2004, Taiwan, Mar, 2004 4
Design Tradeoffs of a DJVMHow to manage the threads? Distributed thread scheduling Initial thread placement vs migration
How to store the data ? Object store : A global heap shared by threads ? Memory consistency : Java memory model ? Can an off-the-shelf DSM be used ? Or others ?
How to process the bytecode ? Execution Engine : Interpretation, Just-in-Time (JIT)
compilation, static compilation High performance ?
JESSICA2 Main FeaturesCluster-aware bytecode execution engine (JITEE) JVM operated in Just-In-Time (JIT) compilation mode Cluster-aware : global naming scheme for threads, objects,..
JIT-compiler-assisted dynamic thread migration Runtime capturing and restoring of thread execution context. No source code modification; no bytecode instrumentation
(preprocessing); no new API introduced Enable dynamic load balancing
Global Object Space (GOS) Provide location-transparent object access for threads Tightly integrated with JVM, Memory consistency : compliant with Java Memory Model (JMM) Various optimizing schemes : adaptive migrating home, synchronized
method shipping, object pushing I/O redirection
TCHPC 2004, Taiwan, Mar, 2004 8
JESSICA2 thread migration (In a JIT-enabled JVM)
Thread
Frame
(1) Alert
Frames
Method AreaJVM
Frame parsingRestore execution
Frame
Stack analysisStack capturing
Thread Scheduler
Source node
Destination node
Migration Manager
LoadMonitor
Method Area
RTC
RTC
FramesBTC
(2)
(3)
PC
PC
RTC: Raw Thread ContextBTC : Bytecode-oriented Thread Context = thread id + Java frames (class name, method signature, PC, Operand stack ptr, local vars …)
Transformation of the RTC into the BTC directly inside the JIT compiler