Sort Answers

What is the race condition in programming?

Asked by Mon Jan 25 2021
AlgorithmBack-EndArchitecture
Father
Answered at Mon Jan 25 2021

Imagine that your girlfriend called you and she said her father will go out soon, she asked you to go to her place to have some ... . You were so excited that you drove as fast as possible. Surprisingly, all the traffic lights OTW were green!! You reached there earlier than expected. Meanwhile, her father suddenly got a stomachache hence he rushed to the toilet. Once you have reached the doorstep, you couldn't care to ring the doorbell as you know your girlfriend was inside there waiting for you, yet the first thing that came to your sight was her father coming out of the toilet nakedly looking for toilet rolls. With the same metaphor, you would have expected the father to leave the house by the time you reached there. In conclusion, the ideal situation would be the father process should be done and he should leave the resource (the house). However, in reality, the father process took longer due to some IO issue (diarrhea ) while your process finished earlier than was expected.

Melsoft
Answered at Mon Jan 25 2021

Imagine you finished earlier than your GF.