schedulting in SMP machine

schedulting in SMP machine

am 23.01.2007 09:10:39 von Rick Brown

Hi,

If an executing process is interrupted by an interrupt, is it ensured
that it won't get transferred to another idle CPU in the system??

This would mean that despite the fact that a CPU is idle in the
system, still the process will wait untill the ISR finishes its
execution?

Thanks,

Rick
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: schedulting in SMP machine

am 23.01.2007 11:14:57 von sandeep lahane

I dont know much about SMP scheduling but after thinking a while I came up with
following inference, please correct me if I am wrong.

If the ISR and the interrupted process are sharing the stack i.e. of
the ISR doesnt have its own seperate stack in that case moving the
interrupted process will be difficult since lot of book keeping will
be required. Also this would be a fragile situation with chances of
data corruption.

But as far as I know, an ISR can have a separate stack also, this is
configurable.
In this case, moving the interrupted process to another cpu will be
easier/feasible than before.

Regards,
Sandeep.



On 1/23/07, Rick Brown wrote:
> Hi,
>
> If an executing process is interrupted by an interrupt, is it ensured
> that it won't get transferred to another idle CPU in the system??
>
> This would mean that despite the fact that a CPU is idle in the
> system, still the process will wait untill the ISR finishes its
> execution?
>
> Thanks,
>
> Rick
>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive: http://mail.nl.linux.org/kernelnewbies/
> FAQ: http://kernelnewbies.org/faq/
>
>


--

Regards,
Sandeep.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: schedulting in SMP machine

am 23.01.2007 11:40:00 von Rajat Jain

On 1/23/07, sandeep lahane wrote:
> I dont know much about SMP scheduling but after thinking a while I came up with
> following inference, please correct me if I am wrong.
>
> If the ISR and the interrupted process are sharing the stack i.e. of
> the ISR doesnt have its own seperate stack in that case moving the
> interrupted process will be difficult since lot of book keeping will
> be required. Also this would be a fragile situation with chances of
> data corruption.
>
> But as far as I know, an ISR can have a separate stack also, this is
> configurable.
> In this case, moving the interrupted process to another cpu will be
> easier/feasible than before.
>
> Regards,
> Sandeep.
>
>
>
> On 1/23/07, Rick Brown wrote:
> > Hi,
> >
> > If an executing process is interrupted by an interrupt, is it ensured
> > that it won't get transferred to another idle CPU in the system??
> >
> > This would mean that despite the fact that a CPU is idle in the
> > system, still the process will wait untill the ISR finishes its
> > execution?
> >

The ISR is not a SEPARATE process. When it executes, for the scheduler
it is the same process (which was interrupted). In other words, the
fact that ISR has started execution putting the process on hold is not
known to scheduler. Now given this, why would scheduler want to move a
RUNNING process to a different CPU?

Somebody please CMIIMW

Regards,

Rajat
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: schedulting in SMP machine

am 23.01.2007 13:15:51 von sandeep lahane

On 1/23/07, Rajat Jain wrote:
> On 1/23/07, sandeep lahane wrote:
> > I dont know much about SMP scheduling but after thinking a while I came up with
> > following inference, please correct me if I am wrong.
> >
> > If the ISR and the interrupted process are sharing the stack i.e. of
> > the ISR doesnt have its own seperate stack in that case moving the
> > interrupted process will be difficult since lot of book keeping will
> > be required. Also this would be a fragile situation with chances of
> > data corruption.
> >
> > But as far as I know, an ISR can have a separate stack also, this is
> > configurable.
> > In this case, moving the interrupted process to another cpu will be
> > easier/feasible than before.
> >
> > Regards,
> > Sandeep.
> >
> >
> >
> > On 1/23/07, Rick Brown wrote:
> > > Hi,
> > >
> > > If an executing process is interrupted by an interrupt, is it ensured
> > > that it won't get transferred to another idle CPU in the system??
> > >
> > > This would mean that despite the fact that a CPU is idle in the
> > > system, still the process will wait untill the ISR finishes its
> > > execution?
> > >
>
> The ISR is not a SEPARATE process. When it executes, for the scheduler
> it is the same process (which was interrupted). In other words, the
> fact that ISR has started execution putting the process on hold is not
> known to scheduler. Now given this, why would scheduler want to move a
> RUNNING process to a different CPU?
>
> Somebody please CMIIMW
>
> Regards,
>
> Rajat
>


Rajat,
I think Rick wants to know how the scheduling is done in case of SMP machines.
What I gathered from his question is, even though it is a SMP
environment, if the interrupted process is not moved to another cpu
which is idle then this suboptimal utilization of resources. So next
obvious question is, is it possible to move the interrupted process to
another cpu? This I tried to answer in my previous post depending upon
whether the stack is shared or not. So hypothetically( or actually? )
the scheduler should move the interrupted process to another idle cpu
for optimal utilization. Actually how this is done only an expert on
the list can tell us.



Regards,
Sandeep.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs