Methods and apparatuses for dynamically budgeting power usage in a data
processing system. In one aspect, a data processing system, includes: one
or more components including a first component; and a computing element,
such as a microprocessor or a microcontroller, coupled to the first
component to obtain one or more operating signals from the first
component and to determine, based at least in part on the one or more
operating signals, an estimate of a power consumption requirement of the
one or more components for operating under the current condition. In one
example, one or more sensors are used to determine information on actual
power usage for a past period of time. A performance level setting of a
second component, such as a CPU, a GPU, or a bus, is determined using the
estimate and the information on the actual power usage, such as the
operating voltage and frequency.