From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: fee84,a3ae14aeae49226 X-Google-Attributes: gidfee84,public From: Jeff Denham Subject: Re: mutex between processes? Date: 1998/08/05 Message-ID: <35C85511.E31EBB9E@brighttiger.com>#1/1 X-Deja-AN: 378151504 Content-Transfer-Encoding: 8bit References: Content-Type: text/plain; charset=iso-8859-1 X-Trace: newsreader.digex.net 902321327 207.86.119.34 (Wed, 05 Aug 1998 08:48:47 EDT) Organization: Bright Tiger Technologies MIME-Version: 1.0 NNTP-Posting-Date: Wed, 05 Aug 1998 08:48:47 EDT Newsgroups: comp.unix.osf.osf1 Aurel Balmosan wrote: > Currently we use ipc semaphores to sync access of different > processes to a shared memory region. This appears to be quite > slow. About 25-30% system time are required due to the system > calles made. > > Now we want to use mutex. (posix mutex) It does appear that > this can not be used easily for sync different processes on > shared memory (or mmap memory) For SUN-Solaris-2.5.1 it is > written in the manual to the pthread_mutex that it can be used > also for different processes via mmap or shared memory. > (not only for tasks within a process) > > Is there something equal on OSF1 (DecUnix-4.0[abcd]) Important > is that no system call need to be made. The interprocess mutexes are called PSHARED (process-shared) by POSIX. They're supposed to be available in the next major release of, ahem, Compaq's Digital UNIX. I've lost track of when that release is due to ship. Sorry to disappoint on another front: a PSHARED implementation is probably going to make a system call when there's contention on the mutex. With no contention, the thread can lock and go, but with contention, it's probably going to block in the kernel, and that takes a system call. __________________________________________________ Jeff Denham (jdenham@brighttiger.com) Bright Tiger Technologies SmartCluster� Software for Distributed Web Servers http://www.brighttiger.com 125 Nagog Park Acton, MA 01720 Phone: (978) 263-5455 x177 Fax: (978) 263-5547