* Offering Help with sockets, messages and other IPC
@ 1997-05-08 4:00 Jean-Claude Magras
0 siblings, 0 replies; only message in thread
From: Jean-Claude Magras @ 1997-05-08 4:00 UTC (permalink / raw)
Greetings fellow UNIX programmers,
I am working on a C++ class regarding IPC and devised the appended
table. I found the attach HTML page which I crated to be useful. You may
want to take out the border=2 clause for compatibility with your
browser. I retain copyright but you may change/redistribute it freely
as long as the copyright is maintained.
Enjoy,
J.C. Magras
<html>
<title>
<h2> Semantic differences between IPC methods
</h2></title>
<table border=2>
<body>
<th> Name
</th>
<th>Primary Descriptor</th>
<th>close uses Primary Descriptor?</th>
<th>fixed ends?</th>
<th>blocks i/o?</th>
<th>data handle vs close descriptor</th>
<tr>
<td>Unix Domain</td>
<td>integer </td>
<td> yes </td>
<td>yes</td>
<td>yes</td>
<td>seperate</td>
<tr>
<td>Files</td>
<td>ofstream+ifstream</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>seperate</td>
<tr>
<td>Internet Sockets</td>
<td>integer </td>
<td> yes </td>
<td> yes </td>
<td> yes </td>
<td>seperate</td>
<tr>
<td>Shared Memory</td>
<td>integer </td>
<td>two step:integer+void*</td>
<td>no-unstructured</td>
<td>no</td>
<td>*SAME*</td>
<tr>
<td>Mapped File</td>
<td>integer+void*</td>
<td>no--void*</td>
<td>no-unstructured</td>
<td>no</td>
<td>*SAME*</td>
<tr>
<td>Message Queue</td>
<td>integer </td>
<td>yes</td>
<td>no-sends to last user</td>
<td>yes</td>
<td>seperate</td>
<tr>
<td>Semaphores</td>
<td>integer</td>
<td>yes</td>
<td>multicast</td>
<td>yes</td>
<td>seperate</td>
<tr>
</table>
<p>
<textblock>
Only counting semaphores hold any user data and vary little at that.<nl>
Semaphores are mostly just signals. Shared Memory/Mapped Files offer<nl>
no data pool access serialization whatsoever. All but sockets need<nl>
file type access rights which are controlled by ioctl(files) or
semctl,shmctl or msgctl.<nl>
The mapped file must be opened with open() (created if necessary)
and<nl> retains its contents even after reboot (as do Unix Domain
sockets).. a security<nl> hazard. The descriptor is then closed and
further manipulations are thru the<nl> address of its own data pool
pointer. Shared memory segments need to<nl> call shmat() and shmdt().
<nl>
</p></textblock>
<b><nl>SEE ALSO</b>
<textblock><p>
mmap(2),munmap(2),shmat(2),shmdt(2),shmget(2),semget(2),msgget(2),semop(2),bind(3N),<nl>
socket(3N),accept(3N),getsockname(3N),select(3C),open(2),close(2),truss(1)<nl>
</p></textblock>
<b><nl>NOTES</b>
<textblock><p>
truss is an excellent system call loging device for catching ipc
errors<nl>
unfortunately, it is only available on Solaris.<nl>
</p></textblock>
<b><nl>References</b>
<p>Stevens, W. Richard, Unix Network Programming,Prentice Hall, ISBN
0-13-949876-1<nl>
Curry, David A.,Unix Systems Programming for SVR4, O'Reilly, ISBN
1-565592-163-1<nl>
</p>
</body>
</html>
--
Unix Software Engineer looking for C++/UNIX/Motif/Perl/Tk/Flex
Software Engineering position **NOW**. Currently in Austin at
(512) 672-5778/magrasjc@texas.net. have Answering machine.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-05-08 4:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-05-08 4:00 Offering Help with sockets, messages and other IPC Jean-Claude Magras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox