[DGD] Could it work...

Felix A. Croes felix at dworkin.nl
Wed Sep 26 04:00:54 CEST 2001


birgit.schulte at philips.com wrote:

> Following the discussion about rlimits and where to place them, I went and had a look at
> how the kernel lib does it. And a couple of questions popped up, hopefully someone here
> will answer them:
>
> I found that the kernel lib places rlimits according to ressources around every call_out
> (via call_other). I did not find rlimits in the open(), close() and receive_message()
> of the telnet-object, moreover in close() the rlimits where explicitely set to (-1;-1).
>
> So does the kernel lib not completely cover the rlimits-issue? And why is close() even
> run with unlimited ressources? Would be great if someone could enlighten me :-)

In these cases, a higher level mudlib should use call_limited() to assign
resource usage limits appropriate for the user.  The kernel library cannot
decide, in all cases, which user is appropriate.

close() is special, because it might be called from within an existing
thread, if the connection object is explicitly destructed -- but also
in the case of a disconnect, in which case close() is the top-level
function called.  rlimits (-1; -1) is used to guarantee the same
execution environment in all cases.

There are some more instances of functions called without resource
limits by the kernel lib.  For example, the initial call to ~System/initd.
The kernel lib does not really try to ensure that hanging the driver
in an infinite loop is impossible.  Rather, it provides you with the tools
to help you prevent this, and in cases where the resource owner is clear
-- callouts are always relevant to the object they are started in -- the
call to call_limited() is already in place.

Regards,
Dworkin
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list