Apparatus and method for processing threads requiring resources
First Claim
1. A data processing apparatus comprising:
- processing circuitry configured to process operations of pending threads using resources accessible to said processing circuitry;
thread handling circuitry configured to handle pending threads awaiting resources required for processing, wherein said thread handling circuitry comprises a thread buffer configured to buffer pending threads for which at least one resource is not available; and
resource checking circuitry configured to check whether at least one resource required by a requesting pending thread from said thread handling circuitry is available, to forward said requesting pending thread to said processing circuitry for processing if said at least one resource is available, and if said at least one resource is not available, to request a lock to said at least one resource and to retain said requesting pending thread in said thread buffer of the thread handling circuitry, wherein the checking on the availability of a resource is performed upon being requested by a pending thread;
wherein;
said resource checking circuitry, responsive to determining that the resource is both unavailable and not already locked, is configured to set a lock for an unavailable resource, make the requesting pending thread a lock owning thread, and add the requesting pending thread to the thread buffer of the thread handling circuitry, wherein a locked resource which becomes available remains available until the lock associated with the current lock owning thread of the locked resource is removed;
said resource checking circuitry is configured to on determining that a locked resource is unavailable for a subsequent pending thread which requires said locked resource and is not the current lock owning thread for said locked resource, set said subsequent pending thread as the lock owning thread for said locked resource, and add the subsequent pending thread to the thread buffer of the thread handling circuitry; and
said resource checking circuitry, upon the availability of the resource, is configured to send at least one pending thread in the thread buffer to the processing circuitry for processing using the available resource, determine whether the processed pending thread is the current lock owning thread, and if so remove the lock associated with an available locked resource.
1 Assignment
0 Petitions
Accused Products
Abstract
A data processing apparatus has processing circuitry for processing threads using resources accessible to the processing circuitry. Thread handling circuitry handles pending threads which are waiting for resources required for processing. When a request is made for a resource which is not available, a lock is set to ensure that once the resource becomes available, the resource remains available until the lock is removed. This prevents other threads reallocating the resource. When a subsequent pending thread requests access to the same locked unavailable resource, the lock is transferred to that subsequent thread so that the latest thread accessing that resource is considered the lock owning thread. The lock is removed once the lock owning thread is ready for processing.
28 Citations
20 Claims
-
1. A data processing apparatus comprising:
-
processing circuitry configured to process operations of pending threads using resources accessible to said processing circuitry; thread handling circuitry configured to handle pending threads awaiting resources required for processing, wherein said thread handling circuitry comprises a thread buffer configured to buffer pending threads for which at least one resource is not available; and resource checking circuitry configured to check whether at least one resource required by a requesting pending thread from said thread handling circuitry is available, to forward said requesting pending thread to said processing circuitry for processing if said at least one resource is available, and if said at least one resource is not available, to request a lock to said at least one resource and to retain said requesting pending thread in said thread buffer of the thread handling circuitry, wherein the checking on the availability of a resource is performed upon being requested by a pending thread;
wherein;said resource checking circuitry, responsive to determining that the resource is both unavailable and not already locked, is configured to set a lock for an unavailable resource, make the requesting pending thread a lock owning thread, and add the requesting pending thread to the thread buffer of the thread handling circuitry, wherein a locked resource which becomes available remains available until the lock associated with the current lock owning thread of the locked resource is removed; said resource checking circuitry is configured to on determining that a locked resource is unavailable for a subsequent pending thread which requires said locked resource and is not the current lock owning thread for said locked resource, set said subsequent pending thread as the lock owning thread for said locked resource, and add the subsequent pending thread to the thread buffer of the thread handling circuitry; and said resource checking circuitry, upon the availability of the resource, is configured to send at least one pending thread in the thread buffer to the processing circuitry for processing using the available resource, determine whether the processed pending thread is the current lock owning thread, and if so remove the lock associated with an available locked resource. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. A data processing apparatus comprising:
-
processing means for processing operations of pending threads using resources accessible to said processing means; thread handling means for handling pending threads awaiting resources required for processing, wherein said thread handling means comprises a thread buffer means for buffering pending threads for which at least one resource is not yet available; and resource checking means for checking whether at least one resource required by a requesting pending thread from said thread handling means is available, for forwarding said requesting pending thread to said processing means for processing if said at least one resource is available, and if said at least one resource is not available, for requesting a lock to said at least one resource and retaining said requesting pending thread in said thread buffer means of said thread handling means, wherein the checking on the availability of a resource is performed upon being requested by a pending thread;
wherein;said resource checking means, responsive to determining that the resource is both unavailable and not already locked, is configured to set a lock for an unavailable resource, make the requesting pending thread a lock owning thread, and add the requesting pending thread to said thread buffer means of the thread handling means, wherein a locked resource which becomes available remains available until the lock associated with the current lock owning thread of the locked resource is removed; said resource checking means, on determining that a locked resource is unavailable for a subsequent pending thread which requires said locked resource and is not the current lock owning thread for said locked resource, is configured to set said subsequent pending thread as the current lock owning thread for said locked resource and add the subsequent pending thread to the thread buffer means of the thread handling means; and said resource checking means, upon the availability of the resource, is configured to send at least one thread in the thread buffer means to the processing means for processing using the available resource, determine whether the processed pending thread is the current lock owning thread, and if so remove the lock associated with an available locked resource.
-
-
20. A method of processing data using a data processing apparatus comprising processing circuitry configured to process operations of pending threads using resources accessible to said processing circuitry, and thread handling circuitry configured to handle pending threads awaiting resources required for processing, wherein said thread handling circuitry comprises a thread buffer configured to buffer pending threads for which at least one resource is not yet available;
-
said method comprising steps of; (a) checking whether at least one resource required by a requesting pending thread from said thread handling circuitry is available; (b) if said at least one resource is available, then forwarding said requesting pending thread to said processing circuitry for processing using said at least one resource; (c) if said at least one resource is not available, then; (i) determining whether a lock was given for the at least one resource (ii) if the lock was not given, requesting a lock to said at least one resource for said requesting pending thread and retaining said requesting pending thread in said thread buffer of said thread handling circuitry, wherein the checking of the availability of a resource is performed upon being requested by a pending thread; and (iii) if the resource is already locked, setting the requesting pending thread for which said at least one resource is requested as a lock owning thread for said at least one resource, and adding the requesting pending thread to the thread buffer of the thread handling circuitry; (d) checking whether a locked resource required by a subsequent pending thread from said thread handling circuitry is available, wherein a locked resource which becomes available remains available until the lock associated with the current lock owning thread of the locked resource is removed; (e) if said locked resource is unavailable for the subsequent pending thread and said subsequent pending thread is not the current lock owning thread for said locked resource, setting said subsequent pending thread as the lock owning thread for said locked resource and adding the subsequent pending thread to the thread buffer of the thread handling circuitry; and (f) upon the availability of the resource, sending at least one pending thread in the thread buffer to the processing circuitry for processing using the available resource, determining whether the processed pending thread is the current lock owning thread, and if so removing the lock associated with an available locked resource.
-
Specification