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 |
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.
i installed clustering packages.When i try to run it getting LUCI error...what is it..??
You want to create a compressed backup of the users' home directories. What utility should you use?
i want some basic level enterview questions can any one can help me in this
How to give 2 different gateway IP addresses for 2 different interfaces in same system ?
what is memory mapped / IO mapped ? Which calls used for this to access any hardware address in linux device driver ?
what are the default permissions for files and folders..?
Friends, I don't have enough free space in root directory. but in home directory I have 40gb free. So I can not install anything in root directory (which occupies more space) Please suggest me If there is any possibility to increase the root directory size by minimising the home directory's.
How can you see all mounted drives?
Tell me command which is use for create quota database in Linux.
What is the difference between RedHat linux and Fedora and Ubuntu?
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,