A message queue is a public resource. Message queues are the primary means of interthread communication. One or more messages can reside in a message queue. A message queue that holds a single message is commonly called a
. Messages are placed at the rear of the queue,
and are removed from the front of the queue. Figure 4.14 contains the attributes of a message queue. Every message queue must
have a Control Block that contains essential system information. Every message queue is assigned a name, which is used primarily for identification purposes. Other attributes include the message size, the address where the message queue is located, and the total number of bytes allocated to the message queue. If the total number of bytes allocated to the message queue is not evenly divisible by the message size, then the remaining bytes are not used.