lkml.org 
[lkml]   [1996]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: real POSIX.1b semaphores

From: Ulrich Drepper <drepper@myware.rz.uni-karlsruhe.de>
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

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:1.414 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site