Re: Ada GC (was about Java VM)

boehm@parc.xerox.com (Hans Boehm)
9 Feb 1996 12:05:41 -0500

          From comp.compilers

Related articles
[14 earlier articles]
Re: Ada GC (was about Java VM) mg@asp.camb.inmet.com (1996-02-02)
Re: Ada GC (was about Java VM) boehm@parc.xerox.com (1996-02-02)
Re: Ada GC (was about Java VM) root@linux_pc.org (1996-02-03)
Re: Ada GC (was about Java VM) tmb@best.com (1996-02-04)
Re: Ada GC (was about Java VM) bobduff@world.std.com (1996-02-04)
Re: Ada GC (was about Java VM) truesoft!sw@uunet.uu.net (1996-02-04)
Re: Ada GC (was about Java VM) boehm@parc.xerox.com (1996-02-09)
Re: Ada GC (was about Java VM) eachus@spectre.mitre.org (1996-02-09)
Re: Ada GC (was about Java VM) kdm@Rational.COM (1996-02-13)
| List of all articles for this month |

From: boehm@parc.xerox.com (Hans Boehm)
Newsgroups: comp.lang.java,comp.compilers,comp.lang.ada
Date: 9 Feb 1996 12:05:41 -0500
Organization: Xerox Palo Alto Research Center
References: 96-02-002 96-02-024
Keywords: Ada, realtime, parallel, GC

mg@asp.camb.inmet.com (Mitch Gart) writes:


>question:


>> I was surprised to find out that Java is not really threaded. The
>> virtual machine seems to be doing its own scheduling but there is no
>> OS level threading.


>AVH answers:


>> True. It is very hard to use OS level threads. However, we are
>> working on a Solaris threads port. The problem is garbage
>> collection, you have to be able to reliably suspend all threads and
>> flush their state out of CPUs in order to do gc. This is hard on
>> Solaris threads.


Just to clarify: This does not mean that garbage collection is
inherently hard in the presence of multiple threads. In fact, both
the interface to and implementation of the threads package probably
become somewhat simpler if you assume the existence of a garbage
collector. PCR threads, Modula 3 threads, etc., work fine with a
garbage collector. PCR is also a 2-level threads package, somewhat
like Solaris threads.


It does mean that many existing threads packages don't export the
right functionality to cleanly add a garbage collector. You run into
the same problems if you try to write a debugger or debugger-like tool
that runs as one of the threads. I personally would blame the threads
packages.


It actually is barely possible to run a GC with Solaris threads. Our
collector has worked in this environment for a while. I will admit
the code isn't pretty.


Hans-J. Boehm
(boehm@parc.xerox.com)
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.