11 // Loop forever, simply trying to yield to a different environment.
12 // Instead of busy-waiting like this,
13 // a better way would be to use the processor's HLT instruction
14 // to cause the processor to stop executing until the next interrupt -
15 // doing so allows the processor to conserve power more effectively.
19 // Break into the JOS kernel monitor after each sys_yield().
20 // A real, "production" OS of course would NOT do this -
21 // it would just endlessly loop waiting for hardware interrupts
22 // to cause other environments to become runnable.
23 // However, in JOS it is easier for testing and grading
24 // if we invoke the kernel monitor after each iteration,
25 // because the first invocation of the idle environment
26 // usually means everything else has run to completion.