×

Lock sequencing to reorder and grant lock requests from multiple program threads

  • US 7,853,951 B2
  • Filed: 07/25/2005
  • Issued: 12/14/2010
  • Est. Priority Date: 07/25/2005
  • Status: Expired due to Fees
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.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×