We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

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?”.


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Views: 436

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.
SOLUTION 2
• 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.

RSS

Latest Activity

Looking For Something? Search Here

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

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

.