Tracing prioritized message delivery

A POSIX message queue has mq_msgsize = 128 bytes. The following four sends succeed in the listed sequence before a receiver starts. No additional messages arrive. The graph supplies each message's priority.


Successful send sequence

Message

Message length (bytes)

1

Atlas

36

2

Boreal

80

3

Cedar

24

4

Delta

60


A bar chart shows priorities of 2, 7, 7 and 1 for Atlas, Boreal, Cedar and Delta.


The receiver makes four successful mq_receive() calls using 256-byte buffers. All other arguments are valid. Complete the table with each returned message name and the number of bytes returned. The final row asks for the smallest receive-buffer size permitted by this queue's configuration, even when the next message is shorter. Enter byte counts as exact integers.

Operation or requirementMessageBytes
First receive
Second receive
Third receive
Fourth receive
Minimum permitted receive bufferNot applicable

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Inter Process Communication Questions: