concurrency-problems

git clone git://git.codymlewis.com/concurrency-problems.git
Log | Files | Refs | README

commit 152a12c2f89ecee3ab704cf827159f5e284e343e
parent 1860bf75f28940d0154a278ea691681e1ce8ce38
Author: Cody Lewis <cody@codymlewis.com>
Date:   Fri,  4 Oct 2019 11:14:13 +1000

Added readme

Diffstat:
M.gitignore | 1+
AREADME.md | 28++++++++++++++++++++++++++++
Mtags | 5+++++
3 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,2 +1,3 @@ Session.vim *.class +tags diff --git a/README.md b/README.md @@ -0,0 +1,28 @@ +# Concurrency Problems + +Three solved Concurrency Problems. + +``` +make +``` + +## Part A + +``` +javac A2A.java +java A2A N=<north_farmers> S=<south_farmers> +``` + +## Part B + +``` +javac A2B.java +java A2B <input_file> +``` + +## Part C + +``` +javac A2C.java +java A2C <input_file> +``` diff --git a/tags b/tags @@ -18,15 +18,20 @@ Client Client.java /^ public Client(String id, int brewTime, CoffeeMachine co Client Client.java /^public class Client extends Thread implements Comparable<Client> {$/;" c CoffeeMachine CoffeeMachine.java /^ public CoffeeMachine() {$/;" m class:CoffeeMachine CoffeeMachine CoffeeMachine.java /^public class CoffeeMachine {$/;" c +Concurrency Problems README.md /^# Concurrency Problems$/;" c Customer Customer.java /^ public Customer(int arrivalTime, String id, int eatingTime, Parlour parlour) throws Exceptio/;" m class:Customer Customer Customer.java /^public class Customer extends Thread implements Comparable<Customer> {$/;" c EPSILON SyncTimer.java /^ public static final int EPSILON = 1;$/;" f class:SyncTimer +EPSILON Timer.java /^ public static final int EPSILON = 5;$/;" f class:Timer Farmer Farmer.java /^ public Farmer(String id, Bridge bridge, String headingTo) {$/;" m class:Farmer Farmer Farmer.java /^public class Farmer extends Thread {$/;" c Hot or Iced Coffee? Report.md /^# Hot or Iced Coffee?$/;" c Ice-Cream Time Report.md /^# Ice-Cream Time$/;" c Parlour Parlour.java /^ public Parlour() {$/;" m class:Parlour Parlour Parlour.java /^public class Parlour {$/;" c +Part A README.md /^## Part A$/;" s +Part B README.md /^## Part B$/;" s +Part C README.md /^## Part C$/;" s QUANTUM SyncTimer.java /^ public static final int QUANTUM = 50;$/;" f class:SyncTimer QUANTUM Timer.java /^ public static final int QUANTUM = 100;$/;" f class:Timer SessionLoad Session.vim /^let SessionLoad = 1$/;" v