CSC209H1 Lecture Notes - File Descriptor, Standard Streams, Inter-Process Communication

66 views5 pages
24 Apr 2013
School
Course
Professor

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.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents