Re: using shared memory in Performer

New Message Reply Date view Thread view Subject view Author view

Jim Helman (jimh++at++surreal)
Wed, 13 Sep 95 21:57:57 -0700


In the use of shared memory, regardless of whether it's from Performer
or shmget, you should never see a "time lag" between processes, i.e.
data not identical in both processes, nor should there be anything
that could slow down reads from shared memory once it's in use. It is
possible for initial accesses to slow things down a bit when a memory
mapped file is involved, but we see this even in Performer when using
fPFTMPDIR instead of the default shared memory allocation from swap
space (/dev/zero).

But there is a very significant speed difference between the IRIX
semaphores and locks (usinit(), ussetlock(), uspsema(), ...) and the
System V IPC semget()/semop(). The former are highly tuned and really
try to avoid a trip into the kernel, which takes a relatively long
time. But from a quick look at libc, it looks to me as though every
semop() call drops into the kernel, which can be deadly if you are
trying to synchronize frequently or at a fine grain.

rgds,

-jim helman

jimh++at++surreal.asd.sgi.com
415/390-1151


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:53 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.