Lambda the Ultimate

inactiveTopic Java to gain multitasking improvements
started 4/8/2004; 10:09:02 PM - last post 4/13/2004; 2:15:05 AM
Chris Rathman - Java to gain multitasking improvements  blueArrow
4/8/2004; 10:09:02 PM (reads: 12056, responses: 6)
Java to gain multitasking improvements
(via JavaLobby)

J2SE 1.6, which is scheduled for a beta release this fall with general availability eyed for 2005, is slated to feature an "isolates" function to boost application-sharing in the JVM, according to Murali Kaundinya, senior Java architect for Sun Software Services. The isolates capability would enable isolated entities to perform localized computation without requiring a second JVM, thus enabling multitasking within the JVM, according to Kaundinya.

Now that there going to allow multiple independent programs to run under a single JVM instance, I guess they're going to have to come up with some protocol for the two programs to talk to each other in a loosely couple protocol (events, semaphores, etc...).

Unless they go that route, I'm not sure what the feature buys, other than rubber stamping a JVM design that can handle more than one program instance (something which an optimizing JVM environment could probably do under the hood, if the implementers were so inclined). But then, I haven't seen the specs on invocation.
Posted to OOP by Chris Rathman on 4/8/04; 10:12:43 PM

Chui Tey - Re: Java to gain multitasking improvements  blueArrow
4/10/2004; 9:37:06 PM (reads: 367, responses: 0)
Currently running multiple Java programs on the typical desktop is not viable as each library is loaded separately into memory.

Separate copies of XML parsers, Swing toolkits, etc add up eventually. Freeing up memory so that developers don't have to try so hard to accommodate Java's general tendency to be a memory hog is a development in the right direction.

Chris Rathman - Re: Java to gain multitasking improvements  blueArrow
4/11/2004; 7:06:35 AM (reads: 329, responses: 0)
That begs the question of why it's necessary to have an isolates function to accomplish this goal. The JVM is just a program. Why can't it implement the singleton pattern without programmer intervention? For example, I can open up multiple graphics in PaintShop or Photoshop, and none of the graphics has to be aware that any of the other graphics is loaded up into memory. I don't have to assign properties to the pictures that say it's ok to open that graphic up with other graphic images. The program is smart enough to load up multiple images in isolation.

On the other hand, if the usage of this feature requires an explicit protocol from the programs, how do I get all the different players to cooperate? Do I have to upgrade all my software to the latest compiler in order to take advantage of what is essentially just an optimization trick?

Chris Rathman - Re: Java to gain multitasking improvements  blueArrow
4/11/2004; 12:01:41 PM (reads: 311, responses: 0)
One other thing that pops into my mind. This is probably a slippery slope for Java. Is the JVM to become a multi-tasking operating system? If so, then it would seem wise to build on the lessons learned from other OS designs. If not, then the incremental approach to creeping into multi-tasking is likely to be kludges built on top of kludges.

If the JVM becomes an OS, would that also not impinge on Sun's other money making market?

Isaac Gouy - Re: Java to gain multitasking improvements  blueArrow
4/11/2004; 11:23:45 PM (reads: 274, responses: 0)
"the only safe way to execute multiple applications, written in the Java programming language, on the same computer is to use a separate JVM for each of them, and execute each JVM in a separate OS process."
Multitasking without Compromise: a Virtual Machine Evolution

john white - Re: Java to gain multitasking improvements  blueArrow
4/12/2004; 12:57:50 PM (reads: 217, responses: 0)
i imagine this will make kernel/user space separation possible as well, which makes the JVM into a JOS (or some other applicable acronym). sun's income derives primarily from hardware, although i wonder how much of this functionality will be implemented in the host OS...

i wrote a very simplistic program that tries to accomodate multiple programs within the same JVM using bytecode manipulation and classloader tricks, without much success. good to see someone gave it more thought than i did.

Luke Gorrie - Re: Java to gain multitasking improvements  blueArrow
4/13/2004; 2:15:05 AM (reads: 188, responses: 0)
Back when I was a Java guy I also wrote a simplistic program to sqeeze programs into the JVM together, just using Applet-style ClassLoader/SecurityManager tricks. That worked pretty well for me.

I tried to follow the Isolate stuff at first, but I never understood exactly what they intend it to be used for. It didn't actually look like the plan was to run lots of unmodified Java programs together in a shared runtime system.