Unlock Career Sale: Flat 75% + Addl. 15% Off + 30-days Extra Lab on self-paced Courses | Use Coupon UC15 in Checkout | Offer Expires In

  Enroll Now

Apache ZooKeeper

ZooKeeper - Race Condition and Deadlock

What is a Race Condition?

When two processes are competing with each other causing data corruption.

As shown in the diagram, two persons are trying to deposit 1 dollar online into the same bank account. The initial amount is 17 dollar. Due to race conditions, the final amount in the bank is 18 dollar instead of 19.

What is a Dead Lock? When two processes are waiting for each other directly or indirectly, it is called dead lock.

As you can see in second diagram, process 1 is waiting for process 2 and process 2 is waiting for process 3 to finish and process 3 is waiting for process 1 to finish. All these three processes would keep waiting and will never end. This is called dead lock.


No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...