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 |
Which directory is closer to the top of the file system tree, parent directory or current directory?
Tell me the 5 differences between Linux and Unix?
How to convert an IP address to a Domain name using Unix ?
How can i recover the linux system after it was crashed by step by step process..
what is the difference between unix and linux...
What is the difference between ext3 and ext4?
How to send automated email to a set of people at fixed time ?
What is the complete name of the default configuration file for LILO?
in linux gui desktop icon was lost how con u back this icons
why /etc/shadow file do not have any permission ?
what is difference between inetd and xinetd
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.