Browse Prior Art Database

Method to Facilitate Recovery Action on Interrupted Queue Operation When Serialized Using Perform Locked Operation Instructions

IP.com Disclosure Number: IPCOM000013172D
Original Publication Date: 2003-Jun-17
Included in the Prior Art Database: 2003-Jun-17
Document File: 4 page(s) / 72K

Publishing Venue

IBM

Abstract

Disclosed is a method to recover a double headed double threaded queue after an interruption or error that occurred while the queue was being moved to a local queue. This method employes the Perform Locked Operation (PLO) to move the queue and to set a recovery indicator that can be used to determine the correct recovery action.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 35% of the total text.

Page 1 of 4

  Method to Facilitate Recovery Action on Interrupted Queue Operation When Serialized Using Perform Locked Operation Instructions

  When a program attempts to move a global queue to a local queue, an interruption may occur that results in recovery code getting control to process the error. Since the interruption occured during the operation that moves the queue, it is difficult to acertain whether the operation was interrupted before the queue was moved, during the move, or after the move. If it was during the move, then the queue may have been left in an intermediate state and recovery will need to either back out the update or complete the update. If the queue is also used by other programs running under different threads, then some form of serialization must be used to prevent the other programs from updating the queue until recovery has made the queue intact. Currently, many of the techniques for queue serailization rely of the use of a lock, or an ENQ, or on a Compare Double and Swap instruction. Using a lock or an ENQ can lead to contention problems, and using Compare Double and Swap is not adequate when trying to determine during recovery whether the move operation was actually performed. A new solution is needed to to avoid these problems.

This invention describes a technique using the PLO instruction to update a queue anchor that facilitates the proper recovery action while allowing the queue to remain available to other programs running under separate threads even while the recovery process runs. Thus, the problems of serialization contention are solved as is the problem with Compare Double and Swap being inadequate.

The following diagrams illustrate how PLO is used to move a global queue anchor to a local queue anchor and how recovery can perform the correct recovery action.

---------------------------------------------------------

Time: t0 - this is how the Global_q_anchor, the Temp_q_anchor, and the Local_q_anchor appear prior to the PLO. Note that x and y are addresses of q elements, and n is an integer. A question mark indicates an unknown but insignificant address. A zero means a zero address. A key requirement in order for recovery is that the Temp_q_anchor Head must contain 0 at this point (which means that the program must initialize this field before any queue operations are performed).

Global_q_anchor Temp_q_anchor Local_q_anchor

+----------+ +----------+ +----------+

| Head x | | Head 0 | | Head 0 |

+----------+ +----------+ +----------+

| Tail y | | Tail ? | | Tail 0 |

+--------- + +----------+ +----------+

| Seq# n |

+----------+


---------------------------------------------------------

1

Page 2 of 4

Time: t1 - a local copy of the Global_q_anchor Seq# is obtained.

Global_q_anchor Temp_q_anchor Local_q_anchor

+----------+ +-----------+ +-----------+

| Head x | | Head 0 | | Head 0 |

+----------+ +-----------+ +-----------+

| Tail y | | Tail 0 | | Tail 0 |

+----------+ +-----------+ +-----------+

| Seq# n | ---+

+...