Re: workloop thread priority = 81, lowest in kernel threads.
Re: workloop thread priority = 81, lowest in kernel threads.
- Subject: Re: workloop thread priority = 81, lowest in kernel threads.
- From: Quinn <email@hidden>
- Date: Thu, 10 Feb 2005 22:16:20 +0000
At 21:58 +0000 10/2/05, Parav Pandit wrote:
I read the IOKit funda.pdf , one thing is not clear to
me is:
TimerInterruptSource are handled using
thread_call_enter.
so if my timeout handler function is executing, is it
possible that secondary interrupt handler can be
served on other processor?
All workloop event sources (timers, commands, interrupts) acquire the
mutex associated with the workloop before executing the callback (in
workloop parlance they "close the gate"). Thus, regardless of thread
priorities, workloop callbacks are always serialised.
To take your example, if CPU 0 is executing a timer event source
callback, it will have closed the gate. If the system receives an
interrupt at that time, it will start up the workloop's thread to
execute the interrupt callback. Assume this thread runs on CPU 1.
That thread will try to acquire the workloop's mutex before calling
the interrupt callback. That mutex is currently held by the thread
on CPU 0, so the workloop thread will block. Ergo serialisation.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden