Patent ID: 11868818
Assignee: ADVANCED MICRO DEVICES, INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 8:
9. A method for locking an entry in a memory device, comprising:
executing a lock instruction of a thread to lock a particular memory entry of a memory device,
wherein the lock instruction is executed either speculatively or non-speculatively based on whether, during a particular time period, a number of times the particular memory entry was modified to by a second thread during a window of exposure of an earlier speculative lock exceeds a threshold number;
wherein executing the lock instruction non-speculatively includes disallowing modification by the second thread to the particular memory entry;
wherein executing the lock instruction speculatively includes permitting modification by the second thread to the particular memory entry; and
wherein the window of exposure is a time interval from a time when the particular memory entry was read during one of the earlier speculative locks to a time when the one of the earlier speculative lock completed.