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 |
why accounting Software does not support on linux?
what is difference between TFTP abd FTP?
what is the difference between semaphore, mutex & spinlock?????
What is the other method of installing Linux O.S other than Text, GUI mode? Why we prefer that for installation of Linux in Real time?
Who owns the data dictionary?
how can i create samba server in fedora 9.0 ? and domain/LDAP controller! clilent side is windows pc .?
How to give 2 different gateway IP addresses for 2 different interfaces in same system ?
Through ssh whole directory structure from / is shared regardless the user we have connected with ....... how do i prevent sharing ??
i installed clustering packages.When i try to run it getting LUCI error...what is it..??
what is difference between inetd and xinetd
What is LILO?
What is the difference between semaphore and spinlock?