There exists four locking protocols in distributed database systems: Centralized 2PL (two-phase locking), Primary copy 2PL, Distributed 2PL, Majority locking.
Centralized to 2PL is almost a direct reflection of 2PL protocol in centralized database system. Centralized 2PL is based on the following principles.
(1) A single site maintains all locking information, i.e. there is only one lock manager for entire distributed DBMS that can grant and release locks.
(2) All replicated copies of data items require replication of subtransactions in different local sites.
(3) Local transaction managers control processing of transactions at the local sites in the same way as in centralized 2PL.
(4) Centralized lock manager checks if a request about lock on a data item is compatible with the locks already granted; if it is so lock manager grants a lock, otherwise a request about lock is put in a queue.
Centralized 2PL cantralizes all decisions related to granting locks on data items distributed over many database sites. Such strategy significantly slows down processing of database transactions at different sites.
The next strategy distributes lock managers to local sites to avoid one central bottleneck when accessing lock table.