IP Library Granted Patent US 7,844,970
Granted Patent B2
US 7,844,970 · App. 11/466,156 · Granted Nov 30, 2010

Method and apparatus to control priority preemption of tasks

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,844,970
App. No.
11/466,156
Granted
Nov 30, 2010
Kind
B2
Abstract

A computer implemented method, apparatus, system, and computer usable program product for controlling preemption rates. A scheduler identifies a preemption interval in response to a plurality of processes being executed by a processor. Only a single preemption of a process occurs during the preemption interval. The scheduler preempts a currently running process only once during the preemption interval. The preemption interval is adjusted to increase performance in executing processes.

Claims (51)

1. A computer implemented method for controlling preemption rates, the computer implemented method comprising:

responsive to a plurality of processes being executed by a processor, determining a preemption interval, wherein the preemption interval is a minimum time interval before a priority preemption of a currently running process by a higher priority process occurs;

subtracting a last preemption time from a current time to determine a current time interval, wherein the current time interval is an interval of time since a most recently performed priority preemption of a process took place;

determining whether the preemption interval has expired, wherein the preemption interval has expired if the current time interval is greater than or equal to the preemption interval;

preempting the currently running process in response to a determination that the preemption interval has expired, wherein the preemption interval is adjusted upon determining that adjusting the preemption interval will reduce time in executing processes; and

responsive to performing the priority preemption, setting the last preemption time as the current time, wherein the last preemption time is a time at which the most recently performed priority preemption of a process took place.

2. The computer implemented method of claim 1 further comprising:

setting a preemption timer, wherein the preemption timer expires at the end of the preemption interval; and

responsive to a determination that the preemption interval has expired, performing a preemption of the currently running process.

3. The computer implemented method of claim 1 further comprising:

responsive to determining that adjusting the preemption interval will reduce time in executing the plurality of processes, adjusting the preemption interval to form an updated preemption interval.

4. The computer implemented method of claim 1 further comprising:

terminating execution of the currently running process; and

activating execution of a higher priority.

5. The computer implemented method of claim 1 wherein the preemption interval is a user defined amount of time.

6. The computer implemented method of claim 1 wherein the preemption interval is a default amount of time.

7. The computer implemented method of claim 1 further comprising:

receiving a new process that is a higher priority process than the currently running process;

adding the new process to a run queue associated with the processor; and

preempting the currently running process if the preemption interval has expired.

8. The computer implemented method of claim 1 further comprising:

determining whether the new process is a higher priority process than a currently running process based on a comparison of a predefined priority value for the new process and a predefined priority value for the currently running process.

9. The computer implemented method of claim 1 , wherein adjusting the preemption interval increases cache utilization.

10. The computer implemented method of claim 1 , wherein adjusting the preemption interval increases translation look-aside buffer hit rates.

11. An apparatus for controlling preemption rates, the apparatus comprising:

a computer comprising:

a storage device connected to a bus, wherein the storage device contains a computer usable program product; and

a processor, wherein the processor unit executes the computer usable program code to determine a preemption interval in response to a plurality of processes being executed by a processor, wherein the preemption interval is a minimum time interval before a priority preemption of a currently running process by a higher priority process occurs; wherein the processor subtracts a last preemption time from a current time to determine a current time interval, wherein the current time interval is an interval of time since a most recently performed priority preemption of a process took place; wherein the processor determines whether the preemption interval has expired, wherein the preemption interval has expired if the current time interval is greater than or equal to the preemption interval; wherein the processor preempts a currently running process in response to a determination that the preemption interval has expired, wherein the preemption interval is adjusted upon determining that adjusting the preemption interval will reduce time in executing processes; and wherein responsive to performing the priority preemption, the processor sets the last preemption time as the current time, wherein the last preemption time is a time at which the most recently performed priority preemption of a process took place.

12. A computer program product comprising:

a computer readable medium including computer usable program code for controlling preemption rates, said computer program product comprising:

computer usable program code for determining a preemption interval, wherein the preemption interval is a minimum time interval before a priority preemption of a currently running process by a higher priority process occurs, in response to a plurality of processes being executed by a processor;

computer usable program code for subtracting a last preemption time from a current time to determine a current time interval, wherein the current time interval is an interval of time since a most recently performed priority preemption of a process took place;

computer usable program code for determining whether the preemption interval has expired, wherein the preemption interval is expired if the current time interval is greater than or equal to the preemption interval;

computer usable program code for preempting the currently running process in response to a determination that the preemption interval has expired, wherein the preemption interval is adjusted upon determining that adjusting the preemption interval will reduce time in executing processes; and

computer usable program code for responsive to performing the priority preemption, setting the last preemption time as the current time, wherein the last preemption time is a time at which the most recently performed priority preemption of a process took place.

13. The computer program product of claim 12 further comprising:

computer usable program code for setting a preemption timer, wherein the preemption timer expires at the end of the preemption interval; and

computer usable program code for performing a preemption of the currently running process in response to a determination that the preemption timer has expired.

14. The computer program product of claim 12 further comprising:

computer usable program code for adjusting the preemption interval to form an updated preemption interval, responsive to determining that adjusting the preemption interval will reduce time in executing the plurality of processes.

15. The computer program product of claim 12 further comprising:

computer usable program code for terminating execution of the currently running process; and

computer usable program code for activating execution of a higher priority process.

16. The computer program product of claim 12 wherein the preemption interval is a user defined amount of time.

17. The computer program product of claim 12 further comprising:

computer usable program code for receiving a new process that is a higher priority process than the currently running process;

adding a new process to a run queue associated with the processor; and

preempting the currently running process if the preemption interval has expired.

18. A system for controlling preemption rates, the system comprising:

a processor, wherein the processor is executing a process in a plurality of processes waiting to be executed to form a currently running process; and

a scheduler, wherein the scheduler determines a preemption interval and preempts the currently running process, wherein the preemption interval is a minimum time interval before a priority preemption of the currently running process by a higher priority process occurs, wherein the scheduler subtracts a last preemption time from a current time to determine a current time interval, wherein the current time interval is an interval of time since a most recently performed priority preemption of a process took place; wherein the scheduler determines whether the preemption interval has expired, wherein the preemption interval has expired if the current time interval is greater than or equal to the preemption interval; wherein the currently running process is preempted in response to a determination that the preemption interval has expired, and wherein the preemption interval is adjusted upon determining that adjusting the preemption interval will reduce time in executing processes, and wherein responsive to performing the priority preemption, the scheduler sets the last preemption time as the current time, wherein the last preemption time is a time at which the most recently performed priority preemption of a process took place.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 13, 2015
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: LINKEDIN CORPORATION
Reel/Frame 035201/0479 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 22, 2006
From: THEURER, ANDREW MATTHEW
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 018153/0048 →