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

65 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+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents