diff b/w spinlock, seamaphores and mutex and where to use it.

Answers were Sorted based on User's Feedback



diff b/w spinlock, seamaphores and mutex and where to use it...

Answer / kapil thakar

Spin lock used in kernel context. It will not allow the
process or thread to sleep.

While mutux and semaphore can go into sleep.

So this make the spin lock can be used in interrupt context
or interrupt.

Is This Answer Correct ?    0 Yes 0 No

diff b/w spinlock, seamaphores and mutex and where to use it...

Answer / raghava

mainly spinlock used in threads to avoid synchronization,where as semaphore and mutex used to avoid process synchronization.
1.spinlock is something like polling.it spins for resouce until aloocated resouce releases.
2.binary semaphore and mutex are similar.

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More Linux System Calls Interview Questions

1. Where the History file can be located? 2. How will you harden the server? 3. Diff between Raid 1 and Raid 5? 4. What is the largest disk size can be used in LVM? 5. How will you remove a PV from lvm without any data loss? 6. What is the diff between ext3 and ext2 File system? 7. How we can use resize2fs, what is the purpose? 8. What is the purpose of LVM? Why it is used? 9. If the FS is in read-only mode, so we cannot create any file. How will you fix it? 10. How to create swap partition after OS installation? 11. What is the diff between ssh and telnet? 12. How to find out the dependency required for a package?

3 Answers   IBM,


What is the Diffrent between Redhat linux And suse linux

2 Answers   Wipro,


what are the different ways the Linux can swich from User Space to Kernel Space & vice-versa ?

2 Answers   NetApp,


if one of the critical section code (linked list) is under ISR & another one in kernel thread ? How you will synchronize for this critical section code ?

4 Answers   NetApp,


1.Diff between Active and passive FTP? 2.What is anacron? 3.Diff between yum update and yum install while doing for kernel? 4.root_squash and no_root_squash does what? 5.What are the commands will you execute to find a new hardware? 6.How will you find out a lun allocated from SAN? 7.What is the main diff in CaT5 and CAT6 cable, except the 1/100 and 1/1000? 8.What is stale NFS and How will you fix it? 9.What is kernel panic error? 10.How will you recover password and shadow file, in case both got deleted. Explain the steps? 11.Explain boot process 12.What is network bonding. Explain the steps? 13.What are the exit codes returned by FSCK? 14.What is LDOM? 15.Diff between block and character device?

2 Answers   Wipro,






how to create samba server in fedora linux 9 ?

2 Answers   Accenture,


what kind of information the linux driver modules (.ko ) files has ?

2 Answers   NetApp,


What do fork() internally call?

3 Answers  


What is the use of proc structure?

2 Answers   NetApp,


What does exec family return?

1 Answers  


what are Softirq's and how many major numbers be allocated in the linux kernel(2.4) ?

1 Answers  


why the kernel panic error was appering?

13 Answers   Air2Web, Allianz,


Categories