[vos-d] S5 and single-thread option
Peter Amstutz
tetron at interreality.org
Fri Apr 20 14:48:17 EDT 2007
On Fri, Apr 20, 2007 at 01:52:39PM -0400, Reed Hedges wrote:
>
> Pete, in your description of S5 so far it seems like it is defining a
> threading model that is not neccesarily coupled to a particular thread
> implementation. That is, conceptually vobjects are threads or proceses
> but I am guessing that you won't be implementing it by simply creating a
> pthread for each vobject :) Does this mean that it will use a thread
> pool of some kind? If so, would it be possible to have a thread pool
> of size 1, thereby making it possible to run VOS on an OS that
> effectively has no threads (I'm thinking of stuff like handheld devices,
> phones, embedded systems, whatever).
Yes, actually one of my goals is to ensure that the system could be run
in a single-threaded mode to be useful for applications like discrete
event simulation. For network code we're likely to want to have at
least one thread that handles socket activity, but if necessary that
could also be something that gets called periodically from the toplevel
event loop. Obviously I would like to avoid the recursive-runloop
stategy employed by s3, so this will require that all behaviors are
written using continuations so that if they have to wait, we can unwind
the stack and control can be returned to the top level.
But normally there would be a thread pool. Ideally, most of the time
most vobjects are "unbound" which means they arn't running on any
thread. Vobjects might even be swapped out to the persistance database
if they arn't being used.
--
[ Peter Amstutz ][ tetron at interreality.org ][ peter.amstutz at gdit.com ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.interreality.org/pipermail/vos-d/attachments/20070420/3ebe5cb0/attachment.pgp
More information about the vos-d
mailing list