Fill the gaps in the following statements.A transaction that involves multiple database nodes is called a Answer 1 Question 1 transaction.The Answer 2 Question 1 level ensures that a transaction does not see any intermediate state or uncommitted changes made by other transactions.In the two-phase locking protocol, the Answer 3 Question 1 phase is where a transaction acquires all the locks it needs without releasing any locks.The Answer 4 Question 1 phase in the two-phase locking protocol is where a transaction releases its locks but cannot acquire any new locks.The term Answer 5 Question 1 refers to the ability of a database system to recover and maintain consistency after a failure.In a distributed system, the query Answer 6 Question 1 site is the location where an update transaction is initially issued.Most of the NoSQL databases can only provide Answer 7 Question 1 consistency, which is a weaker type of consistency.Answer 8 Question 1 consistency is a subtype of read-your-writes consistency that only guarantees that a process can read its own written data during a session.Answer 9 Question 1 consistency assures that when a newly written value is read the first time, all subsequent reads on this data item will not return any older valuesThe main benefits of replication include increased Answer 10 Question 1 performance and robustness against Answer 11 Question 1 of single nodes.
Question
Fill the gaps in the following statements.A transaction that involves multiple database nodes is called a Answer 1 Question 1 transaction.The Answer 2 Question 1 level ensures that a transaction does not see any intermediate state or uncommitted changes made by other transactions.In the two-phase locking protocol, the Answer 3 Question 1 phase is where a transaction acquires all the locks it needs without releasing any locks.The Answer 4 Question 1 phase in the two-phase locking protocol is where a transaction releases its locks but cannot acquire any new locks.The term Answer 5 Question 1 refers to the ability of a database system to recover and maintain consistency after a failure.In a distributed system, the query Answer 6 Question 1 site is the location where an update transaction is initially issued.Most of the NoSQL databases can only provide Answer 7 Question 1 consistency, which is a weaker type of consistency.Answer 8 Question 1 consistency is a subtype of read-your-writes consistency that only guarantees that a process can read its own written data during a session.Answer 9 Question 1 consistency assures that when a newly written value is read the first time, all subsequent reads on this data item will not return any older valuesThe main benefits of replication include increased Answer 10 Question 1 performance and robustness against Answer 11 Question 1 of single nodes.
Solution
- Distributed
- Isolation
- Growing
- Shrinking
- Durability
- Home
- Eventual
- Session
- Monotonic read
- Read
- Failures
Similar Questions
In the two-phase locking protocol, a transaction can release its locks before it has obtained all the locks it needs.Question 4AnswerTrueFalse
Which modification of the Two-Phase Locking Protocol requires transactions to hold all locks until they commit or abort?
Explain how the Two Phase Locking Protocol works.Does this protocol guarantee serializability of transactions?Does this protocol guarantee that transaction deadlock will not occur?
22.1.2 Guaranteeing Serializability by Two-Phase LockingA transaction is said to follow the two-phase locking protocol if all locking opera-tions (read_lock, write_lock) precede the first unlock operation in the transaction. 4Such a transaction can be divided into two phases: an expanding or growing (first)phase, during which new locks on items can be acquired but none can be released;and a shrinking (second) phase, during which existing locks can be released but nonew locks can be acquired. If lock conversion is allowed, then upgrading of locks(from read-locked to write-locked) must be done during the expanding phase, anddowngrading of locks (from write-locked to read-locked) must be done in the4This is unrelated to the two-phase commit protocol for recovery in distributed databases (see Chapter25).22.1 Two-Phase Locking Techniques for Concurrency Control 783(a) T1 Initial values: X=20, Y=30Result serial schedule T1followed by T2 : X=50, Y=80Result of serial schedule T2followed by T1 : X=70, Y=50read_lock(Y );read_item(Y );unlock(Y );write_lock(X );read_item(X );X := X + Y;write_item(X );unlock(X );write_lock(X );read_item(X );X := X + Y;write_item(X );unlock(X );read_lock(X );read_item(X );unlock(X );write_lock(Y );read_item(Y );Y := X + Y;write_item(Y );unlock(Y );read_lock(X );read_item(X );unlock(X );write_lock(Y );read_item(Y );Y := X + Y;write_item(Y );unlock(Y );(b)(c)Timeread_lock(Y );read_item(Y );unlock(Y );Result of schedule S:X=50, Y=50(nonserializable)T2T1 T2Figure 22.3Transactions that do not obey two-phase lock-ing. (a) Two transactions T1 and T2. (b) Resultsof possible serial schedules of T1 and T2. (c) Anonserializable schedule S that uses locks.shrinking phase. Hence, a read_lock(X) operation that downgrades an already heldwrite lock on X can appear only in the shrinking phase.Transactions T1 and T2 in Figure 22.3(a) do not follow the two-phase locking proto-col because the write_lock(X) operation follows the unlock(Y) operation in T1, andsimilarly the write_lock(Y) operation follows the unlock(X) operation in T2 . If weenforce two-phase locking, the transactions can be rewritten as T1 and T2, asshown in Figure 22.4. Now, the schedule shown in Figure 22.3(c) is not permittedfor T1 and T2 (with their modified order of locking and unlocking operations)under the rules of locking described in Section 22.1.1 because T1 will issue itswrite_lock(X) before it unlocks item Y; consequently, when T2 issues its read_lock(X),it is forced to wait until T1 releases the lock by issuing an unlock (X) in the schedule.784 Chapter 22 Concurrency Control Techniquesread_lock(Y );read_item(Y );write_lock(X );unlock(Y )read_item(X );X := X + Y;write_item(X );unlock(X );read_lock(X );read_item(X );write_lock(Y );unlock(X )read_item(Y );Y := X + Y;write_item(Y );unlock(Y );T1 T2Figure 22.4Transactions T1 and T2, which are thesame as T1 and T2 in Figure 22.3, butfollow the two-phase locking protocol.Note that they can produce a deadlock.It can be proved that, if every transaction in a schedule follows the two-phase lock-ing protocol, the schedule is guaranteed to be serializable, obviating the need to testfor serializability of schedules. The locking protocol, by enforcing two-phase lock-ing rules, also enforces serializability.Two-phase locking may limit the amount of concurrency that can occur in a sched-ule because a transaction T may not be able to release an item X after it is throughusing it if T must lock an additional item Y later; or conversely, T must lock theadditional item Y before it needs it so that it can release X. Hence, X must remainlocked by T until all items that the transaction needs to read or write have beenlocked; only then can X be released by T. Meanwhile, another transaction seeking toaccess X may be forced to wait, even though T is done with X; conversely, if Y islocked earlier than it is needed, another transaction seeking to access Y is forced towait even though T is not using Y yet. This is the price for guaranteeing serializabil-ity of all schedules without having to check the schedules themselves.Although the two-phase locking protocol guarantees serializability (that is, everyschedule that is permitted is serializable), it does not permit all possible serializab
What are the phases of a transaction? Select one:a. Control, check and read phaseb. Assert, commit and verify phase.c. Put, get and execute phase.d. Read, validation and write phase.e. Leech, seed and share phase
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.