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?
- A. A race condition (lost update); ₹7,000
- B. A deadlock; ₹4,000
- C. A race condition (lost update); ₹4,000
- 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 निकालकर अपना परिणाम वापस लिखता है। बिना लॉकिंग के, इस समस्या को क्या कहते हैं और अंत में कौन-सा शेष संग्रहीत होता है?
- A. रेस कंडीशन (लॉस्ट अपडेट); ₹7,000
- B. डेडलॉक; ₹4,000
- C. रेस कंडीशन (लॉस्ट अपडेट); ₹4,000
- D. स्टार्वेशन; ₹7,000
उत्तर: A. दोनों ATM 10,000 − 3,000 = 7,000 की गणना करते हैं, और दूसरा राइट पहले को अधिलेखित कर देता है, इसलिए एक निकासी खो जाती है और ₹4,000 के बजाय ₹7,000 संग्रहीत होता है। अनियंत्रित समवर्ती पहुँच से होने वाला यह लॉस्ट अपडेट रेस कंडीशन है।
More Computer Awareness questions
- A pen drive shows 20 GB free, yet copying a single 6 GB video file to it fails. Which is the most likely reason?
- The controller that fires a car's airbag must respond within a few milliseconds every single time. What kind of operating system does it…
- Which part of an operating system reads the commands a user types and passes them on to the kernel to be carried out?
- A program can be downloaded and used at no cost for as long as you like, but its source code is kept secret and you may not modify it. It…
- Which system program copies an executable file from disk into main memory and prepares it to start running?
- Assertion (A): The decimal fraction 0.1 cannot be stored exactly in binary floating point. Reason (R): 1/10 has the factor 5 in its…