what is semaphore and mutex

Discussion in 'Embedded Systems and Microcontrollers' started by embpic, May 2, 2014.

  1. embpic

    Thread Starter Member

    May 29, 2013
    187
    3
    what is semaphore and mutex semaphore??
     
  2. bertus

    Administrator

    Apr 5, 2008
    15,638
    2,343
  3. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    A semaphore reserves a resource while it is in use (eg a memory or I/O) by setting a flag. A mutex reserves a resource also, but the O/S is more restrictive in protecting the resource. A mutex must be acquired before using the resource, while a semaphore is simply a signal that the resource is being used.
     
Loading...