1. A method for scheduling a number of N threads among a set of M active threads in each context switch interval in a multi-threaded/multi-core processor having a given instruction window, comprising: determining, using a computer including the multi-threaded/multi-core processor, an actual power consumption of each running thread during a given context switch interval; associating a priority level with each of the active threads based on the actual power consumption determined for each running thread; predicting a new power consumption expected for each of the active threads during a next context switch interval in a current instruction window; and selecting a set of threads among the active threads to be scheduled based on the priority level associated with each of the active threads and the new power consumption predicted for each of the active threads in the current instruction window.