Questions: Message Queues and Message Passing IPC

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A web server receives unpredictable bursts of image-processing requests that take 200ms each to handle. The processing is done by a separate worker process. Should the server use a pipe or a message queue to send jobs to the worker, and why?

AA pipe — it is faster and lower overhead than a message queue
BA message queue — the server can enqueue bursts immediately without blocking, and the worker processes jobs at its own pace
CA pipe — it supports priority ordering, so urgent requests can jump the queue
DA message queue — it uses shared memory internally so it is faster for large image data
Question 2 Multiple Choice

What distinguishes message queues from pipes as IPC mechanisms?

APipes support multiple senders and receivers; message queues support only one of each
BMessage queues carry typed, discrete messages that can be selectively retrieved; pipes carry an undifferentiated byte stream that must be read in strict FIFO order
CMessage queues require both processes to run simultaneously; pipes do not
DPipes are managed by the kernel; message queues are managed by user-space libraries
Question 3 True / False

When a process sends a message to a message queue, it blocks until the receiving process retrieves the message.

TTrue
FFalse
Question 4 True / False

Message queue resources in the POSIX/System V kernel persist until they are explicitly removed, even if all processes that used the queue have terminated.

TTrue
FFalse
Question 5 Short Answer

Explain temporal decoupling in message queues — what it means and why it matters for system design.

Think about your answer, then reveal below.