[gclist] Java manchines and when to collect.
Charles Fiterman
cef@geodesic.com
Thu, 11 Dec 1997 10:09:11 -0600
At 12:33 AM 12/12/97 +1100, you wrote:
>When people talk about Java chips, I can't really see the need to put
>the bytecode in hardware, but I wonder what support they're putting in
>for efficient GC: that's the hard problem.
Let me explain the advantage and it has nothing to do with performance.
Languages get power from what they can't do more than what they can.
In Java you can't write a virus. There is a bullet proof type system
and when you have a reference to an object of class foo you know
that it isn't pointed at anything else. And you know that all your
array references will be satisfied in bounds.
So Java programs run in a little sandbox and this allows you to
download Java programs on the web and run them and know they aren't
going to eat your machine. The power of the language comes from
its limits. Functional languages are the same way if you can't
write a side effect you gain the power to assign functions to
any processor, lift them out of loops etc. Unfortunately functional
languages are too limited in some ways. While you can write anything
in theory, in practice some of it becomes too inefficient. But if
you can't write a side effect you can't write a virus.
But you can access Java programs any way you want because your
machine isn't Java it only interprets Java. So lets add more power
by changing that with a Java machine. Now if I download your program
I can't use it in an unanticipated way. The Java machine enforces
any software use contract.
Now add public key encryption. I can send you a program that will
run on your machine. You can back it up to your hearts content.
But you can't ever run it on another machine. Software piracy is
locked out. This makes the software business more efficient and
reduces your software costs. There are one copy countries like
S. Korea and the P.R.C. who would suddenly have to pay for software
like real people. So these are major improvements in the efficiency
of our industry.
Now back to garbage collection and the famous expand or collect
decision. To make this decision rationally you need to know about
all storage use on the system. It makes sense to give more space
to a program until you reach the point of triggering paging. Its
like a game of black jack where you add points and add points but
go too far and you lose. A Java machine can have a single heap
shared by everything.
-
Charles Fiterman Geodesic Systems
414 North Orleans Suite 410 Phone 312 832 1221 x223
Chicago IL 60610-4418 FAX 312 832 1230
http://www.geodesic.com
____
.-" +' "-. __, ,___,
/.'.'A_'*`.\ (--|__| _,,_ ,_
|:.*'/\-\. ':| _| |(_||_)|_)\/
|:.'.||"|.'*:| ( | | _/
\:~^~^~^~^:/ __, ,___,
/`-....-'\ (--|__| _ |' _| _, ,
/ \ _| |(_)||(_|(_|\//_)
`-.,____,.-' ( _/