Claims
- 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.
- 2) The method of claim 1 further comprising:
a) allocating, to one or more other real-time threads, respective one or more other portions of said time slot for which said one or more other real-time threads are guaranteed said CPU resources; and b) executing said one or more other real-time threads for their said respective one or more other portions of said time slot.
- 3) The method of claim 2 further comprising: executing the second real-time thread (which corresponds to the non-real-time operating system) during an unallocated portion of the time slot, whenever at least one portion of the time slot is not allocated.
- 4) The method of claim 2 further comprising: allowing at least one of said real-time threads to request a portion of said time slot for which said at least one of said real-time threads will be guaranteed said CPU resources.
- 5) The method of claim 2 wherein the time slot is defined by an APIC, which issues an interrupt.
- 6) The method of claim 5 wherein the APIC issues an APIC interrupt every 1 ms.
- 7) The method of claim 6 wherein the APIC interrupt is selected from the group consisting of: maskable and non-maskable.
- 8) The method of claim 5 wherein a performance counter issues a performance-counter interrupt in order to switch allocation of said CPU resources between said real-time threads.
- 9) The method of claim 8 wherein the performance-counter interrupt is selected from the group consisting of: maskable and non-maskable.
- 10) A computer-readable medium having computer-executable instructions for performing the steps recited in claim 7.
- 11) A computer-readable medium having computer-executable instructions for performing the steps recited in claim 9.
- 12) A method of scheduling CPU resources comprising:
a) defining a time slot for which said CPU resources are allocated; b) determining at least one portion of said time slot to allocate said CPU resources to at least one real-time thread; and c) executing, for each said at least one portion of said time slot, said at least one real-time thread.
- 13) The method of claim 12 wherein the time slot is defined by an APIC, which issues an interrupt.
- 14) The method of claim 13 wherein the APIC issues an APIC interrupt every 1 ms.
- 15) The method of claim 13 wherein the APIC interrupt is selected from the group consisting of: maskable and non-maskable.
- 16) The method of claim 12 wherein said at least one real-time thread is at least two, and a performance counter issues a performance-counter interrupt in order to switch allocation of said CPU resources between said at least two real-time threads.
- 17) The method of claim 16 wherein the performance-counter interrupt is selected from the group consisting of: maskable and non-maskable.
- 18) The method of claim 12 wherein said at least one portion of said time slot is dynamically determined based on historical use of said CPU resources by said at least one real-time thread.
- 19) A computer-readable medium having computer-executable instructions for performing the steps recited in claim 15.
- 20) A computer-readable medium having computer-executable instructions for performing the steps recited in claim 17.
- 21) A computer-readable medium having computer-executable instructions for performing the steps recited in claim 18.
- 22) A method of scheduling CPU resources on a uni-processor machine such that at least first and second real-time threads dependent on one another are synchronized, the method comprising:
a) defining a time slot for which said CPU resources are allocated; b) determining a first portion of said time slot for which CPU resources should be allocated to said first real-time thread; c) determining a second portion of said time slot for which CPU resources should be allocated to said second real-time thread; d) if the first real-time thread does not own a spinlock, executing the first real-time thread until one of the following events transpires:
i) said first portion of said time slot expires, or ii) the first real-time thread needs first data from the second real-time thread; e) if the first real-time thread is waiting on first data from the second real-time thread, acquiring said spinlock; f) if the second real-time thread does not own said spinlock, executing the second real-time thread until one of the following events transpires:
i) said second portion of said time slot expires, or ii) the second real-time thread is waiting on second data from the first real-time thread; g) if the second real-time thread is waiting on second data from the second real-time thread, acquiring said spinlock; h) the first real-time thread releasing said spinlock when said first data is available; and i) the second real-time thread releasing said spinlock when said second data is available, whereby synchronization is accomplished by only allowing execution of the first real-time thread when it is not in possession of the spinlock and only allowing execution of the first real-time thread when it is not in possession of the spinlock.
- 23) The method of claim 22 further comprising one or more other real-time threads being executed by the uni-processor machine during respective one or more other portions of said time slot, whereby synchronization is accomplished by only allowing execution of one of said real-time threads when it is not in possession of the spinlock.
- 24) The method of claim 23 wherein the time slot is defined by an APIC, which issues an interrupt.
- 25) The method of claim 24 wherein the APIC issues an APIC interrupt every 1 ms.
- 26) The method of claim 25 wherein the APIC interrupt is selected from the group consisting of: maskable and non-maskable.
- 27) The method of claim 26 wherein a performance counter issues a performance-counter interrupt in order to switch allocation of said CPU resources between the first and second real-time threads.
- 28) The method of claim 27 wherein the performance-counter interrupt is selected from the group consisting of: maskable and non-maskable.
- 29) A computer-readable medium having computer-executable instructions for performing the steps recited in claim 28.
Parent Case Info
[0001] This application claims priority to provisional U.S. application Ser. No. 60/234,965, which was filed on Sep. 23, 2000. This application also claims priority to non-provisional U.S. application Ser. No. 09/531,397, which was filed on Mar. 21, 2000. Both of these applications are incorporated herein by reference in their entirety.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60234965 |
Sep 2000 |
US |
Continuation in Parts (1)
|
Number |
Date |
Country |
Parent |
09531397 |
Mar 2000 |
US |
Child |
09961649 |
Sep 2001 |
US |