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 |
what is NIS Server...?
How to give 2 different gateway IP addresses for 2 different interfaces in same system ?
What are main anti-spam features available in sendmail?
How to Create NIS Server And NIS Client? Explain With Example?
Where is standard output usually directed?
Give a Linux shell command to find all files in a directory which contain ip addresses.
what is kernel panic error ? how will you fix it if you have face it after rebooting without the the help of rescue disk ?
What are the differences between FTP , NFS , SAMBA servers explain separately.
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?
What is the name and path of the main system log?
How to load the old kernel without rebooting server
What text filter can you use to display a binary file in octal numbers?