Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

New Free Tools on Dev Shed!

#1
April 21st, 2013, 03:37 AM
 Azuki
Registered User

Join Date: Mar 2013
Posts: 16
Time spent in forums: 1 h 55 m 5 sec
Reputation Power: 0
Homework - Question on concept of concurrency

Bill is swiping his credit card in the supermarket. His wife is paying a bill online at home.
Bill sees this on the screen:

His wife sees this on the screen:

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?

#2
April 21st, 2013, 06:56 AM
 requinix
Forgetful

Join Date: Mar 2007
Location: Washington, USA
Posts: 13,500
Time spent in forums: 5 Months 2 Weeks 2 Days 8 h 8 m 49 sec
Reputation Power: 9259
Why do you think it's a race condition? Explain your reasoning. Why would it not be any of the other three?

#3
April 21st, 2013, 10:30 AM
 Azuki
Registered User

Join Date: Mar 2013
Posts: 16
Time spent in forums: 1 h 55 m 5 sec
Reputation Power: 0
Quote:
 Originally Posted by requinix Why do you think it's a race condition? Explain your reasoning. Why would it not be any of the other three?

Condition synchronization and mutual exclusion are not problem. So it's either race condition or starvation. In Starvation, my understanding it the processes wait for each other. Race condition is the process get interrupted. Therefore, I think it's race condition. But I'm not quite sure if my understanding is correct.

 Viewing: Dev Shed Forums > Programming Languages > Java Help > Homework - Question on concept of concurrency