[Top][All Lists]

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

record locks and task death

From: Marcus Brinkmann
Subject: record locks and task death
Date: Mon, 14 Oct 2002 00:43:40 +0200
User-agent: Mutt/1.4i


record locks have to be released at task death.  Two strategies seems

1. The client creates a port and provides a send right to the server when
   requsting a lock.  When the port is destroyed (normally at task death)
   the server receives a port death notification which it requested and can
   then clean up the lock structure.  Of course, if the lock is released
   before that the server simply deallocates the send right.

2. The server returns a send right to a special lock port in the server to
   the user when a lock is requested.  When the server receives a no senders
   notification, the lock is cleaned up.  Of course, if the lock is released
   before that, the port is destroyed, turning the user's send right into a
   dead name.

Nr 1 seems to be more appropriate as it puts the resource burden on the
user.  Neither is really pretty.  Nr 2 looks more like as if a lock is an
object in the server, which is also not bad.  Of course, we are tightly
bound to the POSIX semantics, which are just horrible, so we don't have much

Of course, we don't have to guarantee that the task death is the reason for
the lock release.  The implicit behaviour, assuming that the user does not
pass on the send or receive right to other tasks, is good enough to fulfill

What do you think?  I was trying to find something that connects this to the
io_close call, but however I look at it, it doesn't really get nice and


`Rhubarb is no Egyptian god.' GNU    address@hidden
Marcus Brinkmann              The Hurd

reply via email to

[Prev in Thread] Current Thread [Next in Thread]