Lock-Based Protocols A lock is a mechanism to control concurrent access to a data item Data items can be locked in two modes 1.exclusive (mode.Data item can be both read as well as written.X-lock is requested using lock-X instruction. 2.shared (S)mode.Data item can only be read.S-lock is requested using lock-S instruction. Lock requests are made to concurrency-control manager.Transaction can proceed only after request is granted. Database System Concepts-7th Edition 18.3 ©Silberscha乜,Korth and SudarshanDatabase System Concepts - 7 18.3 ©Silberschatz, Korth and Sudarshan th Edition Lock-Based Protocols ▪ A lock is a mechanism to control concurrent access to a data item ▪ Data items can be locked in two modes : 1. exclusive (X) mode. Data item can be both read as well as written. X-lock is requested using lock-Xinstruction. 2. shared (S) mode. Data item can only be read. S-lock is requested using lock-S instruction. ▪ Lock requests are made to concurrency-control manager. Transaction can proceed only after request is granted