-----Original Message-----
From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of Eric BEGOT
Sent: Friday, April 30, 2004 8:35 PM
To: kernelnewbies@xxxxxxxxxxxx
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 ???