1 .\" $NetBSD: 1.t,v 1.2 1998/01/09 06:55:11 perry Exp $
3 .\" Copyright (c) 1986, 1993
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)1.t 8.1 (Berkeley) 8/14/93
32 .\".ds LH "4.4BSD IPC Primer
33 .\".ds RH Introduction
34 .\".ds RF "Leffler/Fabry/Joy
47 One of the most important additions to UNIX in 4.2BSD was interprocess
49 These facilities were the result of
50 more than two years of discussion and research. The facilities
51 provided in 4.2BSD incorporated many of the ideas from current
52 research, while trying to maintain the UNIX philosophy of
53 simplicity and conciseness.
54 The 4.3BSD release of Berkeley UNIX
55 improved upon some of the IPC facilities
56 while providing an upward-compatible interface.
57 4.4BSD adds support for ISO protocols and IP multicasting.
58 The BSD interprocess communication
59 facilities have become a defacto standard for UNIX.
61 UNIX has previously been very weak in the area of interprocess
62 communication. Prior to the 4BSD facilities, the only
63 standard mechanism which allowed two processes to communicate were
64 pipes (the mpx files which were part of Version 7 were
65 experimental). Unfortunately, pipes are very restrictive
67 the two communicating processes must be related through a
69 Further, the semantics of pipes makes them almost impossible
70 to maintain in a distributed environment.
72 Earlier attempts at extending the IPC facilities of UNIX have
73 met with mixed reaction. The majority of the problems have
74 been related to the fact that these facilities have been tied to
75 the UNIX file system, either through naming or implementation.
76 Consequently, the IPC facilities provided in 4.2BSD were
77 designed as a totally independent subsystem. The BSD IPC
78 allows processes to rendezvous in many ways.
79 Processes may rendezvous through a UNIX file system-like
80 name space (a space where all names are path names)
82 network name space. In fact, new name spaces may
83 be added at a future time with only minor changes visible
84 to users. Further, the communication facilities
85 have been extended to include more than the simple byte stream
86 provided by a pipe. These extensions have resulted
87 in a completely new part of the system which users will need
88 time to familiarize themselves with. It is likely that as
89 more use is made of these facilities they will be refined;
92 This document provides a high-level description
93 of the IPC facilities in 4.4BSD and their use.
94 It is designed to complement the manual pages for the IPC primitives
95 by examples of their use.
96 The remainder of this document is organized in four sections.
97 Section 2 introduces the IPC-related system calls and the basic model
98 of communication. Section 3 describes some of the supporting
99 library routines users may find useful in constructing distributed
100 applications. Section 4 is concerned with the client/server model
101 used in developing applications and includes examples of the
102 two major types of servers. Section 5 delves into advanced topics
103 which sophisticated users are likely to encounter when using