Subject: Re: smp status -- more details..
To: Paolo Losi <>
From: Bill Sommerfeld <>
List: tech-smp
Date: 08/22/2000 10:36:16
> What happens in the uniprocessor case if, during  that time window,
> you get an interrupt that fills the queue?
> I think you cannot protect the queue raising IPL because 
> in that case you're going to sleep with interrupts disabled.

The current IPL is part of the process context.  When the scheduler
switches to a new process, it drops to that other process's IPL.  (if
there is no other process to run, the system drops to the lowest IPL);
this happens after the outgoing process is enqueued in the proper
sleep queue, so any interrupt handler which calls wakeup() will not
run until after the process can be woken up.

> P.S. I'm reading the 4.4BSD Design and Implementation book.
> It would be really appreciated as an answer a section reference
> in that book or just a pointer to some NetBSD code to look at

4.4BSD: page 88-90; particularly, the top of page 90.

NetBSD code: look at the implementation of mi_switch() (in
kern/kern_synch.c) and each port's cpu_switch() (generally in

					- Bill