MartinoMensio / DP2-Labs

Distributed Programming 2 Laboratories @ Polytechnic University of Turin
MIT License
1 stars 0 forks source link

Assignment 3 concurrency #26

Closed MartinoMensio closed 7 years ago

MartinoMensio commented 7 years ago

Manage concurrent access to data

MartinoMensio commented 7 years ago

Simplify where possible, also considering that not all the requirements of part A need to be implemented.

For example the deleteNFFG is not required (which causes the majority of sync problems).

So maybe it is sufficient to have ConcurrentMap to guarantee atomicity

MartinoMensio commented 7 years ago

The synchronization without considering the removal of NFFGs is simply obtained by using ConcurrentMap.

Considering also the deletion, the modifications done are the following:

In details the usage of locks by each method:

MartinoMensio commented 7 years ago

implemented