BillTrost asks whether and how one could do XP in building an operating system. Oh yes. I've built operating systems and XP would help. The main thing to do when building such a thing is to have the absolute minimum amount of code actually deal with hardware, processor scheduling, and the like. The bulk of an operating system is APIs, which are eminently testable by standard UnitTest''''''s. You need "little more" from the kernel than to be sure that it saves and restores context correctly when interrupting a task, in order for the great majority of the code to be able to be written as if single-threaded. In the kernel itself, see TestForaRaceCondition for part of the testing one can do. Individual interrupt routines can be tested out of interrupt mode to be sure that they dispatch values to the right queue and such. Offhand, I can't think of anything that couldn't be tested rather conventionally. Got any suggestions for things that might be hard? We can kick them around. -- RonJeffries