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 |
in linux gui desktop icon was lost how con u back this icons
expalin the process of kickstart installation?
How to know what are the packages required for any service? Example: How to know what are the package required for send mail services. using any command it is passable are not?
How to sort a file of size 2N bytes, if I have N bytes of memory?
Tell me the 5 differences between Linux and Unix?
What is the difference between Telnet and SSH?
What are the differences between FTP , NFS , SAMBA servers explain separately.
what are the default permissions for files and folders..?
Give a Linux shell command to find all files in a directory which contain ip addresses.
what is the difference betweenh the NFS and FTP?
what is difference between TFTP abd FTP?
Why is it suggested to disable journalism in ext4 filesystem?