By mistake during testing, I have created a long loop at DISPATCH_LEVEL in a system thread. e.g. something like this:
DWORD dummy=0;
void systemThreadProc( IN PVOID pContext) {
…
KIRQL curIrql = KeRaiseIrqlToDpcLevel();
for (int j=0 ;j<50;j++)
{
for (int i=0;i<15000;i++) {
for (int k=0;k<20000;k++) {
dummy=0;
}
}
}
KeLowerIrql (curIrql);
…
}
In my 4 cores Win7 32bit system, this thread freezes the WHOLE PC (the mouse/keyboard didn’t response) for a minute before returning to normal operation. But why it freezes the system ?
-
I have a 4 processor machine, why it is not just the processor running the thread get frozen? Why the other 3 can’t just continue unaffected?
-
Does that imply DISPATCH_LEVEL affects the performance of the whole machine ?