no a storage question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i know this not the place, but since they so many kernel developers here...
i have a different question regarding locking in the kernel.

In the last issue of linux magazine there was an article about
locking. it presented the follwing  scenario.

spin_lock(lock)
...
spin_unlock(lock).

In uni processot mahcine with preemption enabled.
spin_lock saves flags and cli(). spin_unlock()  push flags out ( for nesting interrupts)

they said that this code :
Does not protect preemption.

no protection from preemption ? How ?
How can process B get some cpu while process A had disabled interrupts,
no scheduling (unwillingly ) can be made.Prior to the preemption the
kernel scehdular must run and set Process B as the one to run , and to the
best my knowledge, a schedular runs only in timer interrupt.
Or is it possible that the schduler timer routine isn't running in interrupt context ?


thank you
--
Raz
--

Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux