Machine-translated by Google. Questions are authored in English.
Top

Discussion

A task must wait for a message on either of two queues. The construct provided for it is

  • A.a queue set, or an event group written by both producers
  • B.a recursive mutex taken by both producers
  • C.a counting semaphore initialised to two
  • D.two receive calls in succession with zero timeouts

Answer: A

Waiting on two queues at once is not a natural operation, so kernels offer a queue set that reports which member has data. Polling both with zero timeouts works but reintroduces the latency and the wasted cycles that blocking avoids.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.