Skip to Main Content
Operating Systems: Concurrent and Distributed Software Design
book

Operating Systems: Concurrent and Distributed Software Design

by Jean Bacon, Tim Harris
March 2003
Intermediate to advanced content levelIntermediate to advanced
912 pages
27h 17m
English
Pearson Business
Content preview from Operating Systems: Concurrent and Distributed Software Design

14.3. UNIX pipes

We have seen that access to normal files is too slow for them to be used as a general mechanism for inter-process communication. The pipe in UNIX is designed to be used like a file but implemented to allow more efficient transfer of information between two processes. When a file is opened by a process a small integer file identifier is returned by the system for subsequent use when reading or writing the file. For example:

file-id =open (filename, access required)
[bytes] = read (file-id, byte-range-within-file)
 write (file-id, number and location in memory of bytes to write to file, where to write bytes in file)

A pipe is created by a special system call, but a normal file identifier is returned to the creating process. This ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Principles of Concurrent and Distributed Programming, Second Edition

Principles of Concurrent and Distributed Programming, Second Edition

M. Ben-Ari
Operating Systems in Depth

Operating Systems in Depth

Thomas W. Doeppner

Publisher Resources

ISBN: 0321117891Purchase book