Computer AwarenessVery hardIBPS SO IT · IBPS PO Mains

Two ATMs read a joint account's balance of ₹10,000 at the same moment. Each pays out ₹3,000 and writes back its own result. With no locking, what is this problem called and what balance is finally stored?

  1. A. A race condition (lost update); ₹7,000
  2. B. A deadlock; ₹4,000
  3. C. A race condition (lost update); ₹4,000
  4. D. Starvation; ₹7,000

Correct answer: A. A race condition (lost update); ₹7,000

Both ATMs compute 10,000 − 3,000 = 7,000, and the second write overwrites the first, so one withdrawal is lost and ₹7,000 is stored instead of ₹4,000. This lost update caused by uncontrolled concurrent access is a race condition.

हिंदी में

दो ATM एक ही क्षण में किसी संयुक्त खाते का शेष ₹10,000 पढ़ते हैं। प्रत्येक ₹3,000 निकालकर अपना परिणाम वापस लिखता है। बिना लॉकिंग के, इस समस्या को क्या कहते हैं और अंत में कौन-सा शेष संग्रहीत होता है?

  1. A. रेस कंडीशन (लॉस्ट अपडेट); ₹7,000
  2. B. डेडलॉक; ₹4,000
  3. C. रेस कंडीशन (लॉस्ट अपडेट); ₹4,000
  4. D. स्टार्वेशन; ₹7,000

उत्तर: A. दोनों ATM 10,000 − 3,000 = 7,000 की गणना करते हैं, और दूसरा राइट पहले को अधिलेखित कर देता है, इसलिए एक निकासी खो जाती है और ₹4,000 के बजाय ₹7,000 संग्रहीत होता है। अनियंत्रित समवर्ती पहुँच से होने वाला यह लॉस्ट अपडेट रेस कंडीशन है।

More Computer Awareness questions

Exams that ask this topic