Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what are ladder governors and menu governors?

What role do they play in the Operating system ?

like image 523
Sharat Chandra Avatar asked Oct 20 '09 23:10

Sharat Chandra


1 Answers

A mobile CPU has multiple idle states it can go into, to save power when not doing anything. The states that save more power generally take more time to get in and out of. These two source files describe two different methods for picking the best state to enter.

If a too-deep state is entered immediately, then it will be awoken too soon to justify the higher transition cost. Conversely, if a too-shallow state is selected, then potential power savings will be missed.

The ladder governor enters the lightest state first, and will only move on to the next deeper state if a sleep was long enough, as defined by some measure. It would first go to sleep in state 1, then 2, then 3, and so on, until either the deepest available state is reached, or the CPU is restarted after too short a time. In this case, the governor will pick state 1 next time.

The menu governor does not necessarily follow this progression, but can jump into a deeper state immediately, if it determines that this is likely to be worthwhile.

like image 130
Andy Grover Avatar answered Sep 20 '22 03:09

Andy Grover