vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I think I got the answer. retr_from_intr checks to see if the code segment register of the interrupted process pointed to a kernel address. If so, return control to it. Else, call schedule if need_resched was set. Bijoy. On Thu, 2005-09-08 at 17:01 -0400, Bijoy Thomas wrote: > Hi all, > > I've been doing some reading on the OpenBSD kernel and found out that > the kernel is non-premeptible. So, if a process is running in kernel > mode, it can never be pre-empted unless it voluntarily calls tsleep() or > it returns to user space. Since, it is the timer interrupt handler that > calculates process run times and calls schedule() if some process > exceeded its time limit, how does it know not to do a schedule() if the > current process is in kernel mode? How can it know if the current > process is in user mode or kernel mode? > > Regards, > Bijoy. |