1 ) For a CPU running a non-real-time operating system, a method of scheduling CPU resources comprising: a) defining a time slot for which a first real-time thread will be guaranteed said CPU resources for at least a first portion of said time slot; b) treating the non-real-time operating system as a second real-time thread; c) allocating, to the second real-time thread, a second portion of the time slot during which the second real-time thread will be guaranteed said CPU resources; d) executing the first real-time thread during said first portion of the time slot; and e) executing the second real-time thread during said second portion of the time slot.