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 is NIS Server...?

2 Answers   IBM,


How to give 2 different gateway IP addresses for 2 different interfaces in same system ?

5 Answers   Toyota,


What are main anti-spam features available in sendmail?

1 Answers   CSC,


How to Create NIS Server And NIS Client? Explain With Example?

1 Answers   Cisco,


Where is standard output usually directed?

2 Answers  


Give a Linux shell command to find all files in a directory which contain ip addresses.

1 Answers   Amazon,


what is kernel panic error ? how will you fix it if you have face it after rebooting without the the help of rescue disk ?

2 Answers   Oracle,


What are the differences between FTP , NFS , SAMBA servers explain separately.

0 Answers  


Without using w command how can Iknow that who are users logged in and what they are doing and whether they are idle or running mode?

4 Answers  


What is the name and path of the main system log?

3 Answers  


How to load the old kernel without rebooting server

1 Answers  


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

1 Answers  


Categories