Lock sequencing to reorder and grant lock requests from multiple program threads
First Claim
Patent Images
1. A processor, comprising:
- multiple programmable units integrated on a single die, each of the multiple programmable units to provide multiple program threads of execution; and
circuitry integrated on the die, communicatively coupled to the multiple programmable units, the circuitry to reorder and grant lock requests received from the threads provided by the multiple programmable units based on an order in which the threads requested insertion into a sequence of lock grants, said circuitry configured to;
(1) (a) receive a request for a sequence number for a specified lock from a one of the multiple programmable units, the request specifying the lock and one of multiple sequence domains;
(b) in response to the received request for the sequence number;
determine a sequence number for the request within the specified sequence number domain; and
send a response identifying the determined sequence number within the specified sequence number domain to the one of the multiple programmable units;
(2) (a) receive a lock request specifying a sequence number and a sequence number domain;
(b) in response to the received lock request;
determine if the sequence number is the next sequence number in the sequence;
if the sequence number is not the next sequence number in the sequence, store an identifier of the received lock request in a memory based on the specified sequence number and sequence number domain;
if the sequence number is the next sequence number in the sequence, add the lock request to a queue of pending lock requests if the lock is currently locked and granting the lock request if the lock is currently unlocked;
(3) (a) receive a lock request not specifying a sequence number;
(b) in response to the lock request not specifying a sequence number;
determine if the lock is currently granted to another thread;
if the lock is currently granted to another thread, adding a queue entry for the received lock request;
if the lock is not currently granted to another thread, granting the lock;
(4) (a) receive an unlock request;
(b) in response to the unlock request;
determining if a queue associated with the lock has a pending lock request; and
if it is determined the queue associated with the lock has a pending lock request, granting the lock to the pending lock request.
1 Assignment
0 Petitions
Accused Products
Abstract
In general, in one aspect, the disclosure describes a processor that includes multiple multi-threaded programmable units integrated on a single die. The die also includes circuitry communicatively coupled to the programmable units that reorders and grants lock requests received from the threads based on an order in which the threads requested insertion into a sequence of lock grants.
43 Citations
21 Claims
-
1. A processor, comprising:
-
multiple programmable units integrated on a single die, each of the multiple programmable units to provide multiple program threads of execution; and circuitry integrated on the die, communicatively coupled to the multiple programmable units, the circuitry to reorder and grant lock requests received from the threads provided by the multiple programmable units based on an order in which the threads requested insertion into a sequence of lock grants, said circuitry configured to; (1) (a) receive a request for a sequence number for a specified lock from a one of the multiple programmable units, the request specifying the lock and one of multiple sequence domains; (b) in response to the received request for the sequence number; determine a sequence number for the request within the specified sequence number domain; and send a response identifying the determined sequence number within the specified sequence number domain to the one of the multiple programmable units; (2) (a) receive a lock request specifying a sequence number and a sequence number domain; (b) in response to the received lock request; determine if the sequence number is the next sequence number in the sequence; if the sequence number is not the next sequence number in the sequence, store an identifier of the received lock request in a memory based on the specified sequence number and sequence number domain; if the sequence number is the next sequence number in the sequence, add the lock request to a queue of pending lock requests if the lock is currently locked and granting the lock request if the lock is currently unlocked; (3) (a) receive a lock request not specifying a sequence number; (b) in response to the lock request not specifying a sequence number; determine if the lock is currently granted to another thread; if the lock is currently granted to another thread, adding a queue entry for the received lock request; if the lock is not currently granted to another thread, granting the lock; (4) (a) receive an unlock request; (b) in response to the unlock request; determining if a queue associated with the lock has a pending lock request; and if it is determined the queue associated with the lock has a pending lock request, granting the lock to the pending lock request. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A method, comprising:
-
(1) (a) receiving a request for a sequence number for a specified lock from at least one programmable unit, the request specifying the lock and one of multiple sequence domains; (b) in response to the received request for the sequence number; determining a sequence number for the request within the specified sequence number domain; and sending a response identifying the determined sequence number within the specified sequence number domain to the programmable unit; (2) (a) receiving a lock request specifying a sequence number and a sequence number domain; (b) in response to the received lock request; determining if the sequence number is the next sequence number in the sequence; if the sequence number is not the next sequence number in the sequence, storing an identifier of the received lock request in a memory based on the specified sequence number and sequence number domain; if the sequence number is the next sequence number in the sequence, adding the lock request to a queue of pending lock requests if the lock is currently locked and granting the lock request if the lock is currently unlocked; (3) (a) receiving a lock request not specifying a sequence number; (b) in response to the lock request not specifying a sequence number; determining if the lock is currently granted to another thread; if the lock is currently granted to another thread, adding a queue entry for the received lock request; if the lock is not currently granted to another thread, granting the lock; (4) (a) receiving an unlock request; (b) in response to the unlock request; determining if a queue associated with the lock has a pending lock request; and if it is determined the queue associated with the lock has a pending lock request, granting the lock to the pending lock request. - View Dependent Claims (14, 15, 16, 17)
-
-
18. A network device, comprising:
-
a switch fabric; and multiple blades coupled to the switch fabric, at least one of the multiple blades including a processor having multiple multi-threaded programmable units integrated on a single die and circuitry, communicatively coupled to the multiple programmable units, the circuitry to reorder and grant received lock requests received from the multiple programmable units based on an order in which threads requested insertion into a sequence of lock grants, said circuitry configured to; (1) (a) receive a request for a sequence number for a specified lock from a one of the multiple programmable units, the request specifying the lock and one of multiple sequence domains; (b) in response to the received request for the sequence number; determine a sequence number for the request within the specified sequence number domain; and send a response identifying the determined sequence number within the specified sequence number domain to the one of the multiple programmable units; (2) (a) receive a lock request specifying a sequence number and a sequence number domain; (b) in response to the received lock request; determine if the sequence number is the next sequence number in the sequence; if the sequence number is not the next sequence number in the sequence, store an identifier of the received lock request in a memory based on the specified sequence number and sequence number domain; if the sequence number is the next sequence number in the sequence, add the lock request to a queue of pending lock requests if the lock is currently locked and granting the lock request if the lock is currently unlocked; (3) (a) receive a lock request not specifying a sequence number; (b) in response to the lock request not specifying a sequence number; determine if the lock is currently granted to another thread; if the lock is currently granted to another thread, adding a queue entry for the received lock request; if the lock is not currently granted to another thread, granting the lock; (4) (a) receive an unlock request; (b) in response to the unlock request; determining if a queue associated with the lock has a pending lock request; and if it is determined the queue associated with the lock has a pending lock request, granting the lock to the pending lock request. - View Dependent Claims (19, 20, 21)
-
Specification