Linux Kernel Preemption during spin_lock and mutex_lock

Viewed 10067

When a process in the kernel space is holding a spin_lock, the process cannot be preempted due to any of the following conditions :

  1. When the time-slice of the process gets exhausted
  2. When a high priority process becomes runnable
  3. When an interrupt occurs

However the process can yield the processor if it blocks, sleeps, or explicitly call schedule(). Is my understanding correct?

When a process in the kernel space is holding a mutex_lock, can the process be preempted due to the above conditions listed as 1, 2 and 3.

1 Answers
Related