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

What text filter can you use to display a binary file in octal numbers?

1 Answers  


How to sort a file of size 2N bytes, if I have N bytes of memory?

2 Answers   Yahoo,


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

2 Answers  


how u use the iptable firewall to restrict ssh,telnet,ftp

9 Answers  


what is meant by mysql clustering

2 Answers  


How do display error messages instantly when command fails?

4 Answers  


what is NIS Server...?

2 Answers   IBM,


How to build new filesystem ? and what is irig file system?

3 Answers  


i installed clustering packages.When i try to run it getting LUCI error...what is it..??

0 Answers  


tell me some of the Linux HotKeys do you know?

3 Answers  


what are the default permissions for files and folders..?

8 Answers   IBM,


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

1 Answers  


Categories