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 are the default permissions for files and folders..?

8 Answers   IBM,


How to recover a deleted file in linux ?

5 Answers  


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

2 Answers   Yahoo,


What is LILO?

11 Answers   Cisco,


There are 4 network Interfaces, how can we find which one is Primary.

2 Answers  


What is Hard mount and soft Mount?

0 Answers   Cap Gemini,


What is the difference between Telnet and SSH?

17 Answers   Bayer, KTree,


In Linux(RHEL) server have two users with same name. one is local user and second one is NIS user. if you login the server which user will login (local or NIS)

1 Answers  


what restrict telnet for root itself but allow for other user

3 Answers   CA,


What is the difference between ext3 and ext4?

0 Answers   IBM,


How find out drivers of installed devices in linux (RHEL)?

2 Answers  


what is the difference betweenh the NFS and FTP?

4 Answers   IBM,


Categories