Click here to Skip to main content
15,877,857 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more: (untagged)
What are the differences between a spinlock and a semaphore?
Updated 19-Dec-09 21:40pm

A spinlock causes the process to continuously loop until the spinlock is released, while a semaphore causes the process to sleep until it's released.

A semaphore is usually better if you're going to be waiting a longer time for the criteria to be met.
Share this answer
Please buy a book instead of posting all of your homework questions here
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900