The source code for all programs is available here as tared gzip file. It can be extracted with
% gtar zxvf prgsource.tgzon most UNIX systems that have the utilities GNU-tar and gzip installed.
The source code for the different programs are stored in different directories. This makes it easier to remember the purpose of a program or file.
Directory Name | Purpose |
common | commonly used classes and subroutines |
local | example programs for local interprocess communication |
distSOCKET | example programs for distributed interprocess communication, socket version |
distTLI | example programs for distributed interprocess communication, TLI version |
performance | performance measurement programs |
environment | example programs which get information about the environment in which they are executed |
rpc | a modified RPC example from [Stev90] |
The programs were written portability in mind, as they had to run on
three different computer platforms. The platform dependent parts normally
deal only with the absence of include files and other easy to fix problems.
The layout of all programs is derived from [POSIX.1].
Nearly all programs were tested and run under the systems described in
Chapter 7.
The examples in the distTLI directory could only be tested on
aidan, as this was the only platform that had the TLI support
enabled.
Nearly all programs needed a common set of utility functions.
Therefore these functions
were collected in the common directory. The link-library
libcommon.a, together with the include file common.h allows
all programs to access these functions easily.
The programs were not designed to be as short as possible on paper, they
were designed to be maintainable. Therefore the layout of all programs
is spacious. This was of great help whilst the programs were being
developed.
Makefiles were used to keep control over the large number of programs and data
files.
The common defines in Makefile.def and Makefile.def2 allows
all other Makefiles in the subdirectories to be reasonable short.
Definitions suitable for the used system are read in automatically.
To compile the programs on a new platform, only a new file
Makefile.hosttype is needed, where hosttype
is the contents of the environment variable $
HOSTTYPE.
This allows the compilation of the code on different platforms without
any changes in the makefiles.
The common directory (see Table 31) contains
various functions and classes that are used by the example or
performance measurement programs. Most of the files are used to
build a link-library libcommon.a, which is used together
with common.h in the main directory to be available
for all the other programs.
The local directory (see Table 32) contains the
example programs for Chapter 3. They implement various
local IPC mechanisms.
The distSOCKET directory (see Table 33)
contains the socket version of the programs described/referred to in
Chapter 6 and Chapter 8, while the directory
distTLI contains the corresponding TLI example programs
(see Table 34).
File Name | Purpose | Page |
Makefile | Makefile for this directory | |
udpclient.c | show how to use UDP, client, socket version, needs udpserver(.c) as UDP server | |
udpserver.c | show how to use UDP, server, socket version, needs udpclient(.c) as UDP client | |
tcpclient.c | show how to use TCP, client, socket version, needs tcpserver(.c) as TCP server | |
tcpserver.c | show how to use TCP, server, socket version, needs tcpclient(.c) as TCP client | |
safesend.c | implements ``safe'' sendto()/recvfrom() functions for Chapter 8 |
The performance directory (see Table 35)
contains the programs to measure the performance of various
IPC facilities for Chapter 7. The WWW version
of this document contains hyper-links to the measured data and
performance/timing graphs in Postscript.
Result on
Result on
Result on
Result on
Result (read, synchronized) on
Result (write, synchronized) on
Result (read, unsynchronized) on
Result (write, unsynchronized) on
Result on
Result on
Result on
Result (read, synchronized) on
Result (write, synchronized) on
Result (read, unsynchronized) on
Result (write, unsynchronized) on
Result on
Result (accumulated) on
Result (raw data) on
Measurement between two HP 9000/710/HP-UX 9.01 on same Ethernet:
Measurement between pike17 and aidan:
Result on
Measurement between different computers:
Result on
Measurement between two HP 9000/710/HP-UX 9.01 on same Ethernet:
Measurement between pike17 and aidan:
Read result on
Write result on
Measurement between two HP 9000/710/HP-UX 9.01 on same Ethernet:
Measurement between pike17 and aidan:
Result on
Result (throughput) on
Result (speed differences) on
Measurement between two HP 9000/710/HP-UX 9.01 on same Ethernet:
Measurement between pike17 and aidan:
A program often has to find out in what kind of environment it runs
or which facilities the operating system has. The programs in the
environment directory (see
Table 36) show how to find out various things about
a used operating system / computer.
These programs were used for getting information about the used systems.
Most of the programs are not described directly in the main document.
The WWW version of this document contains hyper-links to the results of
the programs on the three used systems.
Result on
Result on
Result on
Result on
Result on
Result on
The directory rpc contains a modified RPC example source code
from [Stev90] that demonstrates how to use RPC.