Novel techniques for controlling a processor's clock frequency and/or fan so as to prevent overheating are disclosed. The invention attempts to maximize the processing speed of the processor while preventing overheating or to reduce power consumption. In a preferred embodiment, the invention monitors a processor's activity and its temperature. When there is no activity for the processor, a slowed clock frequency is used, thereby saving power and lowering the thermal heat produced by the processor. On the other hand, when there is activity for the processor, a fast clock frequency is used. However, when prolonged activity (i.e., sustained fast clock frequency) causes the processor's temperature to become dangerously high for proper operation, the clock frequency is reduced and/or a fan is activated so as to prevent overheating. The invention may be implemented as an apparatus or a method.