How to modify this protocol to prevent-make race condition


What is thr race condition in this protocol?
1-insert debit card into debit machine
2-debitcard machine determine current value of card in dollars which is stored in value x
3-user insert dollars into debit card machine ,and the value of inserted dollars vstored in value y
4-user press enter 
5- machine write value x+y 
where is race condition?
how an attack might exploite it?
how to modify this protocol to prevent or make race condition difficult

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: How to modify this protocol to prevent-make race condition
Reference No:- TGS0117152

Expected delivery within 24 Hours