Search code examples
operating-systemmessage-queuertos

Difference between message queues and mailboxes


In operating system what is the difference between message queues and mailboxes.


Solution

  • I suspect there is no universally accepted definition for what makes a message queue versus a mailbox. Each RTOS may use different terminology and implementation details so you'd have to look at each RTOS individually.

    Generally speaking some of the common differences include:

    • Is the size of the messages sent through the queue/mailbox fixed or can the message size vary?
    • Does the queue/mailbox hold a reference to the message or a copy of the message?
    • Can the queue/mailbox hold one message, multiple messages, or unlimited messages?