APPARATUS AND METHOD FOR PROCESSING THREADS REQUIRING RESOURCES
First Claim
1. A data processing apparatus comprising:
- processing circuitry configured to process processing threads using resources accessible to said processing circuitry;
thread handling circuitry configured to handle pending threads awaiting resources required for processing; and
resource checking circuitry configured to check whether at least one resource required by a pending thread from said thread handling circuitry is available, to forward said pending thread to said processing circuitry for processing if said at least one resource is available, and to request access to said at least one resource and retain said pending thread in said thread handling circuitry if said at least one resource is not available;
wherein;
said resource checking circuitry is configured to set a lock for an unavailable resource if said unavailable resource is requested for a pending thread and said unavailable resource is not already locked, and to set the pending thread for which the unavailable resource is requested as a lock owning thread for said unavailable resource, wherein a locked resource which becomes available remains available until the lock associated with the locked resource is removed;
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, said resource checking circuitry is configured to set said subsequent pending thread as the lock owning thread for said locked resource; and
said resource checking circuitry is configured to remove the lock associated with an available locked resource if the current lock owning thread for said available locked resource is forwarded to said processing circuitry for processing.
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.
-
Citations
20 Claims
-
1. A data processing apparatus comprising:
-
processing circuitry configured to process processing threads using resources accessible to said processing circuitry; thread handling circuitry configured to handle pending threads awaiting resources required for processing; and resource checking circuitry configured to check whether at least one resource required by a pending thread from said thread handling circuitry is available, to forward said pending thread to said processing circuitry for processing if said at least one resource is available, and to request access to said at least one resource and retain said pending thread in said thread handling circuitry if said at least one resource is not available;
wherein;said resource checking circuitry is configured to set a lock for an unavailable resource if said unavailable resource is requested for a pending thread and said unavailable resource is not already locked, and to set the pending thread for which the unavailable resource is requested as a lock owning thread for said unavailable resource, wherein a locked resource which becomes available remains available until the lock associated with the locked resource is removed; 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, said resource checking circuitry is configured to set said subsequent pending thread as the lock owning thread for said locked resource; and said resource checking circuitry is configured to remove the lock associated with an available locked resource if the current lock owning thread for said available locked resource is forwarded to said processing circuitry for processing. - 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 processing threads using resources accessible to said processing circuitry; thread handling means for handling pending threads awaiting resources required for processing; and resource checking means for checking whether at least one resource required by a pending thread from said thread handling circuitry is available, for forwarding said pending thread to said processing means for processing if said at least one resource is available, and for requesting access to said at least one resource and retaining said pending thread in said thread handling means if said at least one resource is not available;
wherein;said resource checking means is configured to set a lock for an unavailable resource if said unavailable resource is requested for a pending thread and said unavailable resource is not already locked, and to set the pending thread for which the unavailable resource is requested as a lock owning thread for said unavailable resource, wherein a locked resource which becomes available remains available until the lock associated with the locked resource is removed; 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, said resource checking means is configured to set said subsequent pending thread as the lock owning thread for said locked resource; and said resource checking means is configured to remove the lock associated with an available locked resource if the current lock owning thread for said available locked resource is forwarded to said processing means for processing.
-
-
20. A method of processing data using a data processing apparatus comprising processing circuitry configured to process processing threads using resources accessible to said processing circuitry, and thread handling circuitry configured to handle pending threads awaiting resources required for processing;
-
said method comprising steps of; (a) checking whether at least one resource required by a pending thread from said thread handling circuitry is available; (b) if said at least one resource is available, then forwarding said pending thread to said processing circuitry for processing; (c) if said at least one resource is not available, then; (i) requesting access to said at least one resource for said pending thread and retaining said pending thread in said thread handling circuitry; and (ii) setting a lock for said at least one resource, and setting the pending thread for which said at least one resource is requested as a lock owning thread for said at least one resource, (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 locked resource is removed; (e) if said locked resource is unavailable 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 (f) if said locked resource is available and said subsequent pending thread is the current lock owning thread for said locked resource, forwarding said subsequent pending thread to said processing circuitry for processing and removing the lock associated with said locked resource.
-
Specification