System V Message Queues
955
problems listed above when using a single message queue. Note the following
points regarding this approach:
z
Each client must create its own message queue (typically using the
IPC_PRIVATE
key) and inform the server of the queue’s identifier, usually by transmitting the
identifier as part of the client’s message(s) to the server.
z
There is a system-wide limit (
MSGMNI
) on
the number of message queues, and the
default value for this limit is quite low on some systems. If we expect to have a
large number of simultaneous clients, we may need to raise this limit.
z
The server should allow for the possibility that the client’s message queue no
longer exists (perhaps because the client prematurely deleted it).
We say more about using one message queue per client in the next section.
Chia sẻ với bạn bè của bạn: