Commit | Line | Data |
---|---|---|
d60e8dff MK |
1 | .\" Copyright (c) 1986 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
6d89475b | 5 | .\" @(#)1.t 1.3 (Berkeley) %G% |
d60e8dff | 6 | .\" |
6d89475b MK |
7 | .\".ds LH "4.3BSD IPC Primer |
8 | .\".ds RH Introduction | |
9 | .\".ds RF "Leffler/Fabry/Joy | |
10 | .\".ds LF "\*(DY | |
11 | .\".ds CF " | |
200989e9 | 12 | .nr H1 1 |
6d89475b | 13 | .LP |
200989e9 | 14 | .bp |
200989e9 MK |
15 | .LG |
16 | .B | |
17 | .ce | |
18 | 1. INTRODUCTION | |
19 | .sp 2 | |
20 | .R | |
21 | .NL | |
6d89475b MK |
22 | One of the most important additions to UNIX in 4.2BSD was interprocess |
23 | communication. | |
24 | These facilities were the result of | |
200989e9 | 25 | more than two years of discussion and research. The facilities |
6d89475b | 26 | provided in 4.2BSD incorporated many of the ideas from current |
200989e9 | 27 | research, while trying to maintain the UNIX philosophy of |
6d89475b MK |
28 | simplicity and conciseness. |
29 | The current release of Berkeley UNIX, 4.3BSD, | |
30 | completes some of the IPC facilities | |
31 | and provides an upward-compatible interface. | |
32 | It is hoped that the interprocess communication | |
d60e8dff | 33 | facilities included in 4.3BSD will establish a |
200989e9 MK |
34 | standard for UNIX. From the response to the design, |
35 | it appears many organizations carrying out | |
36 | work with UNIX are adopting it. | |
37 | .PP | |
38 | UNIX has previously been very weak in the area of interprocess | |
d60e8dff | 39 | communication. Prior to the 4BSD facilities, the only |
200989e9 MK |
40 | standard mechanism which allowed two processes to communicate were |
41 | pipes (the mpx files which were part of Version 7 were | |
42 | experimental). Unfortunately, pipes are very restrictive | |
43 | in that | |
44 | the two communicating processes must be related through a | |
45 | common ancestor. | |
46 | Further, the semantics of pipes makes them almost impossible | |
47 | to maintain in a distributed environment. | |
48 | .PP | |
d60e8dff | 49 | Earlier attempts at extending the IPC facilities of UNIX have |
200989e9 | 50 | met with mixed reaction. The majority of the problems have |
d60e8dff | 51 | been related to the fact that these facilities have been tied to |
6d89475b | 52 | the UNIX file system, either through naming or implementation. |
d60e8dff MK |
53 | Consequently, the IPC facilities provided in 4.3BSD have been |
54 | designed as a totally independent subsystem. The 4.3BSD IPC | |
200989e9 MK |
55 | allows processes to rendezvous in many ways. |
56 | Processes may rendezvous through a UNIX file system-like | |
57 | name space (a space where all names are path names) | |
58 | as well as through a | |
59 | network name space. In fact, new name spaces may | |
60 | be added at a future time with only minor changes visible | |
61 | to users. Further, the communication facilities | |
d60e8dff | 62 | have been extended to include more than the simple byte stream |
6d89475b | 63 | provided by a pipe. These extensions have resulted |
200989e9 MK |
64 | in a completely new part of the system which users will need |
65 | time to familiarize themselves with. It is likely that as | |
66 | more use is made of these facilities they will be refined; | |
67 | only time will tell. | |
68 | .PP | |
6d89475b MK |
69 | This document provides a high-level description |
70 | of the IPC facilities in 4.3BSD and their use. | |
71 | It is designed to complement the manual pages for the IPC primitives | |
72 | by examples of their use. | |
200989e9 | 73 | The remainder of this document is organized in four sections. |
6d89475b | 74 | Section 2 introduces the IPC-related system calls and the basic model |
200989e9 MK |
75 | of communication. Section 3 describes some of the supporting |
76 | library routines users may find useful in constructing distributed | |
77 | applications. Section 4 is concerned with the client/server model | |
78 | used in developing applications and includes examples of the | |
79 | two major types of servers. Section 5 delves into advanced topics | |
80 | which sophisticated users are likely to encounter when using | |
6d89475b | 81 | the IPC facilities. |