answersLogoWhite

0


Best Answer
  • T1: Write X // This acquires an exclusive lock: LockX
  • T2: Write Y // This acquires an exclusive lock: LockY
  • T2: Read X // This attempts to acquire a shared lock on X, but since X is locked already by T1, T2 is subsequently blocked by the system until X is freed.
  • T1: Read Y // This attempts to acquire a shared lock on Y, but since Y is locked already by T2, T1 is subsequently blocked by the system until Y is free.
  • T1: Commits // This should release all locks held by T1.
  • T2: Commits // This should release all locks held by T2.

* Note that "block" means the transaction will not proceed until the specified condition is met.

Now, since T2 is waiting for T1 to free X AND T1 is waiting for T2 to free Y, we get into a cycle of condition checking. These conditions will never be met because both transactions are waiting for the other one to do something, in order to proceed itself. Therefore we have a deadlock between T1 and T2 trying to access the shared resources X and Y.

The Wikipedia article on Two-phase locking may help you understand why this is strict 2-phase locking and what 2-phase locking is.

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Give an example where strict 2 phase locking is followed but the resulting schedule leads to deadlock Explain why the 2PL being followed here is strict and explain why there is deadlock?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Explain the conditions that results in a deadlock situation?

You choke.


What are the main limitations to the resource allocation graph used in deadlock detection. explain?

time Stamp


Explain how separation of power will lead to constitutional deadlock?

Separation of powers can lead to constitutional deadlock if the different branches of government cannot agree. However, this is part of the checks and balances put in place by the constitution.


What is deadlock and explain it?

A deadlock is when both sides can't agree on a decision or when something is stuck and can't move. In technology, a deadlock is a situation where a group of processes are permanently blocked as a result of each process having acquired a subset of the resources needed for its completion and waiting for release of the remaining resources held by others in the same group-thus making it impossible for any of the process to proceed.


How do you you schedule a match for major league gaming?

There is a setting in the game that allows you to do this, if you can find it it should explain to you how this works.


Explain the steps to be followed for the addition of floating point numbers?

df;ahdsfn;aldsnfhasodfna;dfknoadnf


Explain the concepts of recoverable schedule in dbms?

Transactions commit only after all transactions whose changes they read, commit


Explain how you an determine if the number is a solution of an equation?

Substitute the number in the equation. If the resulting statement is true the number is a solution to the equation.


Explain how three phases are generated in the UK?

Three phases generated in the United Kingdom should be no different than they are generated anywhere in the industrialized world. Either phase A is followed by phase B followed by phase C, or phase A is followed by phase C followed by phase B


A researcher performing an experiment introduces changes in an response variable and tries to explain or bring about resulting changes in the explanatory variable?

True


How do you schedule task explain with steps?

Bring up AVG interface.Go into Tools then Advanced Options/SettingsFind Schedules and click.Enter options wanted.


A researcher tries to explain or bring about resulting changes in the response variable by performing an experiment which introduces an explanatory variable?

Answer is True... Via ApexVs