-----Original Message----- From: kernelnewbies-bounce@nl.linux.org [mailto:kernelnewbies-bounce@nl.linux.org] On Behalf Of Eric BEGOT Sent: Friday, April 30, 2004 8:35 PM To: kernelnewbies@nl.linux.org Subject: Interruption and preemption Hi all, I've some questions about the preemption of the kernel. In the Linux 2.2 and 2.4, there are a lot of spin_lock_irqsave to disable interrupt like : spin_lock_irqsave() ; CRITICAL SECTION spin_lock_irqrestore() ; In a non preemptive kernel, the critical section is executed as an atomic operation that's sure. But in a preemptive kernel, the kernel can be interrupted by a process. So the kernel has a timeslice and if the timeslice finishes in the CRITICAL section, there's a problem. >>>>>>> if the timeslice finishes then kernel will be notified by a timer >>>>>>>interrupt.But as the interrupts are disbled the process wont get >>>>>>>scheduled inside the CRITICAL section. What do ya say ??? And this code in SMP environment doesn't work neither, does it ? It only protects the interrupts of 1 processor no ? Just some thoughts about synchronization :) Thx :p Eric -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/