Glen Starchman <[EMAIL PROTECTED]>
> No, I am literally meaning having multiple instances of a single VM for 
> executing bytecode in parallel. 
> 
> What I am really trying to do is emulate user-level threading within my 
> language without having to rewrite great chunks of its core. My thought is 
> that if I spawn a new VM for each user "thread" and then synchronize the 
> execution results at some point I could have a very rough emulation of 
> threading. 

Oh, I see.  I've done things like that in my own code (that source is
not publically available, sorry) though only with cooperative
multitasking (which wasn't a problem as I controlled the compiler and
language being compiled too.)  How do you propose to handle blocking
syscalls[*]?  (Portable) name resolution[**] is among the thorniest
issues ahead...  :^(

Aside from that, simulating MT with a cunning VM should be possible; I
believe that is what early versions of Java on Solaris did (try
looking for stuff on how "green threads" versions of Java were done.)

HTH.

Donal.
[* My code ignored the issue as it was doing hardware simulation. ]
[** Talking raw DNS is not portable due to issues with other name
    resolution services like NIS and, conceivably, LDAP. ]
-- 
Donal K. Fellows, Department of Computer Science, University of Manchester, UK.
(work) [EMAIL PROTECTED]     Tel: +44-161-275-6137  (preferred email addr.)
(home) [EMAIL PROTECTED]  Tel: +44-1274-401017   Mobile: +44-7957-298955
http://www.cs.man.ac.uk/~fellowsd/  (Don't quote my .sig; I've seen it before!)

Reply via email to