How do message queues differ from shared memory as an inter-process communication mechanism?
Correct! Well done.
Incorrect.
The correct answer is D) Message queues have the kernel manage synchronized, structured messages (simpler, more overhead); shared memory gives direct access to common memory for speed but needs manual synchronization
Correct Answer
Message queues have the kernel manage synchronized, structured messages (simpler, more overhead); shared memory gives direct access to common memory for speed but needs manual synchronization
With message queues, the kernel copies and queues discrete messages, handling synchronization and ordering automatically — simpler but slower due to copying and system call overhead. Shared memory avoids copying by mapping the same physical pages into multiple address spaces, which is faster but leaves synchronization (e.g., via semaphores) entirely up to the programmer.