Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Keith Shortridge <ks>
Subject: Re: System V IPC, [2]
Date: 1996/04/29	[thread overview]
Message-ID: <DqnEnz.K46@rp.CSIRO.AU> (raw)
In-Reply-To: 4ljgpn$nr@cucumber.demon.co.uk


andrew@cucumber.demon.co.uk (Andrew Gabriel) wrote:

>>To all UNIX programmers, of all taste, can anyone tell me if the
>>following system call are supported/implemented on your system ?
>>
>>shmget, shmat, shmctl,			-- shared memory call
>>msgget, msgsnd, msgrcv, msgctl, 	-- message queue call
>>semget, semop, semctl,			-- semaphore call
>>

They've been available on all the UNIX platforms I've looked at, although
that's 
by no means an exhaustive list. However, I have hit problems on SunOS systems
(SunOS 4, what most people call SunOS except for Sun who like to think of it
as Solaris 1..). On this the system V IPC stuff is optional, and you can 
certainly hit systems where it hasn't been configured in. I have in the past
had to persuade system managers to include it just to get some of my stuff to
run. Even if it's included, it often isn't included with enough resources. I've
had to get number of semaphores increased, and if you want a lot of shared
memory (megabytes) then you'll certainly have to get this increased on many
systems. On SunOS you're probably better off using mmap(). But, of course, some
older systems (ULTRIX, for example) don't have mmap(). It's very awkward.
I've ended up with system dependent include files that control whether my code
uses mmap() or system V IPC for shared memory. Message queues and semaphores
are generally less of a problem (for me at least, because my stuff uses a lot
of shared memory and not many semaphores). Rich Stevens' book suggests using
file locking as an alternative to seamphores, and there are other alternatives
to message queues. System V IPC is awkward to use, because for one thing it
tends to hang around after your program shuts down and continues to get in the
way (particularly if your program crashes without releasing it all properly).




  parent reply	other threads:[~1996-04-29  4:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-04-23  4:00 System V IPC, [2] Meir Dukhan
1996-04-23  4:00 ` Andrew Gabriel
1996-04-24  4:00   ` Neil Cook
1996-04-29  4:00   ` Keith Shortridge [this message]
1996-08-12  4:00     ` Problem with message queue Simon-Pierre Cote
1996-05-04  4:00   ` System V IPC, [2] Andrew Gabriel
1996-04-23  4:00 ` Josh Stern
1996-04-24  4:00 ` Paul Stephen Borile
1996-04-30  4:00 ` Dmitry Kohmanyuk
1996-05-03  4:00   ` Kevin Gee
1996-05-06  4:00     ` Ferdinand de Boevere
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox