A method is provided for optimizing CPU budgets associated with at least first and second threads executable in a time-partitioned real-time operating system. The first thread having a first CPU budget is executed, and at least a portion of the first thread's unused CPU budget is transferred to the second thread.