Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between semaphore and spinlock?



What is the difference between semaphore and spinlock?..

Answer / sandeep

Spinlock is a busy wait. Semaphore is a sleep wait.
Spinlocks are used to get exclusive access to critical
section whereas semaphores are used for exclusive access and
also to synchronize processes and threads.
Spin locks are used when the critical sections it is
protecting is small and are held for a short time.
Semaphores can be held for longer time. Semaphores use spin
locks to access its control structures.
Spinlocks are kernel locking mechanism where as semaphores
are used in both kernel and user space.
Semaphores should not be used in interrupt handlers since
the code sleeps if the semaphore is not acquired.

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More Linux AllOther Interview Questions

Which directory is closer to the top of the file system tree, parent directory or current directory?

3 Answers  


Tell me the 5 differences between Linux and Unix?

4 Answers  


How to convert an IP address to a Domain name using Unix ?

2 Answers   Verse Innovation,


How can i recover the linux system after it was crashed by step by step process..

3 Answers   IBM,


what is the difference between unix and linux...

7 Answers  


What is the difference between ext3 and ext4?

0 Answers   IBM,


How to send automated email to a set of people at fixed time ?

3 Answers   Accenture, HP,


What is the complete name of the default configuration file for LILO?

1 Answers  


in linux gui desktop icon was lost how con u back this icons

2 Answers  


why /etc/shadow file do not have any permission ?

0 Answers   IBM,


what is difference between inetd and xinetd

2 Answers  


As a system admin i want to know some things what are the troubleshooting issues we are facing frequently and what are the tickets will be raised.

0 Answers   Ondot,


Categories