IP Library › Granted Patent US 9,256,465
Granted Patent B2
US 9,256,465 · App. 13/289,730 · Granted Feb 9, 2016

Process device context switching

Inventors: Robert Scott Hartog (Windemere, FL); Ralph Clay Taylor (Deland, FL); Michael Mantor (Orlando, FL); Kevin McGrath (Los Gatos, CA); Sebastien Nussbaum (Lexington, MA); Nuwan Jayasena (Sunnyvale, CA); Rex McCrary (Oviedo, FL); Mark Leather (Los Gatos, CA); Philip J. Rogers (Pepperell, MA); Thomas R. Woller (Austin, TX)
Assignee: Advanced Micro Devices, Inc.
G06F9/4881G06F9/4812
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 9,256,465
App. No.
13/289,730
Granted
Feb 9, 2016
Kind
B2
Abstract

Methods, systems, and computer readable media embodiments are disclosed for preemptive context-switching of processes running on an accelerated processing device. A method includes, responsive to an exception upon access to a memory by a process running on a accelerated processing device, whether to preempt the process based on the exception, and preempting, based upon the determining, the process from running on the accelerated processing device.

Claims (61)

1. A method, comprising:

receiving a notification that an attempt to retrieve data from a memory for a requesting process running on an accelerated processing device failed;

determining a type of memory exception that occurred based on the received notification;

accessing collected updatable statistics associated with the determined type of memory exception;

responsive to the notification, determining whether to preempt the process based upon the statistics; and

initiating preempting the process from running on the accelerated processing device based upon the determining whether to preempt the process.

2. The method of claim 1 , wherein the determining whether to preempt the process is performed by an operating system.

3. The method of claim 1 , wherein the attempt to retrieve the data from the memory for the requesting process running on the accelerated processing device failed due to the requested data being absent from an accessible area of the memory.

4. The method of claim 3 , wherein a kernel mode driver determines to preempt the process.

5. The method of claim 4 , wherein the determining by the kernel mode driver comprises:

determining to preempt rather than stall the process based upon the accessed statistics.

6. The method of claim 1 , wherein the determining whether to preempt the process comprises:

determining to preempt rather than stall the process based upon the determined type.

7. A system comprising:

a memory configured to collect and update statistics associated with memory exceptions; and

an accelerated processing device coupled to the memory and configured to:

run at least one process on the accelerated processing device;

generate a request for data from the memory for the at least one process;

receive one or more instructions to preempt the at least one process based on a failed attempt to retrieve the data from the memory in response to the generated request, the instructions based on the collected statistics; and

responsive to the one or more instructions, preempt the at least one process from running on the accelerated processing device.

8. The system of claim 7 , further comprising:

an operating system configured to:

determine whether to preempt the at least one process; and

generate the one or more instructions to preempt the at least one process.

9. The system of claim 8 , further comprising:

a memory management unit configured to:

receive the request for the data;

determine that the data is absent from the memory; and

generate an interrupt associated with the absence.

10. The system of claim 9 , further comprising:

a translation lookahead buffer (TLB) coupled to the memory management unit and configured to return a TLB miss if the requested data is not present in the memory.

11. The system of claim 9 , further comprising:

at least one central processing unit coupled to the memory and configured to run one or more processes to initiate the at least one process on the accelerated processing device.

12. The system of claim 11 , further comprising:

a scheduling module configured to:

run on the central processing unit;

send instructions from the central processing unit to the accelerated processing device; and

receive notification from the operating system to preempt or context-switch the process running on the accelerated processing device.

13. The system of claim 12 , wherein the scheduling module includes at least one of a kernel mode driver, a hardware scheduler (HWS), and a software scheduler (SWS).

14. The system of claim 12 , wherein the scheduling module is further configured to:

determine whether to preempt rather than stall the at least one process based upon memory exception information maintained by the operating system.

15. The system of claim 14 , wherein the scheduling module is further configured to:

initiate preemption of the at least one process from the accelerated processing device.

16. The system of claim 15 , wherein the scheduling module is further configured to:

initiate context-switching a second process on the accelerated processing device.

17. A non-transitory computer readable medium storing instructions, wherein the instructions, if executed, cause a method comprising:

receiving a notification that an attempt to retrieve data from a memory for a requesting process running on an accelerated processing device failed;

determining a type of memory exception that occurred based on the received notification;

accessing collected updatable statistics associated with the determined type of memory exception;

responsive to the notification, determining by an operating system whether to preempt the process based upon the accessed collected statistics; and

preempting the process from running on the accelerated processing device based upon the determining whether to preempt the process.

18. The non-transitory computer readable medium of claim 17 , wherein the determining by the operating system comprises:

determining to preempt rather than stall the process based upon the determined type.

19. A method comprising:

receiving a signal in an operating system indicating that an attempt to retrieve data from a memory for a requesting process running on an accelerated processing device failed;

determining, in the operating system, a type of memory exception that occurred based on the received signal; and

transmitting, by the operating system, one or more instructions to preempt the process from running on the accelerated processing device based on the received signal and based on collected upgradable statistics associated with the determined type of memory exception.

20. A method, comprising:

detecting a failure of an attempt to retrieve data from a memory for a requesting process running on an accelerated processing device;

receiving one or more instructions from an operating system in response to the detected failure, the one or more instructions further based on collected upgradable statistics associated with a determined type of memory exception responsible for the detected failure; and

preempting the process from running on the accelerated processing device based on the received one or more instructions.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 23, 2012
From: HARTOG, ROBERT SCOTT; TAYLOR, RALPH CLAY; MANTOR, MICHAEL; MCGRATH, KEVIN; NUSSBAUM, SEBASTIEN; JAYASENA, NUWAN; MCCRARY, REX; LEATHER, MARK; ROGERS, PHILIP J.; WOLLER, THOMAS
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 028091/0180 →
Continuity (2)
Provisional Application 61422595 · Dec 13, 2010
Related Publication 20120200579A1 · Aug 9, 2012