In reply to puranik.sunil@tcs.com:
Yes, you are correct that a mailbox is made up of two semaphores - a put_semaphore and a get_semaphore, plus the queue holding the mailbox data. Each semaphore is in turn made with a queue of process IDs that implements the FIFO thread ordering. SystemVerilog already provides a process class for identifying threads (See 9.7 Fine-grain process control in the 1800-2012 LRM). Semaphore also provide the atomic test-and-set operation.
You can in fact build your own mailbox class using a combination of semaphores and queues. Some people do this because they want to be able to “stuff” extra entries in the mailbox, or examine the other entries in the mailbox.
One thing you can’t do is create a type-less mailbox or extend an existing mailbox class that is type-less. The type-less mailbox is a legacy feature from the Vera language, which did not have parameterized classes. There is really no good reason to use it anymore.