4 ms·
What's the postcondition of "whatever you do when the preemption timer goes off"? What's the observable side effect for the program?
by mike_hock 7y ago
What's the postcondition of "whatever you do when the preemption timer goes off"? What's the observable side effect for the program?
- im3w1l 7y agoI think I would state it like this: Yielding is communication with the OS. And communication with the OS is observable.
- dooglius 7y agoWell, it's a hint (but then so is `nice`), so it doesn't have any strict postcondition. The meaning of the hint would be that the process won't make good use of CPU cycles at present, and it would be preferable to yield to any other processes now, rather than being preempted later when it are busy.