Subject: Regarding suspend(0) and lag

From: [email-masked] (Theodore F Vaida ][)
Date: Mon, 22 Feb 1993 04:42:25 -0800

Since the Lambda MOO server is non-premptive on task execution, it implicitly
relies on progammers to be nice and include "suspend(0);" or such inside
loops or breaking up secions of code to allow for smoother operations.
Have you checked the code on the LambdaCore for these?  I remember
something in one of your release otices about a new execution style for
suspend() instructions within the server.  Do they actually cost a process
any time?  I'm considering just going stright through my MOO with a
surgical hand and adding a suspend(0); in EVERY verb that loops or takes
any signifigant time.  Anyone have any reasons I should not?

---------=======================================================---------
                  ->POLAR CAPS<- or [email-masked]
Student Konsultant Making the world safe for computing!
"Never before have we owed so little to so many..."- R.T.Folk
"One must not confuse John Dunne's famous quote `No man is an Island' with
 New York Telephone's `We're all connected'" - Dad
"Trust no one, and be honest with all"  _Claudius_the_God_, and Dad
   Paranoid, but it'll keep you out of trouble...
	   PGP2.0 Public encryption key is availble on request.
---------=======================================================---------

---

From: Pavel Curtis <[email-masked]>
Date: Wed, 24 Feb 1993 17:50:38 -0800

> Date:	Mon, 22 Feb 1993 04:42:25 -0800
> From:	[email-masked] (Theodore F Vaida ][)
> 

This is true to an extent; there is, however, a limit on how long a task is
allowed to run without suspending, so we don't have to depend on them as much.
Unfortunately, right now, the limits are probably too high for foreground
(command) tasks, allowing one task to run for as much as fifteen seconds if
they can avoid running out of ticks.

> something in one of your release notices about a new execution style for

That new execution style for suspend() is *not* yet implemented, or even
fully designed.  Every time you execute a suspend(), your task *will* be
suspended and will have to wait its turn to run again.  This would be
unacceptably slow for most applications.

Also, you want to be very careful about where you insert suspensions, since
many MOO applications depend on the atomicity provided by the explicit
processor-yielding style.

Before trying such a scattergun approach, you might consider just recompiling
the server after lowering the value of FG_SECONDS in options.h.

	Pavel