Re: Schedule() call in driver context.

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

 



Hi Greg,

I'm relatively new to this stuff but I think I will make some bold statements:

> With linux today, is there a specific process context (ie. kernel
> thread) associated with executing functions triggered by timers firing
> off?

No, a timer being fired wouldn't be associated with any single process,

The way the kernel knows about the currently executing process is by
means of the kernel stack. Now this stack is different for interrupts
and different for process. The interrupt handler calls your registered
function, but the current stack is not that of any process but is of
the timer interrupt.

Plus you wouldn't normally register a timer for a process but would
register a global timer when you load your driver. This timer fires
periodically and isn't tied to any one process.

Usually there is a list of processes sleeping and the timer would wake
them under certain conditions. For example with pdflush which is a
kernel thread that does deferred work, it is woken up only if it there
is some work to do. And it does this work in Process context. So this
could be an example of a timer triggering an execution of work in
process context. I hope this doesn't confuse everyone even more :)

Thanks,
-Joel

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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