All of lore.kernel.org
 help / color / mirror / Atom feed
* Why can not processes switch in atomic context?
@ 2012-07-03 14:24 Parmenides
  2012-07-03 15:33 ` Subramaniam Appadodharana
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Parmenides @ 2012-07-03 14:24 UTC (permalink / raw)
  To: kernelnewbies

Hi,

    It is said that kernel can not be preempted in interrupt context
and when it is in a critical section protected by a spin lock.

1. For the spinlock case, it is easy to get if preemption is allowed
in critical section, the purpose of protection provided by spinlock
can not be achieved readily.

2. For the interrupt context case, I think when processing interrupt,
kernel can be preempted in principle. But, this really increases the
interrupt processing time which further cause longer response time and
data missing in device. Except that, is there any other reasons?

3. Kernel is responsible for prohibiiting passive process switches,
namely preemption, in the above cases. But, It seems that it does not
take care of active process swtiches, namely yield. For example, some
code in a critical section protected by a spinlock can invoke
schedule() to switch process passively. Is this the case?

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-07-05 14:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-03 14:24 Why can not processes switch in atomic context? Parmenides
2012-07-03 15:33 ` Subramaniam Appadodharana
2012-07-03 16:01 ` Rajesh S R
2012-07-03 16:32 ` anish kumar
     [not found]   ` <CAOXENUhvJFTnMSiqgg5LMLtnQGYxuk=6dNg1=bRCHUremHD5Dw@mail.gmail.com>
2012-07-04  5:07     ` anish singh
2012-07-04  8:21 ` Javier Martinez Canillas
2012-07-04  8:36   ` anish singh
2012-07-04  9:31     ` Javier Martinez Canillas
2012-07-04 10:44 ` 弋天 卜
2012-07-04 15:12   ` Dave Hylands
2012-07-04 19:14     ` 卜弋天
2012-07-05 14:17     ` 卜弋天
2012-07-05  2:38 ` Parmenides

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.