CS 3733 Operating Systems, Spring 2009 Diagnostic Exam 2 Comments
- The main difference between this exam and the previous one is
that small writes to a pipe are atomic. This is not true for reads.
- If you attempt to write fewer than PIPE_BUF bytes,
it will either all succeed or it will fail.
- PIPE_BUF is always at least 256.
-
- -1, 0, 1, 2 or 3.
- -1 or 2.
Small writes to a pipe are atomic. Reads are not.
-
- 0, 1, 2 or 3.
- 2.
Small writes to a pipe are atomic. Reads are not.
- In either case an error occurs if the return value is -1.
In this case an error message can be displayed
using perror or gotten using strerror and errno.