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/