![]() ![]() The first message inserted in the queue is the first one to be retrieved. Ofcourse, the order of message queue is FIFO (First In First Out). To simplify the given message type as 1, 10, 20, it can be either 0 or +ve or –ve as discussed below. In this case, it is simplier to implement with message queues. ![]() If we want to communicate with different data packets, say process A is sending message type 1 to process B, message type 10 to process C, and message type 20 to process D. What if all the processes do not need to access the shared memory but very few processes only need it, it would be better to implement with message queues. Not worth with regard to utilization in this kind of cases. Shared memory data need to be protected with synchronization when multiple processes communicating at the same time.įrequency of writing and reading using the shared memory is high, then it would be very complex to implement the functionality. If we want to communicate with small message formats. Whereas in shared memory, the data is available for multiple processes to access. Why do we need message queues when we already have the shared memory? It would be for multiple reasons, let us try to break this into multiple points for simplification −Īs understood, once the message is received by a process it would be no longer available for any other process. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |