Object-Based Locking Protocol for Replicated Objects Kyouji Hasegawa and Makoto Takizawa Dept. of Computers and Systems Engineering Tokyo Denki University Email kyo, taki @takilab.k.dendai.ac.jp Abstract Distributed systems are composed of multiple objects. Each object supports more abstract operations than the low- level read and write operations. The objects are replicated to increase the performance, reliability, and availability. In this paper, we discuss a synchronization method to make multiple replicas of objects mutually consistent. In the tra- ditional optimistic two-phase locking (O2PL), every replica is first locked in a read mode to write an object. Finally, all the replicas are locked in a write mode when the trans- action commits. We propose a novel object-based locking (OBL) method based on the abstract operations. Here, the number of the replicas locked is decided based on the access frequency and the strength of the lock mode. 1. Introduction In distributed systems, it is critical to keep data objects consistent in to presence of multiple accesses and faults. Many kinds of concurrency control methods [2] are dis- cussed so far. In the famous two-phase locking (2PL) proto- col [2, 3], the transactions lock the objects before computing the operations on the objects. Most systems adopt the strict 2PL protocol where the locks obtained are released at the end of the transactions in order to resolve the cascading abort. One of difficulties in the distributed applications like the groupware is that objects are locked for a longer time. The optimistic concurrency control [7] is discussed to reduce the overhead implied by the locking. Here, the transaction manipulates objects without locking the objects. When the transaction ends up, commits unless the objects ma- nipulated by are manipulated by other transactions in the modes conflicting with . In order to increase the reliability, availability, and per- formance of the system, the objects in the system are repli- cated. In the mobile database systems [1], the objects are also replicated by cashing the data in the fixed servers into the mobile clients in order to resolve the disconnected oper- ations [4, 6]. Here, it is critical to make the replicas of the object mutually consistent. Jing [5] discusses an optimistic two-phase locking (O2PL) method to maintain the mutual consistency among the replicas. In the O2PL, if a transac- tion would write an object , locks all the replicas of in a read mode. If locked, manipulates the repli- cas. When commits, tries to convert the mode on the replicas to a write mode. If succeeded, commits. Otherwise, aborts. The distributed applications are modeled to be a col- lection of multiple objects which are cooperating to achieve some objectives. CORBA [9] is becoming a standard frame- work of the distributed applications. The objects support more abstract operations to and . For example, a object supports and operations. In this paper, before each object is manipulated by an opera- tion, the object is locked in an abstract mode corresponding to the operation, e.g. mode for operation of the object. Two operations 1 and 2 support by an object conflict if the result obtained by applying 1 and 2 to depends on the application order of 1 and 2 . The conflicting relation between the lock modes is defined based on the conflicting operations. That is, if an operation 1 conflicts with 2 , the lock mode of 1 conflicts with 2 . We discuss a novel concurrency control to maintain the mutual consistency among the replicas. In this paper, we propose a novel locking scheme for the replicated objects, named ( - ) protocol. The num- ber of replicas to be locked depends on how the lock mode of the operation is and how the operation is invoked. The stronger and more frequently used the lock modes are, the fewer replicas are locked. In section 2, we present the system model. In section 3, we discuss the protocol. 2. System Model A distributed system is composed of multiple objects 1 which are cooperating by exchanging messages in the communication network . Let be a set of objects