Find the answer to your Linux question:
Results 1 to 6 of 6
hi everyone, does a message queue need to be acceded exclusively by processes ? thanks to all of u...
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Location
    Algeria
    Posts
    26

    oes a message queue need a mutex

    hi everyone,

    does a message queue need to be acceded exclusively by processes ?

    thanks to all of u

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    I'm not sure what your question means, but I'll try to answer it anyway.

    If you have two processes which are trying to write messages to the same POSIX message queue at the same time, this will work properly. You do not need to coordinate things so that only one process at a time writes a message to that queue.

    The same goes for reading. If you have two processes which are trying to read messages from the same POSIX message queue at the same time, this will work properly. One process will get one message and the other process will get another (if there are two messages waiting). You do not need to coordinate things so that only one process at a time reads a message from that queue.

    Is this what you meant?
    --
    Bill

    Old age and treachery will overcome youth and skill.

  3. #3
    Just Joined!
    Join Date
    Dec 2007
    Location
    Algeria
    Posts
    26
    thank you , it's exactly what i was looking for;

  4. #4
    Just Joined!
    Join Date
    Dec 2007
    Location
    Algeria
    Posts
    26

  5. #5
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    If there's anything unique involved with that patent, it's not that the proposed mechanism claims to provide automatic mutual exclusion. It's that the proposed mechanism claims to provide more efficient automatic mutual exclusion:
    The conditional atomic counters control access to a message queue or memory space in a simple and reliable manner while minimizing the overhead of access to the mutex gate objects typically used in the implementation of message queues of the prior art.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  6. #6
    Just Joined!
    Join Date
    Dec 2007
    Location
    Algeria
    Posts
    26
    thanks to take a look, because i'm not very good in english, but now i'm sure,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...