Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Spinlocks and Semaphores

23 views
Skip to first unread message

sarthak....@gmail.com

unread,
Jan 8, 2019, 12:36:52 PM1/8/19
to
I have few queries, I think you can help me with them. Please do try.


1. The Linux kernel enforces the following policy: a process is not allowed to try to acquire a semaphore while it is already holding a spin lock. Why is it so and what will happen if we break this rule?
2. What are the problems that occurs when using spinlocks on a single processor system(preemptible kernel and a non-preemptible kernel)
3. What concurrency issues can arise when the up() (increment counter) and down() (decrement counter) functions of a semaphore are not executed atomically. How is it important?
0 new messages