Re: Premptive vs non-premptive kernel.

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

 



On Fri, Jun 25, 2004 at 17:23:23 +0530, amith 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 

No. It is not global. It is really in task_struct. It seems, that that way
it's easier to work with it from assembly.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

Attachment: signature.asc
Description: Digital signature


[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