RE: About Kernel preemption and kernel mode stack

2009-03-07 Thread Microbit_P43000
6 March 2009 5:04 PM To: micro...@virginbroadband.com.au Cc: Kernelnewbies Subject: Re: About Kernel preemption and kernel mode stack Hi! On 12:15 Fri 06 Mar , micro...@virginbroadband.com.au wrote: ... > In this case it's common to use co-operative scheduling. This means that >

Re: About Kernel preemption and kernel mode stack

2009-03-05 Thread Michael Blizek
Hi! On 12:15 Fri 06 Mar , micro...@virginbroadband.com.au wrote: ... > In this case it's common to use co-operative scheduling. This means that > when a task does not need further execution, it must relinquish control > back to the scheduler. I personally find this a real pig to program like >

Re: About Kernel preemption and kernel mode stack

2009-03-05 Thread Michael Blizek
Hi! On 19:06 Thu 05 Mar , sahlot arvind wrote: > Got it!.I have another question: > What are the exact steps when I press a key? Assume only one shell is > running and I press 'd': > 1. processor will get interrupted. > 2. it will jump to the common interrupt handler > 3. common interrupt han

Re: About Kernel preemption and kernel mode stack

2009-03-05 Thread Shinu
2009/3/6 > > Anyway in any case how does shell get the 'd' or anything from the > > keyboard? > > What are the exact steps? > > I'm a Linux kernel newbie, (although I have heavy embedded MCU coding > background) but I can help with the general approach of this scenario. > First, it's important to

Re: About Kernel preemption and kernel mode stack

2009-03-05 Thread microbit
> Anyway in any case how does shell get the 'd' or anything from the > keyboard? > What are the exact steps? I'm a Linux kernel newbie, (although I have heavy embedded MCU coding background) but I can help with the general approach of this scenario. First, it's important to note that any interrupt

Re: About Kernel preemption and kernel mode stack

2009-03-05 Thread sahlot arvind
Got it!.I have another question: What are the exact steps when I press a key? Assume only one shell is running and I press 'd': 1. processor will get interrupted. 2. it will jump to the common interrupt handler 3. common interrupt handler will save the context of shell and will call the appropriat

Re: About Kernel preemption and kernel mode stack

2009-03-05 Thread Michael Blizek
Hi! On 13:00 Thu 05 Mar , Pranav Peshwe wrote: > On Thu, Mar 5, 2009 at 11:48 AM, Michael Blizek < > mic...@michaelblizek.twilightparadox.com> wrote: > > > Hi! > > > > On 23:47 Wed 04 Mar , sahlot arvind wrote: > > > Hi All, ... > > > 2. If kernel is not preemptible then do we really ne

Re: About Kernel preemption and kernel mode stack

2009-03-04 Thread Pranav Peshwe
On Thu, Mar 5, 2009 at 11:48 AM, Michael Blizek < mic...@michaelblizek.twilightparadox.com> wrote: > Hi! > > On 23:47 Wed 04 Mar , sahlot arvind wrote: > > Hi All, > > > > Just had couple of questions: > > > > 1. kernel is preemptible if we are running in kernel mode and not holding > > any lo

Re: About Kernel preemption and kernel mode stack

2009-03-04 Thread Michael Blizek
Hi! On 23:47 Wed 04 Mar , sahlot arvind wrote: > Hi All, > > Just had couple of questions: > > 1. kernel is preemptible if we are running in kernel mode and not holding > any lock. What if we preempt the kernel even when we are holding lock? > Assuming process A and B are trying to execute t

About Kernel preemption and kernel mode stack

2009-03-04 Thread sahlot arvind
Hi All, Just had couple of questions: 1. kernel is preemptible if we are running in kernel mode and not holding any lock. What if we preempt the kernel even when we are holding lock? Assuming process A and B are trying to execute the same kernel path. So what if something like this happens: A get