Wrote message queues for threads and cache interface