15.01.2015 Views

4th International Conference on Principles and Practices ... - MADOC

4th International Conference on Principles and Practices ... - MADOC

4th International Conference on Principles and Practices ... - MADOC

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Enabling Java Mobile Computing <strong>on</strong> the IBM Jikes<br />

Research Virtual Machine<br />

Giacomo Cabri<br />

Dipartimento di Ingegneria<br />

dell’Informazi<strong>on</strong>e – Università di<br />

Modena e Reggio Emilia<br />

cabri.giacomo@unimore.it<br />

Letizia Le<strong>on</strong>ardi<br />

Dipartimento di Ingegneria<br />

dell’Informazi<strong>on</strong>e – Università di<br />

Modena e Reggio Emilia<br />

le<strong>on</strong>ardi.letizia@unimore.it<br />

Raffaele Quitadamo<br />

Dipartimento di Ingegneria<br />

dell’Informazi<strong>on</strong>e – Università di<br />

Modena e Reggio Emilia<br />

quitadamo.raffaele@unimore.it<br />

ABSTRACT<br />

Today’s complex applicati<strong>on</strong>s must face the distributi<strong>on</strong> of data<br />

<strong>and</strong> code am<strong>on</strong>g different network nodes. Java is a wide-spread<br />

language that allows developers to build complex software, even<br />

distributed, but it cannot h<strong>and</strong>le the migrati<strong>on</strong> of computati<strong>on</strong>s<br />

(i.e. threads), due to intrinsic limitati<strong>on</strong>s of many traditi<strong>on</strong>al<br />

JVMs. After analyzing the approaches in literature, this paper<br />

presents our research work <strong>on</strong> the IBM Jikes Research Virtual<br />

Machine: exploiting some of its innovative VM techniques, we<br />

implemented an extensi<strong>on</strong> of its scheduler that allows applicati<strong>on</strong>s<br />

to easily capture the state of a running thread <strong>and</strong> makes it<br />

possible to restore it elsewhere (i.e. <strong>on</strong> a different hardware or<br />

software architecture, but still with a versi<strong>on</strong> of JikesRVM<br />

installed). Our thread serializati<strong>on</strong> mechanism provides support<br />

for both proactive <strong>and</strong> reactive migrati<strong>on</strong> of single- <strong>and</strong> multithreaded<br />

Java applicati<strong>on</strong>s. With respect to previous approaches,<br />

we implemented the mobility framework without recompiling a<br />

previous JVM source code, but simply extending its<br />

functi<strong>on</strong>alities with a full Java package.<br />

Categories <strong>and</strong> Subject Descriptors<br />

D.3.3 [Programming Languages]: Language C<strong>on</strong>structs <strong>and</strong><br />

Features D.1.3 [C<strong>on</strong>current Programming]: Distributed<br />

Programming; D.3.3 [Programming Languages]: Language<br />

C<strong>on</strong>structs <strong>and</strong> Features.<br />

General Terms<br />

Design, Experimentati<strong>on</strong>, Languages.<br />

Keywords<br />

Java Virtual Machine, thread persistence, code mobility,<br />

distributed applicati<strong>on</strong>s.<br />

1. INTRODUCTION<br />

Modern distributed systems are becoming more <strong>and</strong> more<br />

complex, leading to the need for flexibility, that has to be<br />

Permissi<strong>on</strong> to make digital or hard copies of all or part of this work for<br />

pers<strong>on</strong>al or classroom use is granted without fee provided that copies are<br />

not made or distributed for profit or commercial advantage <strong>and</strong> that<br />

copies bear this notice <strong>and</strong> the full citati<strong>on</strong> <strong>on</strong> the first page. To copy<br />

otherwise, or republish, to post <strong>on</strong> servers or to redistribute to lists,<br />

requires prior specific permissi<strong>on</strong> <strong>and</strong>/or a fee.<br />

PPPJ2006, August 30 – September 1, 2006, Mannheim, Germany.<br />

Copyright 2006 ACM …$5.00.<br />

c<strong>on</strong>sidered very desirable, if not m<strong>and</strong>atory, when large scale<br />

distributed computati<strong>on</strong>s are performed. C<strong>on</strong>venti<strong>on</strong>al software<br />

comp<strong>on</strong>ents, scattered am<strong>on</strong>g network nodes, provide services to<br />

other comp<strong>on</strong>ents or to end users, but are often statically bound to<br />

their hosting envir<strong>on</strong>ment. This view is being challenged by<br />

technical developments that introduce a degree of mobility in<br />

distributed systems. Wireless LANs <strong>and</strong> mobile devices have<br />

already highlighted the potentials of physical mobility [15, 4].<br />

Code mobility is instead reshaping the logical structure of modern<br />

distributed systems as it enriches software comp<strong>on</strong>ents (in<br />

particular, executi<strong>on</strong> units) with the capability to dynamically<br />

rec<strong>on</strong>figure their bindings with the underlying executi<strong>on</strong><br />

envir<strong>on</strong>ments. The c<strong>on</strong>cept is simple <strong>and</strong> elegant; an object (that<br />

may be active or passive) that resides <strong>on</strong> <strong>on</strong>e node is migrated to<br />

another node where executi<strong>on</strong> is c<strong>on</strong>tinued. The main advantages<br />

of mobile computati<strong>on</strong>s, be they object-based or not, are as<br />

follows: (i) load balancing: distributing computati<strong>on</strong>s (e.g. Java<br />

threads) am<strong>on</strong>g many processors as opposed to <strong>on</strong>e processor<br />

gives faster performance for tasks that can be fragmented; (ii)<br />

communicati<strong>on</strong> performance: active objects that interact<br />

intensively can be moved to the same node to reduce the<br />

communicati<strong>on</strong> cost for the durati<strong>on</strong> of their interacti<strong>on</strong>; (iii)<br />

availability: objects can be moved to different nodes to improve<br />

the service <strong>and</strong> provide better failure coverage or to mitigate<br />

against lost or broken c<strong>on</strong>necti<strong>on</strong>s; (iv) rec<strong>on</strong>figurati<strong>on</strong>: migrating<br />

objects permits c<strong>on</strong>tinued service during upgrade or node failure.<br />

(v) locati<strong>on</strong> independence: an object visiting a node can rebind to<br />

generic services without needing to specifically locate them. They<br />

can also move to take advantage of services or capabilities of<br />

particular nodes.<br />

It can be argued that Java has all the prerogatives to make thread<br />

mobility possible: its platform-independent bytecode language<br />

<strong>and</strong> the support for object serializati<strong>on</strong>. Regular Java object can<br />

be easily made persistent or migrated to other machines, by means<br />

of the JVM built-in serializati<strong>on</strong> facility. Java threads are<br />

coherently presented to the programmer as objects as well, but<br />

their serializati<strong>on</strong> does not produce the desired effect of<br />

“capturing their current executi<strong>on</strong> flow <strong>and</strong> resuming it<br />

elsewhere”; it is just the java.lang.Thread object, with its<br />

fields, that is serialized, while the real executi<strong>on</strong> flow is still<br />

tightly bound to the executi<strong>on</strong> envir<strong>on</strong>ment. The Java<br />

programming language does not therefore support the migrati<strong>on</strong><br />

of executi<strong>on</strong> units (e.g. threads), which exists for other languages<br />

<strong>and</strong> specific operating systems [17].<br />

Some kind of framework or “JVM enhancement” is thus needed<br />

to enable mobile computati<strong>on</strong>s in distributed Java applicati<strong>on</strong>s.<br />

62

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!