problems with shared memory
yeongw at gandhi.nyser.net
yeongw at gandhi.nyser.net
Wed Aug 30 06:28:56 AEST 1989
Hi,
I'm writing a multi-process application that uses shared memory, and am
having some difficulty trying to get shared memory to work. So far, I've
tried the following hardware/software combinations, with results in using
shared memory as follows:
hardware software result
SUN4/280 SUNOS 4.0.3 works sometimes
SUN 3/260 SUNOS 3.5 has never worked
SUN 3/60 SUNOS 4.0.3 has never worked
Solbourne 4/602 Solbourne OS/MP works sometimes
When things don't work, I consistently get an EINVALID error from
shmget(). My application attempts to obtain three shared memory buffers
which together are between 100bytes and 20KB in size (depends on some
compile constants), if that is significant. The larger the buffers I try
to obtain, the less likely the calls to shmget() will succeed.
Questions:
1) Has anybody ever managed to get shared memory on a SUN4
running SUNOS 4.0.3 (which is the environment I'm primarily
interested in) to work consistently?
2) It appears to be impossible to obtain a single block
of shared memory > PAGESIZE (as defined in <machine/param.h>)
in size. This appears to be because the shared memory system
exists in virtual memory, and not real memory. Is that
true, that the SUN shared memory implementation uses virtual
memory and not real memory?
3) Are there any sample programs that run on SUNs of any kind,
under any version of SUNOS which use shared memory that I
could look at?
Thanks in advance.
Wengyik Yeong
NYSERNet Inc.
yeongw at nisc.nyser.net
More information about the Comp.sys.sun
mailing list