9.2. MODEL VALIDATION AND EXPERIMENTAL ANALYSIS 65
all those locks are available, get them, then begin execution; thereafter, it is not allowed to ask for
more locks. This is called static locking, as against dynamic locking, where transactions get their locks
as they are needed. Intuitively, static locking has the disadvantage that transactions tend to hold on
to locks for a longer period than if they acquire the locks only when necessary. The advantage is that
once a transaction gets its locks, it will not be blocked (so there will be no deadlocks) because it will
not ask for more locks. Which is the better policy?
Fundamental to the problem of locking performance is the fact that locking is necessary only
because transactions are run in a multiprogramming fashion.With multiprogramming,there are two
kinds of contention. There is the usual resource contention − e.g., queueing for processor cycles and
I/O and, in the case of multiprocessor systems, contention over memories and buses; added to this is
data contention − conﬂicts over data that result in lock queues and transaction abortion. Each form
of contention degrades system performance. What is the effect of each, and how do they interact?
9.2 MODEL VALIDATION AND EXPERIMENTAL ANALYSIS
We now discuss some issues in model validation and experimental analysis, using the case study
above for illustration.
9.2.1 THE NEED FOR VALIDATION
To formulate a model for a complicated system with a limited number of equations and variables,
we must inevitably make assumptions and use approximations. However, we must make sure that
these assumptions and approximations do not remove essential features of system performance (e.g.,
linearizing what is actually nonlinear). Hence the need to validate the model with experimental
There is another, related reason for experimental measurements: There are often alternative
ways of modeling the same system, using different techniques. For example, there are models for
transaction locking that use Markov chains, and others that use queueing networks. In favoring a
particular technique and model, we therefore need some supporting evidence from experiments.
Even for the same model and technique, there is usually a choice of whether to adopt a par-
ticular assumption, or how to make a necessary approximation. In fact, experimental measurements
can help us make the choice.
In the case of database locking, for example, should a transaction’s own locks be taken into
account in calculating the probability of a conﬂict? Not having to do so may greatly simplify the
analysis. One could make the choice by developing the model both ways, and using simulation
measurements to see if the simpliﬁcation causes a signiﬁcant loss in accuracy.