Method of canceling a DB2 thread
First Claim
1. A method of canceling a DB2 thread in response to an operator command, comprising the steps of:
- (a) locating the thread to be canceled;
(b) making the thread nondispatchable;
(c) obtaining a set of DB2 latches including a LMB WRITE latch, an ASCE startup latch, an ASCE shutdown latch, a current address space latch, and a System Agent latch;
(d) invoking a DB2 thread termination module;
(e) releasing said set of DB2 latches; and
(f) making the thread dispatchable.
7 Assignments
0 Petitions
Accused Products
Abstract
A DB2 thread cancellation method permits operator intervention to terminate a DB2 thread. After the thread to be canceled has been located, a series of one or more SRBs is scheduled to cancel the thread. The basic approach is an iterative one, involving (1) making the thread nondispatchable, i.e., freezing execution of work associated with the thread to prevent such work from making undesirable environmental changes while the thread canceling operation is in progress, (2) testing to ensure that canceling the thread at that moment will not create certain undesirable side effects, primarily in the context of serialization of DB2 resource usage; (3) invoking the DB2 thread cancellation routine; (4) making the thread dispatchable again to permit the cancellation process to begin; (5) receiving a message whether the cancellation request was completed successfully, and (6) returning a status code indicating a successful or unsuccessful cancellation attempt. The foregoing steps are repeated until a success status code is received or until a timeout, i.e., until a specified number of unsuccessful attempts has been made.
20 Citations
2 Claims
-
1. A method of canceling a DB2 thread in response to an operator command, comprising the steps of:
-
(a) locating the thread to be canceled; (b) making the thread nondispatchable; (c) obtaining a set of DB2 latches including a LMB WRITE latch, an ASCE startup latch, an ASCE shutdown latch, a current address space latch, and a System Agent latch; (d) invoking a DB2 thread termination module; (e) releasing said set of DB2 latches; and (f) making the thread dispatchable.
-
-
2. A method of canceling a DB2 thread in response to an operator command, comprising the steps of:
-
(a) locating the thread to be canceled; (b) making the thread nondispatchable by determining whether the thread is associated with a task control block (TCB) and if so, scheduling a service request block (SRB) to set the thread'"'"'s dispatchability status to nondispatchable, (c) determining whether the thread is in the process of terminating and if so, setting the thread'"'"'s dispatchability status to dispatchable and terminating execution of the method; (d) obtaining a set of DB2 latches including a LMB WRITE latch, an ASCE startup latch, an ASCE shutdown latch, a current address space latch, and a System Agent latch; (e) invoking a DB2 thread termination module; (f) releasing said set of DB2 latches; (g) setting the thread'"'"'s dispatchability status to dispatchable; (h) receiving a completion report from the SRB specifying whether the thread was successfully terminated; and (i) if the completion report indicates that the thread was not successfully terminated, and if steps (b) through (h) have not been repeated a specified number of times, then repeating steps (b) through (h).
-
Specification