COMPUTER FUNDAMENTALS

EMERGING TRENDS IN COMPUTING

CLOUD COMPUTING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Consider the following statements:Statement 1:When two processes are competing with each other causing data corruption, it is called deadlock. Statement 2:When two processes are waiting for each other directly or indirectly, it is called race condition.
A
Only statement 1 is true
B
Only statement 2 is true
C
Both statements are true
D
Both statements are false
Explanation: 

Detailed explanation-1: -Race Condition And Deadlock Both share some similarities, such as they both occur in multi-thread solutions and hamper device performance. However, both are not the same. A race condition occurs when two threads use the same variable at a given time. Deadlock exists when two threads seek one lock simultaneously.

Detailed explanation-2: -In this case, both threads will wait indefinitely for the resource held by the other thread. These threads are said to be deadlocked. Race conditions occur when two threads interact in a negatve (buggy) way depending on the exact order that their different instructions are executed.

There is 1 question to complete.