RE: Linux Scheduler

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

 



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.




-----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/
> 
> 


-- 

"Only the paranoid survives." --- Andy Grove

--
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/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux