This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Threads and Synchronization and the fly likes Question on Concurrency concept Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Question on Concurrency concept" Watch "Question on Concurrency concept" New topic
Author

Question on Concurrency concept

azuki ooh
Greenhorn

Joined: Nov 07, 2008
Posts: 20
Bill is swiping his credit card in the supermarket. His wife is paying a bill online at home.
Bill sees this on the screen:
Your old balance is: $2000
Your debit is: $100
Your new balance is: $1850

His wife sees this on the screen:
Your old balance is: $2000
Your debit is: $50
Your new balance is: $1950

Which one of the following could have occurred?

(a) race condition
(b) condition synchronisation
(c) starvation
(d) mutual exclusion

I think this is a race condition. Am I right?
 
wood burning stoves
 
subject: Question on Concurrency concept