Re: Premptive vs non-premptive kernel.

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

 



In RTLINUX as i know such situations will lead to watchdog timer getting
expired and the current thread will be exited.
 
 
>>
hi all,
                i have a basic doubt about premptive vs non - premptive
kernels . In a kernel like 2.4 which  is non-premptive a while(1) ;
inside  the code  of my driver (for an example) would hang the system.
But a premptive kernel like 2.6 ( i dont have it  ) shouldnt hang the
system, since it wud prempt and get to the next task .
if what i asssumed above is right .
when does the kernel get out of the context of the while loop (mentioned
in the example)  and switch to execute another task in a premptive
kernel ? Normally on the next  timer interrupt ? if , yes , then does a
non-premptive kernel check whether it is executing in kernel context
when a timer interrupt is triggered and based on whether it is in kernel
or user context switch to the next task or not ? i couldnt see or rather
find such a check being done in schedule() ,if one ever happens.. ..
hope my question was clear .

cheers,
Amith




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