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 |
how can i make an user to nologin without locking the account for the user
how can i create samba server in fedora 9.0 ? and domain/LDAP controller! clilent side is windows pc .?
What is the name and path of the main system log?
What are main anti-spam features available in sendmail?
expalin the process of kickstart installation?
What are the questions we are expecting for 2yrs. experience guy for linux company interview questions?
in linux gui desktop icon was lost how con u back this icons
What is LILO?
How to apply patch for multiple servers .
what is difference between TFTP abd FTP?
How do i check which nfs version I am using ????????
What text filter can you use to display a binary file in octal numbers?