adplus-dvertising
frame-decoration

Question

Which of the following scenario give rise to deadlock (There are 2 processes)?

a.

P1 & P2 trying TO GET TO 2 resources R1 & R2.
P1 gets a LOCK ON R2
AND
P2 gets a LOCK ON R2
THEN
P1 tries TO GET a LOCK ON R2 but can’t because it IS locked BY P2
AND
P2 tries TO GET a LOCK ON R1 but can’t because it IS locked BY P1

b.

P1 & P2 trying TO GET TO 2 resources R1 & R2.
P1 gets a LOCK ON R1
AND
P2 gets a LOCK ON R1
THEN
P1 tries TO GET a LOCK ON R2 but can’t because it IS locked BY P2
AND
P2 tries TO GET a LOCK ON R1 but can’t because it IS locked BY P1

c.

P1 & P2 trying TO GET TO 2 resources R1 & R2.
P1 gets a LOCK ON R1
AND
P2 gets a LOCK ON R2
THEN
P1 tries TO GET a LOCK ON R2 but can’t because it IS locked BY P2
AND
P2 tries TO GET a LOCK ON R1 but can’t because it IS locked BY P1

d.

All of the mentioned

Answer: (c). P1 & P2 trying TO GET TO 2 resources R1 & R2.
P1 gets a LOCK ON R1
AND
P2 gets a LOCK ON R2
THEN
P1 tries TO GET a LOCK ON R2 but can’t because it IS locked BY P2
AND
P2 tries TO GET a LOCK ON R1 but can’t because it IS locked BY P1

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following scenario give rise to deadlock (There are 2 processes)?

Similar Questions

Discover Related MCQs

Q. Which of the following occurs when two connections need access to same piece of data concurrently and the meanwhile another is blocked because at a particular time, only one connection can have access?

Q. Point out the wrong statement.

Q. An XML deadlock graph has ______ main sections.

Q. _____________ section lists all the resources that were involved in the deadlock.

Q. ___________ is a deadlock between a statement that is reading and a statement that is performing some form of data modification.

Q. Which of the following query returns object names from partition IDs?

Q. Which of the following best practice should be carried out concerning data types?

Q. The transaction log supports which of the following operations?

Q. Point out the correct statement.

Q. Which of the log_reuse_wait_desc value has log_reuse_wait value 0?

Q. ACTIVE_TRANSACTION has log_reuse_wait value is _________

Q. Point out the wrong statement.

Q. ________ logging is not supported for memory-optimized tables.

Q. Index page deallocation during a ________ operation is always fully logged.

Q. Which of the following checkpoint has ‘recovery interval’ less than zero?

Q. Internal checkpoint is generated in response to which of the following event?

Q. __________ backups are taken in bulk or full recovery models only.

Q. Which of the following compression type is supported by SQL Server 2014?

Q. Point out the correct statement.

Q. Use _________ data compression to compress columnstore data with archival compression.