Question: Assume a pipe has been created, and the calling process has forked three children. All processes keep their read and write ends open. Which of
Assume a pipe has been created, and the calling process has forked three children. All processes keep their read and write ends open.
Which of the following are true?
If the writer writes data to the pipe and two readers have requested to read before the writer writes, then the readers will split the data placed on the pipe.
assume that at some point a subset of the processes invoke read and some of the processes invoke sleep in a way that no errors are caused in the system. The next instructions that follow and are common in all live processes after the previous system calls, are closing the reading and the writing end. This means that there will be no errors or blocking in the system
If there is already data in the pipe, system call write will cause the writer process to wait until the data in the pipe is read by another process before writing the new data.
if the writer writes a character once to the pipe, while all processes who may be readers have placed a read requesting to read an integer then all readers will remain blocked.
If the writer writes its long integer pid once to the pipe, while all processes who may be readers have placed a read requesting to read a byte, then no process will block.
If the writer writes data to the pipe and all readers have requested to read before the writer writes, then one reader only can read the data, while the other two will read EOF
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
