Abstract
Ryu and Thomasian have analyzed several varieties of optimistic concurrency control under two
assumptions: that the characteristics of a transaction remain constant throughout its execution, and
that the proportion of committing transactions is fixed (in order to avoid an unrealistic biasing of
the transaction mixture). We show how both of these assumptions can be relaxed. First, we allow
an aborted transaction to resample its execution time from the distribution that describes the trans-
action class execution times. Second, we allow transactions to change their class if they are aborted.
These assumptions are more appropriate for analyzing special applications of optimistic concurrency
control, such as nonblocking data structures and real-time optimistic transaction processing. We
use our analyses to show that OCC performance has different characteristics in the new transaction
models, and to analyze a simple nonblocking queue algorithm.

1 Introduction

Many types of database concurrency control have been proposed, including static locking, two-phase

locking, certification, multiversion concurrency control, and optimistic concurrency control [2]. In this

paper, we analyze optimistic concurrency control (OCC) [14]. Optimistic concurrency control is so

named because it makes the optimistic assumption that data conflicts are rare. A transaction accesses

data without regard to possible conflicts. If a data conflict does occur, the transaction is aborted and

restarted.

Menasce and Nakanishi [17] present a Markov chain model of OCC in which aborted transactions

leave, then reenter the transaction processing system as new transactions. Morris and Wong [18, 19] note

that generating new transactions to replace aborted ones biases the transaction processing system towards

executing short fast transactions. These authors provide an alternative solution method that avoids the

bias by requiring that the transaction that replaces the aborted transaction be identical to the aborted

transaction. Ryu and Thomasian [24] extend this model of OCC to permit a wide variety of execution

We can calculate the rate at which a committing transactions conflict with a class c transaction, 7, by

setting 7, to be the proportion of committing transactions that conflict with a class c transaction:

(V 1)4,
S= U(V)

where b is the expected execution time of all transactions.

Given the system utilization, we can calculate the per-class conflict rate. From the per-class conflict

rate, we can calculate the per-class utilizations, and from the per-class utilizations, we can calculate the

system utilization. The output system utilization is a decreasing function of the input system utilization.

In the FF model, the utilization is bounded by 1, so the unique root in [0..1] can be found using a binary

search iteration. In the VF model, it is possible for the utilization to be greater than 1, so the root finder

must use one of the standard nonlinear equation solution methods [1].

2.1.2 Solving The VV Model

In the VV transaction model, when a transaction aborts, it leaves the system and a new transaction

enters. As a result, the proportion of committing class c transactions is no longer f, and instead depends

on the probability that a class c transaction commits, pc, and the average execution time of a class c

transaction. The solution method for the VV model is based on iteratively finding a root for the vector

P.

In order to calculate the conflict rate, we need to know the proportion of transactions Sk that are

executing a class k transaction. When a process is executing a class k transaction, it executes for an

expected bk seconds. If one was to observe a very large number of transaction executions, say M, then

a class k transaction would be executed about Mfk times. Thus, the observation period would take

_i=1 Mfibi seconds, during which a class k transaction would be executed for Mfkbk seconds. By the
theory of alternating renewal processes [23], we have
C
Sk =fkbk/ fibi (3)
i=1
If process is executing a class k transaction, it will finish at rate 1/bk. When the transaction completes,

it will commit at rate pk, and if it commits, it will conflict with a class c transaction with probability

NI(k, c). Therefore,

7c = (V 1) 1Skpk(k, c)bk

(V 1) EC (fkbk 1 fib)pk(k, c)/bk

ViL 1 1(k, c)fkk (4)

Given the probability that transactions of each transaction class commits, p', we can calculate conflict

rate 7c for each transaction class. Given the conflict rate for a transaction class 7c, we can calculate the

probability that the transaction will commit pc.

Unlike the case with the FF and the VF models, for the VV model, we need to iterate on a vector.

We make use of a property of the system of equations to find a rapidly converging iterative solution: if