Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Thread Tools Display Modes
Posts: n/a
Default 03-24-2008, 10:41 PM

Originally Posted by DrJim View Post
That would almost rival a self-eating watermellon.

The question I have is what ends virtual machine execution if you have multiple programs running that use it - are several copies of it also executing or are the programs run as multiple threads on one virtual machine? In either case, there must be shared memory management both within (or between) the virtual machine(s) and other programs running under the master OS. I had assumed (that bad word again) that this was where the problems that caused the need for the reboot came in.
Although I have never given this matter any serious thought, I believe that if you want to run two Java programs concurrently, you must start the java.exe (VM) program twice, once for each Java program.

It is my impression that one executing Java VM has no more connection or communication with another executing Java VM than it might have with Excel, Word, FrontPage, Firefox, or any other program that could be and often is executing concurrently with the Java VM.

I am almost positive that it is not possible to cause two executing VMs to communicate with one another except through some intermediate third-party mechanism such as a file or a third executing process.

(The above comments apply only to Java applications running locally. Other rules apply when Java is running on a web server executing servlets in response to web client requests. In that case, as I understand it, different servlets do run on different threads under the auspices of a single executing VM.)

I'm reasonably certain that if you started Open Office and Alice 2.0 to run concurrently, they would be running under different VMs and would simply look to the OS like two different programs. However, I have never expended the time required to figure out how Alice actually uses Java, so I have some uncertainty where Alice is concerned.

Most browsers also contain a Java VM and it is very likely that a Java applet could be executing within the browser's VM at the same time that Alice and Open Office are executing.

However, within a single Java program, it is possible to have many threads running concurrently and it is not uncommon for inexperienced programmers who dip their toes into the multi-threaded programming environment to cause two or more threads to deadlock. Even then, however, it is normally possible to recover simply by terminating the VM (Ctrl-C at the command prompt) without the requirement for a reboot.

I have been writing and running Java programs since 1997, and I don't recall ever having to reboot my computer for any cause that I could attribute to an executing Java program. However, that certainly doesn't mean that there aren't circumstances that do require a reboot. Maybe I have just been lucky. Also, I have never written a Java program as large as either Alice 2.0 or Open Office.

Dick Baldwin
Free Alice tutorials:
Free programming tutorials:
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.