Task Synchronization and Communication
The multitasking system must furnish a mechanism for the tasks to pass information to each other as well as to ensure their synchronization. The semaphore enables concurrent tasks to be coordinated. For these functions languages and operating systems with run-time support generally use queuing semaphores, mailboxes or message systems. It supplies synchronization and signaling but contain no information. Mailboxes, on the other hand, do not signal information but instead contain it. Messages are similar to semaphores except that they carry the associated information.
The Queuing semaphores are software primitives which help and manage traffic. It give a technique of directing various queues example for, waiting for resources queues of tasks, database access and devices as well as queues of the devices and resources. The semaphore coordinate synchronize the waiting tasks with whatever they are waiting for without letting tasks or resources interfere with everyone.
In a real-time system semaphores are generally used to manage and implement mailboxes. The Mailboxes are provisional storage places also called a message buffers or pools for message sent from one procedure to another. One procedure produces a piece of information puts it in the mailbox and then signals a consuming procedure which there is a piece of information in the mailbox for it to use.
Any approaches to real-time operating systems or run-time support systems view mailboxes as the most professional way to implement communications among processes. Any real-time operating systems furnish a place to receive and send pointers to mailbox data. This eliminates the requirement to transfer all of the data – therefore overhead and saving time.
3rd approach to synchronization and communication between processes is a message system. With a message system one procedure sends a message to other. The latter is then automatically activated through the run-time support system or operating system to procedure the message. Like as a system incurs overhead because it transfers the real information, but it gives greater flexibility and ease of use.