CS FundamentalsHardGATE CS

Writes of at most PIPE_BUF bytes to a pipe have which guarantee when several writers share the pipe?

  1. A. They are atomic: the bytes of one such write are not interleaved with bytes from other writers
  2. B. They are delivered in the reverse order
  3. C. They are guaranteed to be on disk
  4. D. They never block

Correct answer: A. They are atomic: the bytes of one such write are not interleaved with bytes from other writers

POSIX requires writes of up to PIPE_BUF bytes (at least 512, 4096 on Linux) to be atomic; larger writes may be interleaved with other writers' data.

More Operating Systems questions

Exams that ask this topic