l4-hurd
[Top][All Lists]
Advanced

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

Re: Tread/Task IDs


From: Marcus Brinkmann
Subject: Re: Tread/Task IDs
Date: Tue, 6 May 2003 23:58:21 +0200
User-agent: Mutt/1.5.3i

On Tue, May 06, 2003 at 11:46:13PM +0200, Peter 'p2' De Schrijver wrote:
> It would still be worthwhile to think about using the PID for that. I'm always
> worried about lots of global state. It tends to be not cleaned up and cause
> resource leakage :(

Well, one could use the version id for what it was intended and just bump it
up by one.  Then you have to contact the task server if you want to map a
thread id to a task id.  Everything else remains the same.  I just think
that using the task id directly as version id is ultra convenient, also
because it allows you to accept messages from all threads in a task without
any extra work (and thus make "send rights" task-wide easily).

About the references to PIDs:  That (or another race-avoiding strategy)
would still be necessary because of the small version ID.  I am open for
suggestions.

As far as the resource leak is concerned: Releasing the PID-holding
reference will be part of the standard RPC libraries and hidden from the
normal user.  In case of errors or malicious users, ps will show the stalled
PIDs as good as it shows zombies or fork bombs today.  PID references will
automatically be cleaned up by the task server when a task holding such
references dies.

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    address@hidden
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
address@hidden
http://www.marcus-brinkmann.de/




reply via email to

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