[422] in Coldmud discussion meeting

root meeting help first first in chain previous in chain previous next last

Re: server stuff

daemon@ATHENA.MIT.EDU (Wed Sep 21 01:40:07 1994 )

From: stewarta@netcom.com (Alex Stewart)
To: deforest@netcom.com (Robert de Forest)
Date: Tue, 20 Sep 1994 22:32:58 -0700 (PDT)
Cc: stewarta@netcom.com, coldstuff@MIT.EDU
In-Reply-To: <199409202320.QAA11440@netcom6.netcom.com> from "Robert de Forest" at Sep 20, 94 04:20:15 pm

> So uh.. yeah..I have objections. What problem are you gonna fix?

The same problem that I've been complaining about ever since the first forays
into scheduling tasks and such were attempted at tCD and that still hasn't been
dealt with as part of the pause/resume additions.  There is no way to
suspend/pause a task in such a way that it can be resumed immediately (the
equivalent of suspend(0) in MOO).  The closest you can get is up to a 1-second
delay between the pausing and resuming of the task because of the limitations
of using the heartbeat timer to restart things.  This can slow things down a
big lot if they're set up to pause at regular intervals to keep the rest of the
system running decently while they do large operations (like @grepping the

The other problem (which is more significant now that tasks can be paused) is
that there's no way to generate new tasks (the equivalent of fork(0)) without
getting new input or waiting for the next heartbeat to come along.

I'm testing the changes I've made to the server now to deal with this.  I
simply added a request_callback system builtin that causes the server to call
$sys.callback at the next reasonable opportunity (generating a new task in the
process).  $sys can thereby generate new tasks (queued to start immediately)
and then call whatever it needs to when it gets the callback to either resume a
paused task or fork off a new operation..

   Alex Stewart - stewarta@netcom.com - Richelieu @ Diversity University MOO