PLEASE FOLLOW EVERYTHING BELOW PROPERLY.
THERE IS 2 `SECTION TO THIS SO FOLLOW BELOW.
It is strongly advised to follow the outline of the Seminars sheets (Seminar 4 and 5) and Lab sheets (Seminar 4 and 5).
Scenario for the assignment: Concurrency problems with banking; service example is a deposit function and a transfer function; the problems to be considered are mutual exclusion and deadlock.
Simple example scenario: Access to a banking account allows getting the current amount in the bank account (get_balance) and setting a new amount in the account (set_balance). Based on these two functions, a third function deposit needs to be implemented that allows putting a certain amount of money into the account (deposit). In addition, a function transfer that takes out money from one account and deposits it into another account must be implemented and tested (testfiles to be provided).
We consider an environment where parallel execution of processes is possible. This may create concurrency issues if two processes access one account (inference) and if two transfers happen simultaneously between two accounts (deadlock). You should use semaphore(s) (or monitor(s)) to resolve these issues.
Assignment Requirements: The journal paper must describe the background of the project, i.e. Concurrency and the banking functions. The concurrency problem must be illustrated using Finite State Machines (FSM) or Finite State Processes (FSP), and Erlang. The solution (Mutex) must also be illustrated in FSM/FSP and implemented in Erlang.
• The background: Banking and Erlang
• The concurrency problems using some high level description like FSM or
FSP. How does this manifest itself in your Erlang implementation?
• What is your solution idea/algorithm? (Mutex probably)
• Solution in Erlang including some analysis (tests, problems encountered).
Recommended General Journal Paper Structure
• Abstract
• Summary of your work – very important !! (it is the most read)
• Introduction
• Places the work in the appropriate context, gently introduces the subject, introduces related approaches and concludes with a roadmap
• Background
• basic concepts and terminology to understand your work
• Possible approaches
• Various solutions
• Discussion
• Critically evaluate all solutions – pros and cons
• Future works / improvements (if any)
• Conclusions
• Summaries and underlines major concepts
• References
• Look in google scholar
• IEEE and ACM digital libraries
• NOT JUST WIKIPEDIA
At least three text files (ASCII format) with the Erlang solution, the mutex, and a testfile for demonstration. These Erlang source files (extension .erl) need to be zipped into one and submitted as second part of the submission. You may use zip or tar (but plese do not use rar)