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 meant by mysql clustering
What is the difference between ext3 and ext4?
Hi all Could u plz tell me how I can get UNIX/Linux Certification
there are many IPC mechanisms available in Linux ? Which one is best to use and when ?
how do i check which package has installed some command suppose ls , mkdir or whatever ???
Which directory is closer to the top of the file system tree, parent directory or current directory?
why accounting Software does not support on linux?
When you install RedHat what is the kernel mode ? What is kernel compilation / upgrade ?
Give a Linux shell command to find all files in a directory which contain ip addresses.
How is the difference between ftp and sftp ? and explain how to create ftp server and sftp server with example ?
2 Answers Bank Of America, IBM,
My root password has been changed, how can i enter into the system without root password?
How do display error messages instantly when command fails?