Port-pdp10 archive

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

Re: Interrupt handlers and mutex


Item (2) below when you say "That can't happen" , is that because the LWP that 
holds the mutex has also changed the IPL? If so, why the need for the interrupt 
handler to acquire the mutex? Otherwise, could you expound on item (2) because 
I am missing something?


On Dec 31, 2009, at 4:23 PM, Matt Thomas wrote:

> On Dec 31, 2009, at 11:52 AM, Frank Zerangue wrote:
>> Help request -- Mutex(9) indicates that mutex replaces the spl(9) system.
>> (1) When writing an interrupt handler, should the handler acquire a spin 
>> mutex before modifying some IO that may be accessed also by a LWP?
> Yes.  and the mutex should be initialized to use IPL_VM.
>> (2) What happens when the interrupt handler cannot acquire the mutex? Will 
>> the LWP that holds it ever be able to run again?
> That can't happen.  The cpu will spin until the mutex is acquired.
>> (3) Will a LWP that holds a spin mutex be pre-empted by the scheduler?
> no.

Home | Main Index | Thread Index | Old Index