MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: [SERVER] Secure VM



On Mon, 11 Nov 1996, Michael Brundage wrote:

> Look guys, do you always preflight the number of ticks your code will 
> take?  Or correctly handle cases in which you (or verbs you call) violate 
> the max recursion depth limit?
> 
> Both of these (essentially time) limits currently exist, mainly to stop 
> runaway tasks from recursing or running forever, and both limits can be 
> changed from one db to another.  We need space limits as well, to ensure 
> that runaway tasks don't consume all available memory.  In practice, most 
> code will probably not need to worry about these limits any more than 
> they need to worry about tick limits or recursion limits.

One point here. You can check to see if your task is about to run out of
ticks or seconds, and with a simple suspend(..) you will, after a little
stop, be allowed to continue.

But if your task is making a list too long, even if you know in advance it
will be too long, you will have to make serious changes to the way the
task is programmed to cope with it. And, the way most people would handle
it, is by copying the list into a new list, and go continue the task. When
the 'list making' part is over, the task just goes through all the lists,
and does what is expected.

The only advantage here, as far as I can see, is that the server doesn't
have to handle very long lists. The task will still use the same amount of
memory.

But, a very large value for this, could stop some attempts to crash the
server. Even though I am sure, as long as there is a MOO, there will be
ways to crash it.

Kristian


---
Kristian Fuglevik		
kristian@lrc.csun.edu			DaMOO
DaGroup, Northridge, Ca.	http://lrc.csun.edu:8888
http://www.Da-Group.com/dg



References:

Home | Subject Index | Thread Index