I am aware that a Windows' system will crash with a stop error and "blue screen" for a few common reasons, some of which may be:
- A device driver or OS function that runs in kernel-mode space experiences an unhandled exception (memory access issues etc.)
- A device driver or OS function explicitly crashes the system because it detects corruption or the risk of corruption
- Faulty hardware
What I am interested in is that when examining a crash dump (in say WinDBG), the dump will always indicate the thread that caused the crash, which allows examination of the stack for that thread, providing a history of the calls that led to the bugcheck and crash. Walking this stack gives clues as to how to prevent the issue in the future (e.g. a particular driver needing updating etc.).
Knowing this, I asked myself the following question which reveals a gap in my knowledge:
- On a multicore/processor system multiple threads will be executing simultaneously
- Therefore surely there is the potential for two threads to simultaneously raise a bugcheck?
What happens under these circumstances? Have I got a fundamental misunderstanding of how the OS handles multicore/processor systems in terms of concurrent execution and access to memory and hardware (IRQL and Deferred Procedure Calls (DPC) etc.)?
Thanks