|
|
|
|
|
by slezakattack
2711 days ago
|
|
I think you may have misunderstood. I think OP meant that you have to explicitly "freeze" or "halt" the program to save on battery. In other forms of software development, it's not common to explicitly state in your code that you're waiting for the kernel to interrupt you. The kernel's scheduler decides when to interrupt and pre-empts the running process. There are definitely systems out there where the running process gives processor control back to the kernel scheduler but I don't think it's common. |
|
Just type "ps ax" into your shell, most processes will be in state "S", sleeping because of a system call.
My point is, you kind of have to go out of your way to spin CPU without actually having any work in front of you.