System V shm/sem calls under Mach

System V shm/sem calls under Mach

Post by Mike Allar » Sat, 05 Oct 1991 02:56:30

Greetings.  I recently grabbed postgres 3.0 from  I
would like to port this rather interesting RDBMS package to a NeXT.  It is
setup to run under Ultrix, SunOS, and Dynix (I think).  NeXT Mach has none
of the System V shared memory or semaphore calls (at least by their SYSV
names).  Some of the postgres library routines are chock full o' shm/sem
calls, so I don't think rewriting them is an option.  And, I'm afraid I
don't know quite enough about Mach's virtual memory and semaphore

My questions:

1)  How hard would it be to implement such calls under NeXT Mach?
2)  Has anyone already done it?
3)  Does this belong in comp.os.mach?  :-|

Please reply to me via e-mail to any of the following addresses - take your
pick.  I'll summarize if everyone doesn't just think I'm completely off my
nut.  :-)

Thanks in advance.
Mike Allard, Applied Computing Devices, Inc.  ***  Standard Disclaimer is in

"6 Cokes a Day Keeps the Drowsies Away!" -me  ***  any of my opinions anyway.
"Mmmm... I just *love* the smell of fusing engine parts!" -RMA, 2 quarts low


1. Socket/SHM/Sem Ids and child processes

        I have the following situation:  I am responsible for a particular
TLCSC of a software system, which will be composed of several (9, actually)
processes.  There will be one large SHM area, common to all CSCs, and I
intend to have a SHM area local to my own CSC.  There is one process which
controls the others within my CSC, and it is invoked by the highest-level CSC
in the system.

        Okay.  If the main process of my CSC shmgets the id of the global
area, and semgets a semaphore used within my CSC, and then forks/execs to create
the other processes within my CSC, is it safe for me to place those ids within
the local SHM area?  Are these ids the same regardless of which process does
a 'get with a particular key?

        Empirically, I've found this to be true, however I can vaguely recall
reading somewhere (I think it was something on the IBMLink network) to the
effect that this is a Bad Thing.  Anyone know for sure?



2. "Faked" diskquota system needed!

3. SHM** and SEM** kernel parameters in Sol2.4 - HOW ?

4. CyberPro Quad I/O

5. POSIX shm, sem & aio

6. 2.5.55: local symbols in net/ipv6/af_inet6.o

7. How I could add a new system call to linux or modify a system calls

8. Any problems installing KDE from Red Hat?

9. How to use open system call in a new system call

10. "Interrupted system call" at "low level" - system calls

11. system call to get calling processes tty?

12. Calling a Loadable System Call

13. System Call, Library Call and Process Size