Results 1 to 4 of 4
  1. #1

    Mutex and semaphore in openSTA

    Hi all,

    I've found from http://geekswithblogs.net/shahed/arc.../09/81268.aspx , which is the difference between mutex and semaphore.

    But in OpenSTA, they seem not to be same each other.

    Anybody, please tell me more about semaphore in OpenSTA.
    1- What is happened if I use "CLEAR SEMAPHORE" or "SET SEMAPHORE" Command ?
    2- What is a number of threads in semaphore command

    Thank you very much indeed
    -Xuan Thanh-

  2. #2

    Re: Mutex and semaphore in openSTA

    The short answer is mutexes work and semaphores don't (as far as I can tell).

    The somewhat longer answer is that mutexes are used to control access to single threaded code while semaphores are usually used to control things like rendezvous. A mutex is used for logic like "execute a block of code if and only if no one else is executing it" where semaphores allow anyone to execute a block of code if one of potentially many conditions are true. Semaphores grant permission that allows anyone to do something while mutexes block others from doing things concurrently.

  3. #3

    Re: Mutex and semaphore in openSTA

    Hi Bernie

    your answer is very helpful for me.

    But I wondered: why did you say "mutexes work and semaphores don't"

    thanks and regards
    -Xuan Thanh-

  4. #4

    Re: Mutex and semaphore in openSTA

    There have been many reports that the "wait for semaphore" statement does not work. Others have reported it does work. I tried once, and it did not function correctly. I suspect it is at least broken in some cases or with some versions of OpenSTA, but I am not sure of the details.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 04:13 PM.

Copyright BetaSoft Inc.