



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Interprocess communication (ipc) through message passing and unix pipes. It covers various message passing techniques, including synchronous and asynchronous methods, and discusses the use of mailboxes. The document also provides a case study on ipc in unix, focusing on pipes and their creation, file descriptors, and inheritance in parent-child relationships.
Typology: Study notes
1 / 7
This page cannot be seen from the preview
Don't miss anything!




receiver.
from sender.
know MAILBOX where it gets its messages!
destroyed
write(pipe_id, message, nbytes) (^) read(pipe_id,buffer,xbytes)
int p[2]; ... ... pipe(p); / creates a pipe and returns ID of read-end in p[0] and ID of write-end in p[1] /
int p[2]; ... ... pipe(p); / creates a pipe and returns ID of read-end in p[0] and ID of write-end in p[1] /
p[1] p[0]
Step 2: P0 creates P1 and P2, which inherit pipes
At this time, any of them can read/write from/to the pipe.
p[1] p[0]
Step 3: all processes close pipe ends which they will not (should not) be accessing:
close(p[0]); close(p[1]);
close(p[1]);
close(p[0])