Browse Prior Art Database

Detecting Abnormal Thread Termination Algorithm

IP.com Disclosure Number: IPCOM000104668D
Original Publication Date: 1993-May-01
Included in the Prior Art Database: 2005-Mar-19
Document File: 4 page(s) / 72K

Publishing Venue

IBM

Related People

Hlava, A: AUTHOR [+2]

Abstract

Disclosed is an algorithm for detecting an abnormal thread termination within an OS/2* operating-system application's process. It allows a central monitor function to distinguish normal thread terminations from abnormal thread terminations.

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

Detecting Abnormal Thread Termination Algorithm

      Disclosed is an algorithm for detecting an abnormal thread
termination within an OS/2* operating-system application's process.
It allows a central monitor function to distinguish normal thread
terminations from abnormal thread terminations.

      The main features of this algorithm are:

o   A thread-table used to track all active threads within the
    process.  This table also conatains information about the state
    of the thread.  This information can be used to recover from the
    abnormal termination.

o   A start-thread function which handles starting a new thread and
    updating the thread table.

o   An end-thread function which handles updating the thread table
    and ending the current thread.

o   A monitor-thread which waits for any thread terminations within
    the process and determines whether the termination was normal or
    abnormal.

      The following algorithm is used by the monitor-thread
(illustrated in Fig. 1):

1.  Wait for any thread within the process to terminate (using
    DosWaitThread function).

2.  When we come off the above wait, obtain an exclusive lock on the
    shared thread table.  Locking the thread table ensures that
    multiple threads starting or ending almost concurrently are
    proper ly handled.

3.  The DosWaitThread returns the Thread Identification (TID) of the
    thread which ended.  Find the entry in the thread table with this
    TID.

4.  If there was...