Subject: Re: Pulling simple syscalls out from the giant lock
To: Ignatios Souvatzis <is@NetBSD.org>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: tech-kern
Date: 06/07/2005 15:53:40
Ignatios Souvatzis <is@NetBSD.org> writes:

> Why? Maybe I'm missing something, but what keeps the parent from dying
> after the syscall returns in the child, but before the child uses the
> information? If nothing, as I think, what changes when the parent dies
> using a different cpu? Oh wait, getppid & friends have to pull the ppid
> value out of the parent's nose... I wonder whether it would be better to
> cache the ppid value in the children and update it when the parent dies.

Perhaps I'm being too pessimistic, but I don't like to assume that any
variable updates are atomic. It's okay if the result is the old parent
or the new parent, but it's not okay to get (say) the top bits from
the old parent and the bottom bits from the new parent.

        - Nathan