ITPEC FE Morning October 2019 Question 31
ITPEC FE Morning October 2019 — Question 31 of 80
Database Lock Compatibility — shared locks allow concurrent reads; exclusive locks block everything.
Lock compatibility matrix for concurrency control:
- •Shared + Shared →
permitted(multiple readers OK) - •Shared + Exclusive →
denied - •Exclusive + Shared →
denied - •Exclusive + Exclusive →
denied
Why (a) is correct:
- A shared lock (S-lock) is for reading — multiple transactions can hold shared locks on the same resource simultaneously
Why not others:
- (b) Shared + Exclusive is denied — a writer would conflict with existing readers
- (c) Exclusive + Shared is denied — a reader would see uncommitted (dirty) data
- (d) Exclusive + Exclusive is denied — two concurrent writes cause data corruption
Key rule: Only shared locks are compatible with each other. Any involvement of an exclusive lock blocks all other lock requests.
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.