This paper extends the traditional fair queuing scheduling to the energy management domain, and presents the energy-based fair queuing scheduling, a novel class of energy-aware scheduling algorithms that support proportional energy use, effective time-constraint meeting and a flexible trade-off between them. The proposed algorithm, in combination with a mechanism that restricts the battery discharge rate, can achieve a target lifetime for Operating System (OS)-based mobile devices by including total energy consumption on all system components and systematically managing energy as the first-class resource.