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 |
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?
What is the difference between Telnet and SSH?
what is the difference between NIS and DNS...?
What utility can you use to automate rotation of logs?
You want to create a compressed backup of the users' home directories. What utility should you use?
Where is standard output usually directed?
What command can you use to review boot messages?
1 which file contains information about os wether it's 32 bit or 64 bit os 2 difference between logical block and physical block?? 3 what is the size of logical block and physical block?? 4 daemon for nfs on client end as well as server end??? 5 how to confirm from client end about nfs server sharing?? 6 what contains information about file and directory creating time or modification time??
why /etc/shadow file do not have any permission ?
How do i check which nfs version I am using ????????
someone already asked 'what is diff between unix & Linux' can I ask the same but more nuanced...I have 7 years app support of unix, have never seen Linux BUT need to bluff my way through in an interview i e say that I have use Linux. What are the most important things I need to know?
commands regarding the adding of users into groups n different options with useradd...?