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 are the default permissions for files and folders..?
What are the questions we are expecting for 2yrs. experience guy for linux company interview questions?
What command can you use to review boot messages?
1. User gaves df -h and the system get hanged. why ? 2. what is the hardlink and softlink mount ? 3. why is portmape should be started ? 4. what is nologin option 5. how to restrict users from accessing nfs ? 6. what is the difference between cpio and tar 7. what are the kernel parameters ? how to find out it ? 8. why we use sysctl.conf ? 9. if we gives init1 from multiuser runlevel, will it affect other users who already logged in to the system ? 10. what will be the available space to use after configuering raid5 with 5 disks each having 5gb spce ?
How to send automated email to a set of people at fixed time ?
How to Trouble shoot performance issue in RHEL administration ? please give to one example
This question is belong to linux support. "one of my customer told to me, my application is getting slow response". how to resolve the issue. what are the steps you will follow to resolve the issue.
How do display error messages instantly when command fails?
in linux gui desktop icon was lost how con u back this icons
why you are using nis server
cups stands for..?
How to apply patch for multiple servers .