
\begin{abstract} 

In this paper we describe a system for programming heterogeneous computing
environments based upon Java and software Distributed
Shared Memory $($DSM$)$.
Compared with existing approaches for heterogeneous
computing, our system transparently handles both the 
hardware differences and the distributed nature of the system. It is therefore
much easier to program.


Java is a good candidate for heterogeneous programming because
of its portability. 
Java provides the Remote Method Invocation $(RMI)$ mechanism for distributed
computing. However, our early experience with RMI showed that the programmer
must spend significant effort on such problems as data replication and the
optimization of the remote interface to improve communication efficiency. 
Furthermore, the need for reference marshaling is not completely eliminated
by RMI's effort to facilitate the sharing of linked structures between
machines.


A DSM system provides a shared memory abstraction over a group of physically
distributed machines. It automatically handles data communication between 
machines and eliminates the need for the programmer to write message--passing
code. A multithreaded Java program written for a single machine will require
fewer changes to run on a Java/DSM combination than with RMI.

%In a distributed system, the communication is often expensive. We designed
%our data type conversion and garbage collection algorithms in such a way that
%only data actually required by the applications is transmitted.

We have been implementing a JDK-1.0.2 based parallel Java Virtual Machine 
on the {\em TreadMarks} DSM system. Our implementation includes a distributed
garbage collector and supports the Java API with very few changes.
In this paper we will describe our
motivation and the implementation, and report our early experience with
programming under both RMI and DSM.

\end{abstract}

