Question: Suppose that Session 1, Session 2, and Session 3 are sessions connected concurrently to the same database instance. Suppose further that X, Y, and Z

Suppose that Session 1, Session 2, and Session 3 are sessions connected concurrently to the same database instance. Suppose further that X, Y, and Z are data objects that can be locked with a shared and exclusive lock

it is your turn to describe what will happen in each scenario below. For each scenario, indicate, for each session, whether it procures the requested lock, waits, or deadlocks. Make sure to explain your reasoning.

Scenario 7: Session 1 has a shared lock on X and Session 2 attempts to procure an exclusive lock on X.

Scenario 8: Session 1 has a shared lock on X, Session 2 has a shared lock on X, and Session 3 attempts to procure a shared lock on X.

Scenario 9: Session 1 has an exclusive lock on X and attempts to procure an exclusive lock on Y. Session 2 has an exclusive lock on Y and attempts to procure an exclusive lock on X.

Scenario 10: Session 1 has an exclusive lock on X and a shared lock on Y, and Session 2 attempts to procure an exclusive lock on Y.

Scenario 11: Session 1 has a shared lock on X and a shared lock on Y. Session 2 has a shared lock on Y and attempts to procure an exclusive lock on X.

Scenario 12: Session 1 has a shared lock on X and attempts to procure an exclusive lock on Y. Session 2 has a shared lock on Y and attempts to procure an exclusive lock on Z. Session 3 has a shared lock on Z and attempts to procure an exclusive lock on X.

.EDIT : I need answers to scenario 7-12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!