×

Methods and apparatus providing non-blocking access to a resource

  • US 7,844,973 B1
  • Filed: 12/09/2004
  • Issued: 11/30/2010
  • Est. Priority Date: 12/09/2004
  • Status: Active Grant
First Claim
Patent Images

1. In a computerized device, a method for controlling access to a resource by a group of threads requiring access to the resource via a monitor, the method comprising:

  • providing exclusive access to the resource within the computerized device to a first thread by allowing the first thread exclusive access of the monitor;

    maintaining an entry list of threads that are awaiting access to the monitor using a block-free list joining mechanism that allows threads to join the entry list of threads without threads having to exclusively lock the entry list of threads and without blocking operation of the threads during the process of joining the entry list of threads; and

    upon completion of access to the resource by the first thread, operating the first thread to manipulate the entry list of threads to identify a successor thread within the entry list of threads as being a candidate thread to obtain exclusive access of the monitor for gaining exclusive access to the resource,wherein maintaining an entry list of threads that are awaiting access to the monitor using a block-free list joining mechanism comprises;

    maintaining a list available indicator identifying if a second thread is presently accessing the entry list of threads to join the entry list of threads;

    enabling a third thread to join the list of entry threads while the second thread is presently accessing the entry list of threads by performing the operations of;

    determining that the list available indicator identifies that a second thread is presently accessing the list of threads;

    determining if a join attempt thread identity area contains a thread identity of a former thread that attempted to join the list of entry threads while the second thread was presently accessing the entry list of threads, and if so, providing the thread identity of the former thread in a next thread identity area associated with the third thread; and

    providing an identity of the third thread in the join attempt thread identity area to create a join list of threads that attempted to join the list of entry threads while the second thread is presently accessing the entry list of threads, the join list of threads including the third thread and any former threads that attempted to join the list of entry threads while the second thread was presently accessing the entry list of threads.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×