Re: Premptive vs non-premptive kernel.

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

 



amith (amith@multitech.co.in) wrote:
> Dhiman, Gaurav wrote:
> 
> >Hi Amith,
> >
> >Answer for your second question:
> >
> >need_resched is not something specific to a particular process and is
> >not a part of task_struct, its global to kernel and is set by timer
> >interrupt whenever the timer interrupt finds that the time allocated to
> >current process (represented by 'current' pointer) has expired.
> >
> >Your first question is my question also, How the returning code of any
> >interrupt finds whether the control is returning to user space or kernel
> >space? As far as I think, it must be checking if the return address
> >falls in kernel address range or in user address range. Can someone give
> >the detailed insight about this?
> >
> >Regards,
> >Gaurav Dhiman.
> >
> >hi Gaurav,
> >
>                      but i find :
> 
> struct task_struct {
> ....
> .....
> volatile unsigned long need_resched;
> ...
> ...
> ..
> };
> 
> 
>  and where is need_resched  which sounds/seems to be global ??  but i 
> couldnt find it anywhere in the sources . i could find one in 
> task_struct only as metntioned before (sched.h) .

hey : 
http://lxr.linux.no/search?v=2.6.5&string=need_resched

more than once ;)

-- 
Amicalement

Christophe 

* GNU/Linux & UNIX developer and network administrator
* Membre RotomaLUG (http://www.rotomalug.org)
* Registered User #271267
* Email: c.lucas@ifrance.com
* Web Site: http://odie.mcom.fr/~clucas/

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