Datagrams Under UNIX IPC Domain in 4.2BSD

John DeTreville jdd at allegra.UUCP
Tue Jan 17 16:27:14 AEST 1984


Last week I posted a query about whether datagrams were really unreliable
under 4.2BSD's UNIX IPC domain.  I haven't received any useful replies, so
let me rephrase my question.

Let's say I have some typical set of communicating processes on some
uniprocessor, and I would like to have them communicate via message-passing.
Fine, I think, I'll use sendmsg(2) and recvmsg(2) and send datagrams in the
UNIX IPC domain.  Unfortunately, by definition, datagrams can be lost
without any indication to the sender or receiver, and this is probably not
what I had in mind in my original formulation.

Now, I understand how the Berkeley people wanted to have a pleasingly
orthogonal design, with the same definition for datagrams in any domain, but
this just doesn't seem very \useful/, which is another criterion one could
apply.  Offhand, I can't think of any other operating system providing
message-passing on a uniprocessor that chooses to give no indication of
failure.  One can work around such a feature, but at quite a potential cost
in clarity and/or performance.

(Of course, you can argue that one gains a certain sort of generality when
using datagrams thus, because it makes it easier to move the application
into a distributed environment, where these semantics are less avoidable.
In the particular application I'm concerned with, though, this turns out not
to be a factor.)

The question is, then, whether this is really as poor a design as it seems.

Cheers,
John ("It's Getting Late So I'm Going Home Now") DeTreville
Bell Labs, Murray Hill



More information about the Comp.unix.wizards mailing list