×

System and Method for Implementing Reader-Writer Locks Using Hardware Transactional Memory

  • US 20140258645A1
  • Filed: 03/05/2013
  • Published: 09/11/2014
  • Est. Priority Date: 03/05/2013
  • Status: Active Grant
First Claim
Patent Images

1. A method, comprising:

  • performing by a computer;

    beginning execution of a multithreaded application that comprises one or more requests to acquire a shared reader-writer lock, wherein the shared reader-writer lock comprises a tail pointer and an ordered list of zero or more nodes, wherein the shared reader-writer lock controls access to a critical section of code or a shared resource by concurrently executing threads of the application;

    a given thread of the application inserting a node in the ordered list of nodes, wherein each node in the ordered list of nodes is owned by a respective thread that holds the shared reader-writer lock or that desires access to the critical section of code or shared resource in a read-only mode or in a write mode, and wherein only one thread can hold the shared reader-writer lock in a write mode at a time;

    subsequent to said inserting, the given thread acquiring the shared reader-writer lock in a read-only mode or in a write mode;

    subsequent to said acquiring, the given thread releasing the shared reader-writer lock, wherein said releasing comprises removing the inserted node from the ordered list of nodes;

    wherein at least one of said inserting or said releasing comprises updating a value of the tail pointer within a hardware transaction or modifying a field of at least one node in the ordered list of nodes within a hardware transaction.

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