The Exclusive-Writer Approach to Updating Replicated Files in Distributed Processing Systems
Abstract
Consistency control protocols can be classified as either pessimistic or optimistic. Pessimistic protocols check for conflicting file accesses before a transaction references shared files; this prevents transaction restarts but adds intercomputer synchronization delays to execution response times TEOptimistic protocols avoid intercomputer synchronization delays for TEbut existing optimistic protocols repeatedly restart a transaction until it executes without conflict. Repeated restarts lengthen the time to finalize an update Tuand can saturate the computing andcommunication resources. We present two new optimistic protocols that avoid repeated restarts: The exclusive-writer protocol (EWP) and the exclusive writer protocol with locking option (EWL). EWP has no transaction restarts, database rollbacks, or deadlocks due to shared data access. But EWP ensures only a limited form of serializability. EWL is an extension of EWP that ensures full serializability. EWL has no database rollbacks. Also, EWL can guarantee that atransaction will be restarted at most once. To further reduce restarts, each site can independently and dynamically switch between primary site locking (PSL), which has no restarts, and EWL. Such switching requires no additional messages or delays to synchronize protocol selection. Analytic models are developed to study the response times (i.e., TEand Tu) of EWP, EWL, PSL, and basic timestamps (BTS). Our study reveals that EWP and EWL have the smallest TEsince neither requires update-log maintenance (unlike BTS) nor intercomputer synchronization delays for TE(unlike PSL). EWP has the smallest TUunless the cost of communicating and processing updates is high. TU(BTS) is larger than TU(PSL) and/or TU(EWL) over a wide range of parameter values due to the overhead of BTS update-log maintenance, database rollbacks, distributed conflict checking, and repeated restarts. Choosing between EWL and PSL for TUdepends on several parameters. TU(EWL) increases with update message costs and restart probability, while TU(PSL) is unaffected by these parameters. However, TU(PSL) increases more rapidly than TU(EWL) with waiting time for file locks and control message costs. We conclude that if limited serializability is acceptable, EWP should be used due to its simplicity and short response times. Otherwise, EWL has much appeal since it has good performance over a wide range of parameter values and permits dynamic switching with PSL to further improve performance. © 1985 IEEE