Waiting For The Electrician, Or Someone Like Him

Engine Crew Monograph No. 8
Last updated July 20, 1997

Gus Bjorklund, Progress Software Corporation

Introduction

Processes (remote clients, self-serving clients, servers, background i/o processes, etc.) that are using a multi-user Progress database operate on shared data. These data are either in the database, in the form of tables and indexes, or in the shared-memory data area in the form of various data structures and disk buffers. To ensure that two processes cannot change the same datum at exactly the same instant, access to these data are regulated with a system of locks and resource queues. The shared data structures are often called resources.

When a process needs to use a shared data structure, another process may already be using it. The process that encounters the conflict must wait for the prior user to finish. It does this by inserting itself into a wait queue for the resource and then waiting for a notification to continue. When the process that is using it is finished, it will remove the first waiting process from the wait queue and notify it that it can continue.

The Progress Monitor Utility will show the state of waiting processes and for which resource they are enqueued.

Resource Wait Queues

The first three resources listed below are sometimes held for long periods, perhaps as long as several minutes or more. The remaining resources are locked for much shorter periods, usually less than a millisecond (0.001 seconds)

When processes are waiting for access to one of these resources, the Progress Monitor will show a 4 character code in the "Wait" column of the User Control display (menu choice 1) and in oither displays that include process state information. The 4 character code indicates which resource the process is waiting for.

Here is a list of the 4 character codes shown in the Progress Monitor Utility, the purpose of the queue, and the meaning of the value in the next column of the User Control display:

Wait Column

Reason For Wait

Value of Next Column

--

Process is not waiting for a shared resource

Not meaningful

REC

Record lock conflict

Rowid to lock

SCH

Database schema lock

Lock type. 9 = share lock, 10 = exclusive

TRAN

Another transaction to end

Transaction identifier

RGET

Record get (fetch) consistency lock

Rowid

TXE

Transaction commit consistency lock

Lock type. 1 = share, 2 = exclusive

BKSH

Shared (read) access to a buffer in the database buffer pool

Block's dbkey

BKEX

Exclusive (update) access to a buffer in the database buffer pool

Block's dbkey

BKSI

Read with intent to update a buffer in the database buffer pool

Block's dbkey

DBRD

Database block being read from disk into buffer pool

Block's dbkey

DBWR

Database block to be written to disk from buffer pool

Block's dbkey

DBBK

Database block to be backed up before it is updated

Block's dbkey

BIRD

Before-image log data to be read from disk into bi buffer

Before-image log address

BIWR

Before-image log data to be written to disk from bi buffer

Before-image log address

AIRD

After-image log data to be read from disk into ai buffer

After-image log address

AIWR

After-image log data to be written to disk from ai buffer

After-image log address

IDLE

AIW or BIW unemployed: will write for food

Address of last data written

Go to monograph index

Copyright 1997, Progress Software Corp., All Rights Reserved