On Monday 21 October 2002 03:18 am, Sonawane, Rahul (Rahul) wrote: > Hi Ketan, > The kernel is not preemptive is kernel mode ..which means a context switch > cannot happen if the process is executing in the kernel mode. Say it is > executing a system call and it is executing in kernel mode ..Now a timer > interrupt occurs and it gets executed in the current process context . The > timer interrupt found decrements the process counter ..finds it to be zero > and sets the reshed_flag = 1; I want to know when will the context switch > happen immediately or when the process will return to user mode ? I guess > it wont happen immediately as it is non-preemptive. > Thank, > Rahul. > > In a Linux kernel with no preemption, it will reschedule when the current process sleeps or exits the syscall. With the preemptive patch and in 2.5.X kernels, the reschedule will occur immediately after the timer interrupt finishes unless preemption is currently explicitly disabled. Anton > > > -----Original Message----- > From: Patwardhan, Aniruddha [mailto:Aniruddha_Patwardhan@bmc.com] > Sent: Monday, October 21, 2002 12:06 PM > To: Sonawane, Rahul (Rahul) > Cc: kernelnewbies@nl.linux.org > Subject: RE: Linux Scheduler > > > Interrupt handling as explained in Bach will illustrate this in more > details, with diagram > > -Aniruddha > -----Original Message----- > From: Ketan Mukadam [mailto:kmukadam@neomagic.com] > Sent: Monday, October 21, 2002 11:47 AM > To: Sonawane, Rahul (Rahul) > Cc: kernelnewbies@nl.linux.org > Subject: Re: Linux Scheduler > > > > The timer interrupt service routine will get executed in the current > process context. Kernel non-preemptibility does not include interrupts. > > Regds > Ketan > > Sonawane, Rahul (Rahul) wrote: > > Hi, > > I have some questions on linux scheduling. Linux kernel is > > non-preemptive in kernel mode ..right. Now it is executing > > > in the kernel mode and a timer interrupt occurs ,Does is preempt ..I mean > > the timer interrupt is of utmost priority it has > > > to get processed. Please can someone enlighten me about what will happen > > if the timer interrupt occurs when it is executing > > > in kernel mode on behalf of some process. > > > > Thanks in advance, > > Rahul > > > > > > -- > > 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/