Another mechanism directly supported by POSIX-compliant operating systems (and then, the Linux kernel) is a message queue. A message queue, in its essence, is a linked list of messages stored in the kernel, where each queue is identified by an ID. In this recipe, we'll rewrite the chat program using a message queue, highlighting the key pros and cons.