Locking Mechanism Flashcards

1
Q

What can be done to ensure serializability?

A

Data items must be accessed in mutually exclusive manner.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is lock table usually implemented?

A

As an in memory hash table indexed on the name of the data item being locked.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Give status an representation of different type of requests in a lock table.

A

New request is added to end of queue. Granted if compatible with all earlier locks.
Unlock requests result in request being deleted.
If transaction aborts, all lock requests are deleted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a lock?

A

A mechanism to control concurrent access to a data item.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Name two modes in which data items can be locks.

A

X - Exclusive

S - Shared

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a locking protocol?

A

A set of rules followed by all transactions while requesting and releasing locks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does two phase locking protocol ensure?

A

Serializability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Name phases of two phase locking protocol.

A

Growing

Shrinking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is strict two phase locking?

A

Here, a transaction must hold all it’s exclusive locks till it commits/aborts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is W time stamp?

A

Largest time-stamp of any transaction that executed write(Q) successfully.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is R time stamp?

A

Largest time-stamp of any transaction that executed read(Q) successfully.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is granularity of locking?

A

Level in tree where locking is done.

Fine and coarse.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is intention lock?

A

When a node is in intention lock, explicit lock is being done at lower level of tree.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Name intention lock modes.

A

IS
IX
SIX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly