[Top][All Lists]

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

Re: local vs global object IDs

From: Marcus Brinkmann
Subject: Re: local vs global object IDs
Date: Tue, 3 Jun 2003 17:47:07 +0200
User-agent: Mutt/1.5.4i

On Tue, Jun 03, 2003 at 04:24:33PM +0200, Niels Möller wrote:
> Marcus Brinkmann <address@hidden> writes:
> > Local object IDs where considered shortly in a conversation between Neal
> > and me last year, but we went for global object IDs because, IIRC, it just
> > seemed simpler at that time.  Now being closer to an actual implementation,
> > I am starting to change my mind on this.
> What you say makes sense to me. I think task id:s should be an
> exception, though, as we want them encoded into the (global) thread
> id:s, right?

Task IDs != Object IDs.

A task gets an ID.  However, the task itself can be represented by an object
with a different (local) ID.  The task ID object that allocates references
to a task can be yet another object represented by a local ID as well.

The task ID in the thread ID is a system wide unique identifier of the task. 
The requirement is that all threads in the same address space have the same
task ID.  The task ID can further be used to request task ID handles for the
task with that ID.  Note that if this is your only way to get a reference to
the task ID object, then there is a race, as the task ID might be reused
before the call is processed by the task server.

Note that normally, task ID handles will be established under further
guarantees made by other tasks (the sender of an object handle for example).
So usually this is not a problem.  Even for the more complex cases of the
proc server or filesystem delegation the server can at least guarantee that
the task ID handle returned refers to the intended task and not to some
other task.

I don't know about any reason why task and task ID objects should be
different from any other objects in that regard.  It made sense to use task
IDs as object IDs if you consider object IDs to be global identifiers. 
However, the same issues for internal management of objects and access
rights make it correct for the task server to use local IDs for such objects
as for any other server.


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

reply via email to

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