Date: Thu, 14 Nov 1996 11:52:53 +0900 (JST) From: Michael Hancock <michaelh@cet.co.jp> To: Andrew Stesin <stesin@gu.net> Cc: FreeBSD Hackers <hackers@freebsd.org> Subject: Re: Programming technique for non-forking servers? Message-ID: <Pine.SV4.3.95.961114113713.18257A-100000@parkplace.cet.co.jp> In-Reply-To: <Pine.BSI.3.95.961113162044.14098B-100000@creator.gu.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 13 Nov 1996, Andrew Stesin wrote: > But I have an impression that there's easier > to implement locking of shared memory and file > resources inside a single-process server than > with some kind of IPC. There is SysV IPC around, > but it has it's limitations. Using mmap() as a shared > memory pool? isn't so clear and transparent for me (at least > now), and generally isn't documented; so the question > remains opened, that's why I'm asking about > where a Fine Manual resides which should be read. I read about "4.4BSD" semaphores in the Frontiers book, they were described like this: value = mset(sem, WantMeToBlock); mclear(sem); msleep(sem); mwakeup(sem); You would use mmap to create a shared memory region and use the flag HASSEMAPHORE. mset and mclear would be implemented as lib functions because Intel does have an atomic test and set. A check could be done on the sem without making a system call. These guys don't exist. I wonder where Vahalia got his information from. Regards, Mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.95.961114113713.18257A-100000>