APPROACH FOR CONTEXT SWITCHING OF LOCK-BIT PROTECTED MEMORY
First Claim
1. A method for processing atomic operations for a plurality of threads in a multi-threaded architecture, the method comprising:
- receiving a first request from a first thread in a first thread group to acquire access to a first memory location in a lock-protected shared memory;
determining whether a first address lock in a plurality of address locks is asserted, wherein the first address lock is associated the first memory location;
if the first address lock is asserted, thenrefusing the first request;
orif the first address lock is not asserted, thenasserting the first address lock;
asserting a first thread group lock in a plurality of thread group locks, wherein the first thread group lock is associated with the first thread group; and
granting the first request.
1 Assignment
0 Petitions
Accused Products
Abstract
A streaming multiprocessor in a parallel processing subsystem processes atomic operations for multiple threads in a multi-threaded architecture. The streaming multiprocessor receives a request from a thread in a thread group to acquire access to a memory location in a lock-protected shared memory, and determines whether a address lock in a plurality of address locks is asserted, where the address lock is associated the memory location. If the address lock is asserted, then the streaming multiprocessor refuses the request. Otherwise, the streaming multiprocessor asserts the address lock, asserts a thread group lock in a plurality of thread group locks, where the thread group lock is associated with the thread group, and grants the request. One advantage of the disclosed techniques is that acquired locks are released when a thread is preempted. As a result, a preempted thread that has previously acquired a lock does not retain the lock indefinitely.
-
Citations
20 Claims
-
1. A method for processing atomic operations for a plurality of threads in a multi-threaded architecture, the method comprising:
-
receiving a first request from a first thread in a first thread group to acquire access to a first memory location in a lock-protected shared memory; determining whether a first address lock in a plurality of address locks is asserted, wherein the first address lock is associated the first memory location; if the first address lock is asserted, then refusing the first request;
orif the first address lock is not asserted, then asserting the first address lock; asserting a first thread group lock in a plurality of thread group locks, wherein the first thread group lock is associated with the first thread group; and granting the first request. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A subsystem comprising:
a streaming multiprocessor configured to process atomic operations associated with a lock-protected shared memory by performing the steps of; receiving a first request from a first thread in a first thread group to acquire access to a first memory location in a lock-protected shared memory; determining whether a first address lock in a plurality of address locks is asserted, wherein the first address lock is associated the first memory location; if the first address lock is asserted, then refusing the first request;
orif the first address lock is not asserted, then asserting the first address lock; asserting a first thread group lock in a plurality of thread group locks, wherein the first thread group lock is associated with the first thread group; and granting the first request. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18)
-
19. A computing device configured to process atomic operations associated with a lock-protected shared memory comprising:
-
a streaming multiprocessor; a memory coupled to the streaming multiprocessor, wherein the memory includes an application program that includes instructions that, when executed by the streaming multiprocessor, cause the streaming multiprocessor to perform the steps of; receiving a first request from a first thread in a first thread group to acquire access to a first memory location in a lock-protected shared memory; determining whether a first address lock in a plurality of address locks is asserted, wherein the first address lock is associated the first memory location; if the first address lock is asserted, then refusing the first request;
orif the first address lock is not asserted, then asserting the first address lock; asserting a first thread group lock in a plurality of thread group locks, wherein the first thread group lock is associated with the first thread group; and granting the first request. - View Dependent Claims (20)
-
Specification