Re: real POSIX.1b semaphores

Theodore Y. Ts'o (
Tue, 19 Nov 1996 17:55:29 -0500

From: Ulrich Drepper <>
Date: 19 Nov 1996 04:56:43 +0100

For the sake of speed we should try to be able to handle as much
as possible on user level. The both kinds a POSIX semaphore can
be reduced to one form. I thought about the following but please
don't take this as a well-thought design. I have not much experience
with kernel programming.

- reserve two pages in the mmap area of each process. The first page
is for global locks, ie.e., the very same page is shared by all
processes. The second page is shared between all threads of a
process (i.e., clone needs another flag).

Err.... be careful about the security issues. It should not be possible
for a process which doesn't have access to a semaphore to just go into
the shared page and much with the sempahores. This pretty much tosses
out any idea where you use a single global page for all sempahores.....

- Ted