Add a message queue system based on semaphore and shared memory.