Power managed lock optimization
First Claim
1. A method comprising:
- a first processor of a plurality of processors attempting to acquire a lock for a thread being executed;
responsive to failing to acquire the lock, determining that at least one additional iteration of attempting to acquire the lock is permitted for the thread;
responsive to determining that the additional iteration is permitted, waiting for an event prior to initiating another iteration in the first processor;
a second processor of the plurality of processors releasing the lock; and
the second processor sending an event message to an event control unit responsive to releasing the lock, wherein the event message indicates the event; and
the event control unit waking the first processor responsive to the event message.
0 Assignments
0 Petitions
Accused Products
Abstract
In an embodiment, a timer unit may be provided that may be programmed to a selected time interval, or wakeup interval. A processor may execute a wait for event instruction, and enter a low power state for the thread that includes the instruction. The timer unit may signal a timer event at the expiration of the wakeup interval, and the processor may exit the low power state in response to the timer event. The thread may continue executing with the instruction following the wait for event instruction. In an embodiment, the processor/timer unit may be used to implement a power-managed lock acquisition mechanism, in which the processor is awakened a number of times to check the lock and execute the wait for event instruction if the lock is not free, after which the thread may block until the lock is free.
-
Citations
20 Claims
-
1. A method comprising:
-
a first processor of a plurality of processors attempting to acquire a lock for a thread being executed; responsive to failing to acquire the lock, determining that at least one additional iteration of attempting to acquire the lock is permitted for the thread; responsive to determining that the additional iteration is permitted, waiting for an event prior to initiating another iteration in the first processor; a second processor of the plurality of processors releasing the lock; and the second processor sending an event message to an event control unit responsive to releasing the lock, wherein the event message indicates the event; and the event control unit waking the first processor responsive to the event message. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer accessible storage medium storing a plurality of instructions which, when executed on a plurality of processors in a system, cause a first processor of the plurality of processors to:
-
attempt to acquire a lock for a thread being executed by the first processor; responsive to failing to acquire the lock, determine that at least one additional iteration of attempting to acquire the lock is permitted for the thread; and responsive to determining that the additional iteration is permitted, wait for an event prior to initiating another iteration in the first processor; and
wherein the computer accessible storage medium is further storing a second plurality of instructions which, when executed on a second processor of the plurality of processors, cause the second processor to send an event message to an event control unit indicating the event indicating a release of the lock, wherein the event control unit is configured to wake the first processor responsive to the event message. - View Dependent Claims (8, 9, 10)
-
-
11. An apparatus comprising:
-
a plurality of processors; an event control unit coupled to the plurality of processors; and a storage device configured to store a plurality of instructions; wherein a first processor of the plurality of processors, responsive to executing instructions from the plurality of instructions; attempts to acquire a lock for a thread being executed; responsive to failing to acquire the lock, determines that at least one additional iteration of attempting to acquire the lock is permitted for the thread; and responsive to determining that the additional iteration is permitted, waits for an event prior to initiating another iteration in the first processor; and wherein a second processor of the plurality of processors, responsive to executing instructions from the plurality of instructions; releases the lock; and sends an event message to the event control unit indicating the event responsive to releasing the lock, wherein the event control unit is configured to wake the first processor responsive to the event message. - View Dependent Claims (12, 13, 14, 15, 16)
-
-
17. A system comprising:
-
a plurality of processors; and an event control unit coupled to the plurality of processors, wherein a first processor of the plurality of processors is configured to transmit an event message to the event control unit responsive to releasing a lock, and wherein a second processor of the plurality of processors is configured to wake from a low power state responsive to an indication from the event control unit, wherein the event control unit is configured to transmit the indication responsive to the event message, and wherein the second processor is configured wait for the event responsive to detecting that the lock is not available and responsive to detecting that another iteration of attempting to acquire the lock is permitted for a thread executing on the second processor. - View Dependent Claims (18, 19, 20)
-
Specification