Friday, 27 August 2021
Concurrency Control Protocols
If a transaction has obtained a __________ lock, it can read but cannot write on the item
a) Shared mode
b) Exclusive mode
c) Read only mode
d) Write only mode
If a transaction has obtained a ________ lock, it can both read and write on the item
a) Shared mode
b) Exclusive mode
c) Read only mode
d) Write only mode
A transaction can proceed only after the concurrency control manager ________ the lock to the transaction
a) Grants
b) Requests
c) Allocates
d) None of the mentioned
If a transaction can be granted a lock on an item immediately in spite of the presence of another mode, then the two modes are said to be ________
a) Concurrent
b) Equivalent
c) Compatible
d) Executable
A transaction is made to wait until all ________ locks held on the item are released
a) Compatible
b) Incompatible
c) Concurrent
d) Equivalent
The situation where no transaction can proceed with normal execution is known as ________
a) Road block
b) Deadlock
c) Execution halt
d) Abortion
The protocol that indicates when a transaction may lock and unlock each of the data items is called as __________
a) Locking protocol
b) Unlocking protocol
c) Granting protocol
d) Conflict protocol
The two phase locking protocol consists which of the following phases?
a) Growing phase
b) Shrinking phase
c) Both a and b
d) None of the mentioned
If a transaction may obtain locks but may not release any locks then it is in _______ phase
a) Growing phase
b) Shrinking phase
c) Deadlock phase
d) Starved phase
If a transaction may release locks but may not obtain any locks, it is said to be in ______ phase
a) Growing phase
b) Shrinking phase
c) Deadlock phase
d) Starved phase
Which of the following cannot be used to implement a timestamp
a) System clock
b) Logical counter
c) External time counter
d) None of the mentioned
A logical counter is _________ after a new timestamp has been assigned
a) Incremented
b) Decremented
c) Doubled
d) Remains the same
The _________ requires each transaction executes in two or three different phases in its lifetime
a) Validation protocol
b) Timestamp protocol
c) Deadlock protocol
d) View protocol
During __________ phase, the system reads data and stores them in variables local to the transaction.
a) Read phase
b) Validation phase
c) Write phase
d) None of the mentioned
During the _________ phase the validation test is applied to the transaction
a) Read phase
b) Validation phase
c) Write phase
d) None of the mentioned
During the _______ phase, the local variables that hold the write operations are copied to the database
a) Read phase
b) Validation phase
c) Write phase
d) None of the mentioned
Read only operations omit the _______ phase
a) Read phase
b) Validation phase
c) Write phase
d) None of the mentioned
Friday, 20 August 2021
Conflict Serializability Assignment - S P SHARMA CLASSES
Question 1 : Consider the following schedules involving two transactions. Which one of the following statement is true?
S1: R1(X) R1(Y) R2(X) R2(Y) W2(Y) W1(X)
S2: R1(X) R2(X) R2(Y) W2(Y) R1(Y) W1(X)
- Both S1 and S2 are conflict serializable
- Only S1 is conflict serializable
- Only S2 is conflict serializable
- None
Question 2 : Consider the following schedules involving two transactions. Which one of the following statement is true?
S1: r1(x) r1(y) w2(x) w1(x) r2(y)
S2: r1(x) r3(y) w1(x) w2(y) r3(x) w2(x)
- Both S1 and S2 are conflict serializable
- Only S1 is conflict serializable
- Only S2 is conflict serializable
- None
S1: r1(X); r3(Y); r3(X); r2(Y); r2(Z); w3(Y); w2(Z); r1(Z); w1(X); w1(Z) S2: r1(X); r3(Y); r2(Y); r3(X); r1(Z); r2(Z); w3(Y); w1(X); w2(Z); w1(Z)
Which one of the following statements about the schedules is TRUE?
(A) Only S1 is conflict-serializable.
(B) Only S2 is conflict-serializable.
(C) Both S1 and S2 are conflict-serializable.
(D) Neither S1 nor S2 is conflict-serializable.
Question 4 : Let
Consider the statements
P :S is conflict-serializable.Q : IfT3 commits beforeT1 finishes, thenS is recoverable.
Which one of the following choices is correct?
- Both
P andQ are true P is true andQ is falseP is false andQ is true- Both
P andQ are false
-
'''Practical No: 9: WAP in Python to create a binary file with roll_no, name and marks of the students and update the marks of...
-
List of Python with CS practical for class 12 Part – 1 Python with CS 1) WAP in Python to find the factorial of a number using fun...
-
''' Practical No: 7: WAP in Python to create a binary file with name and roll number of the students. Search for a given roll ...