Re: schedulting in SMP machine

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

 



On 1/23/07, Rajat Jain <rajat.noida.india@xxxxxxxxx> wrote:
On 1/23/07, sandeep lahane <sandeep.lahane@xxxxxxxxx> 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 <rick.brown.3@xxxxxxxxx> 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.

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