QUESTION 3 – RELIABLE DATA TRANSFER (25 marks) A is an automated teller machine (ATM) that communicates with a bank serv
Posted: Fri May 20, 2022 12:18 pm
QUESTION 3 – RELIABLE DATA TRANSFER (25 marks) A is an automated teller machine (ATM) that communicates with a bank server, B in order to debit a customer account as required. A is invoked to send a message to B whenever there is a request from above to debit an account by a particular value using the command debit(account, value). When A receives this call from above, it sends B a request_money packet for the account. B replies with an acknowledgement that includes a positive or negative message depending on whether there are sufficient funds in the account, i.e. only if B calculates that the balance in the account is greater than the requested value (i.e. there are sufficient funds in the account) it will proceed to debit the account. If there are insufficient funds, B will not debit the account. A cannot process a second debit(account, value) request while the first one has not been resolved. Design a reliable data transfer protocol between A and B, operating over an unreliable channel that can lose packets but not corrupt them, that will guarantee that the customer can never withdraw more money than is in their account. a) You are required to give the finite state machine diagram at A. Clearly (15 marks) label all instructions in the diagram. b) Also describe the finite state machine diagram at B, clearly labelling all instructions in the diagram. (10 marks)