diff --git a/ConcurrentCSharp/DiningPhilosophers/Program.cs b/ConcurrentCSharp/DiningPhilosophers/Program.cs index 9b5c1a0a..bcd9f38c 100644 --- a/ConcurrentCSharp/DiningPhilosophers/Program.cs +++ b/ConcurrentCSharp/DiningPhilosophers/Program.cs @@ -1,6 +1,6 @@ using System; -using Exercise; -//using Solution; // will be provided later +//using Exercise; +using Solution; // will be provided later namespace DiningPhilosophers { @@ -12,12 +12,12 @@ static void Main(string[] args) Table table = new Table(numPhilosphers); Console.WriteLine("[Dinining Philospher] Dining with one fork is going to start ..."); - table.startOneForkDining(iteration); + //table.startOneForkDining(iteration); //Console.WriteLine("[Dinining Philospher] Dining with two forks is going to start (press enter)..."); //Console.ReadLine(); //table.startTwoForksDining(iteration); - //table.startTwoForksDiningSafe(iteration); + table.startTwoForksDiningSafe(iteration); } } diff --git a/ConcurrentCSharp/DiningPhilosophers/Solution.cs b/ConcurrentCSharp/DiningPhilosophers/Solution.cs index a55567dc..5430bda8 100644 --- a/ConcurrentCSharp/DiningPhilosophers/Solution.cs +++ b/ConcurrentCSharp/DiningPhilosophers/Solution.cs @@ -41,7 +41,7 @@ public class Philosopher { public Fork rightFork { get; set; } public Fork leftFork { get; set; } - public int maxEatingTime = 100; + public int maxEatingTime = 10; public int number; public Philosopher(int n) { @@ -89,13 +89,13 @@ public void eatWithTwoForksSafe() Int32 timeout = 10; // todo: pass timeout as a parameter to the mutexes and check if deadlock happens Console.WriteLine("[{0} waiting for right fork ...]", number); - if (rightFork.forkMutex.WaitOne()) + if (rightFork.forkMutex.WaitOne(timeout)) { rightFork.pick(); Console.WriteLine("[{0} picked right fork {1}, waiting for left fork {2} ...]", number, rightFork.id, leftFork.id); - if (leftFork.forkMutex.WaitOne()) + if (leftFork.forkMutex.WaitOne(timeout)) { leftFork.pick(); this.eat(); diff --git a/DataAnonymization/pix/fig-taxonomy-01.png b/DataAnonymization/pix/fig-taxonomy-01.png new file mode 100644 index 00000000..6085c695 Binary files /dev/null and b/DataAnonymization/pix/fig-taxonomy-01.png differ diff --git a/DataAnonymization/resources.md b/DataAnonymization/resources.md new file mode 100644 index 00000000..329ba798 --- /dev/null +++ b/DataAnonymization/resources.md @@ -0,0 +1,68 @@ +# Introduction: + +This document will collect basics of data anonymization and helpful resources. + +# Background: + +In this section there will be essential definitions, concepts, examples and required algorithms to understand data anonymization. + + + +## Basic Concepts: + +### Data Anonymization: +Data anonymization (also known as de-identification) is a technique to be applied on datasets containing personal information in which sensitive information about individuals are stored. The main objective of anonymization is to weaken the link between the datasets' personal information and individuals. Anonymized data means that data which previously addressing individuals is processed and after the process the probability of uniquely identifying these individuals becomes less. + + + +### Fundamental Technqies: + +#### generalization: + +Data generalization is a simple technique by which an exact value of a sensitive attribute is replaced with a more general value. In order to choose a general value, a *taxonomy tree* is built by a (data) domain expert. The exact values must be found among the leaves. The most general value appears in the root. + +Figure: [An example of a taxonomy tree](./pix/fig-taxonomy-01.png) + +#### suppression: + + + +#### permutation: + + + +#### swapping: + + + +### Fundamental Algorithms: + + + +#### k-anonimity: + +[todo] + +#### l-diversity: + +[todo] + +# Resources: + +## Books: + +1. Book: ["Database Anonymization: Privacy Models, Data Utility, and Microaggregation-based Inter-model Connections"](https://www.researchgate.net/publication/290229262_Database_Anonymization_Privacy_Models_Data_Utility_and_Microaggregation-based_Inter-model_Connections) + +## Surveys: + +1. Privacy-preserving data publishing: A survey of recent development [[download here](https://dl-acm-org.ezproxy.hro.nl/doi/10.1145/1749603.1749605)] + +## Tools: + +1. Tool: [ARX as an anonymization tool and API](https://arx.deidentifier.org/) +2. Tool: [ARX as a Service](https://oslomet-arx-as-a-service.github.io/resources/Product_Specification.pdf) + +## Reports: + +1. A bachelor thesis: [Anonymization of health data](https://www.duo.uio.no/bitstream/handle/10852/79902/Anonymization-of-Health-Data.pdf?sequence=13&isAllowed=y) +