Subject: Re: correctly counting user/sys/interrupt time
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 04/08/2006 20:27:44
> Where does the process preemption on interrupt happen ?

As I understand it, depending on exactly what you mean, the answer is
either "it doesn't" or "in the hardware".

It happens in the hardware in that that's where the current flow of
execution is suspended and the interrupt handler entered.

It doesn't happen in that the current process, if any, is not
descheduled in favour of another (well, usually not, clock interrupts
being perhaps the most notable exception - I think most ports are
capable of rescheduling on any interrupt if they want to).

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B