FUNDAMENTALS OF COMPUTER

DATABASE FUNDAMENTALS

BASICS OF BIG DATA

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 deadlockStatement 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 false
D
Both Statements are true
Explanation: 

Detailed explanation-1: -What is a Race Condition? When two processes are competing with each other causing data corruption.

Detailed explanation-2: -Race Condition And Deadlock 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-3: -A simple example of a race condition is a light switch. In some homes, there are multiple light switches connected to a common ceiling light. When these types of circuits are used, the switch position becomes irrelevant. If the light is on, moving either switch from its current position turns the light off.

Detailed explanation-4: -A race condition or race hazard is the condition of an electronics, software, or other system where the system’s substantive behavior is dependent on the sequence or timing of other uncontrollable events. It becomes a bug when one or more of the possible behaviors is undesirable.

There is 1 question to complete.