2.10 Database Example: Simultaneous Resource Possession


Consider now that there is significant update activity in the database server and therefore, transactions need to acquire a database lock before they can update the database. Once a lock is acquired, a database transaction will either use the CPU or the disk while holding the database lock. Thus, two resources will be held by the transaction at the same time (i.e., a database lock and the CPU, or a database lock and the disk). This situation is called simultaneous resource possession (SRP). In an SRP situation, a customer in a QN is allowed to hold one or more resources at the same time. A slightly different, yet equivalent, view is that a customer is executing in parallel, both at the database server lock and at the resource (i.e., CPU or disk) server. Figure 2.10 shows three time axes: one for the CPU, one for the database lock, and another for the disk. The picture shows how a transaction spends time waiting and holding each of these resources.

Figure 2.10. Time axes illustration of SRP.

graphics/02fig10.gif

Figure 2.11 illustrates the QN with a queue for database locks. Dashed arrows from the database locks to the CPU and disk indicate that database locks are held simultaneously with these two resources. The probability that a lock requested by a transaction is being held by another transaction increases with the system load. See [9] for analytic models with database locking mechanisms. Queuing networks with SRP can also be used to model software contention. In this case, a software resource (e.g., a thread or a critical section) is being held simultaneously with another physical resource (e.g., a CPU or disk). Similarly, SRP can model other types of hardware contention (e.g., a bus in a shared-memory multiprocessor is held while a memory module is used).

Figure 2.11. QN with simultaneous resource possession. Database locks are held simultaneously with the CPU and with the disk.

graphics/02fig11.gif



Performance by Design. Computer Capacity Planning by Example
Performance by Design: Computer Capacity Planning By Example
ISBN: 0130906735
EAN: 2147483647
Year: 2003
Pages: 166

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net