Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

CS506 Web Design and Development GDB Spring 2020 Solution & Discussion

ATM (Automated Teller Machine) machines are electronic outlets that allow customers to do their basic transactions without the help of bank’s representative. ATM machines facilitate customers to withdraw cash, pay bills and transfer amount etc. at any time. These machines are synchronized (i.e. can perform transactions in parallel by sharing resources), as soon as a customer withdraws amount, the remaining balance is updated. Therefore, concurrency (i.e. capability to perform more than one task at the same time) is involved in ATM transactions.


Being a Java developer what do you think, "Would multi-threading play a vital role in maintaining concurrency for efficient and fast transactions of ATM or will slow down the ATM services by making it more complicated?”.

Views: 480

Replies to This Discussion

CS506 GDB Solution idea:


Being a java developer I would state that performance is not the main challenge of an ATM nor is multi-threading. Robustness and provable correctness is of greater importance and those are much easier to achieve using a single –threaded solution.

Solution 1
The second Is partly true .yes multi-threading can slow down concurrency if it is poorly implemented .causing deadlocks or live locks .but that is not so much because its complicated but rather that it is difficult to write correct code.
But neither statement addresses the important issue when dealing with ATMs, financial transaction or other important things in life .multi-threaded code can and will break and produce incorrect results which is far worse than being slow.
• The ATM does not serve concurrent customers
• It will send requests to a system elsewhere, andwait for the reply
Hence it has no need for multi-threading, and blocking is just fine complicated code is not a first resort.


© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service