Browse Prior Art Database

Deadlock Detection Using Only Thread Identifiers

IP.com Disclosure Number: IPCOM000117160D
Original Publication Date: 1996-Jan-01
Included in the Prior Art Database: 2005-May-09
Document File: 2 page(s) / 54K

Publishing Venue

IBM

Related People

Behrs, J: AUTHOR [+2]

Abstract

Disclosed is a technique for detecting some deadlock conditions using only the thread identifiers of requesting (locking) and waiting threads. This is done using a table of waiting thread IDs and the thread IDs of threads which have the locks on which the waiting threads are waiting.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 53% of the total text.

Deadlock Detection Using Only Thread Identifiers

     for (all active entries in the thread wait table)
      {
        if (this entry's waiting_on_tid is equal to
  in_tid_to_wait) <1>
        {
          if (this entry's waiting_tid is equal to
  in_tid_to_wait_on) <2>
          {
            Log error
            return(DEADLOCK_ERROR)
          }
          else <3>
          {
            Log warning
          }
        }
      }
      return(OK)
    Deadlock Detection Algorithm

      Disclosed is a technique for detecting some deadlock conditions
using only the thread identifiers of requesting (locking) and waiting
threads.  This is done using a table of waiting thread IDs and the
thread IDs of threads which have the locks on which the waiting
threads are waiting.

The main data structure in this invention is the thread wait table,
which can be thought of as an array of entries each containing:
  o  waiting_tid: the thread ID of a thread that is currently
waiting.
  o  waiting_on_tid: the thread ID of the thread which holds the lock
      on which the above thread is waiting.

      Before a thread is put into a wait state on a lock, its thread
ID and the thread ID of the holder of the lock is added as an entry
in this table (if there are multiple holders of a shared lock, an
entry for each is added).

      The pseudo-code in the Figure contains...