CSC209H1 Lecture Notes - File Descriptor, Standard Streams, Inter-Process Communication
Document Summary
Wait, process term and zombie moved to mar01c. Process a wirtes to a file, process b reads from it: producer/consumer problem. Both the writing process (who) and the reading process (wc) of a pipeline execute concurrently. A pipe is usually implemented as an internal os buffer. It is a resource that is concurrently accessed by the reader and the write so it must be managed carefully. They should run independently as far as buffer capacity and contents permits. They should never be updating the buffer at the same instant (otherwise data integrity cannot be guaranteed) Detailed pipe() diagram: start with pipe() half-duplex (one-way) communication. File objects and file descriptors: the stdio library provides file objects which handle buffering. Efficiency: file objects are built on top of file descriptors. A file descriptor is an index into a pre-process table of open file descriptors. Also use file descriptors for other communications (pipes, sockets: file descriptors.