The Linux Programming Interface
INTERPROCESS COMMUNICATION OVERVIEW This chapter presents a brief overview of the facilities that processes and threads can use ...
878 Chapter 43 Although some of these facilities are concerned with synchronization, the general term interprocess communication ...
Interprocess Communication Overview 879 In some cases, facilities that are grouped together in Figure 43-1 actually provide sign ...
880 Chapter 43 z Message: The data exchanged via System V message queues, POSIX message queues, and datagram sockets takes the f ...
Interprocess Communication Overview 881 UNIX systems provide the following synchronization facilities: z Semaphores: A semaphore ...
882 Chapter 43 used for synchronization, with the synchronization operation taking the form of exchanging messages via the facil ...
Interprocess Communication Overview 883 Functionality There are functional differences between the various IPC facilities that c ...
884 Chapter 43 z UNIX domain sockets provide a feature that allows a file descriptor to be passed from one process to another. T ...
Interprocess Communication Overview 885 interfaces more complicated to use. The corresponding POSIX IPC facilities were designed ...
886 Chapter 43 Persistence The term persistence refers to the lifetime of an IPC object. (Refer to the third column of Table 43- ...
Interprocess Communication Overview 887 Performance In some circumstances, different IPC facilities may show notable differences ...
888 Chapter 43 43-2. Repeat the preceding exercise for System V message queues, POSIX message queues, UNIX domain stream sockets ...
PIPES AND FIFOS This chapter describes pipes and FIFOs. Pipes are the oldest method of IPC on the UNIX system, having appeared i ...
890 Chapter 44 Figure 44-1: Using a pipe to connect two processes One point to note in Figure 44-1 is that the two processes are ...
Pipes and FIFOs 891 Writes of up to PIPE_BUF bytes are guaranteed to be atomic If multiple processes are writing to a single pip ...
892 Chapter 44 change the pipe capacity to any value in the range from the system page size up to the value in /proc/sys/fs/pipe ...
Pipes and FIFOs 893 Figure 44-3: Setting up a pipe to transfer data from a parent to a child While it is possible for the parent ...
894 Chapter 44 be sure which process will be the first to succeed—the two processes race for data. Preventing such races would r ...
Pipes and FIFOs 895 it has read all data from the pipe. Instead, a read() would block waiting for data, because the kernel knows ...
896 Chapter 44 Here’s an example of what we might see when running the program in Listing 44-2: $ ./simple_pipe 'It was a bright ...
«
42
43
44
45
46
47
48
49
50
51
»
Free download pdf