Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
semaphore is like a key one who have it can use it.
I will give u example.....if two concurrent threads are using the same variable race condition can persist but if u use semaphore
at one time only one thread can have access to it.
just try to understand the concept of Automatic variable....same way semphores are used.
Used in verification.
Most famous example is memory read and write operation.
If you are doing memory read and write operation to same address from ur verification env,but the dut can allow only one operation at a time.
So semaphore gives you the keys like a car keys.Many drivers may be there to drive a car ,u got only one key.so get the keys, do ur work,put back the keys so some one can use it..
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.