Concurrent Programming Course

Assignment 3: Tea Shop Simulation

The Problem

The Owner of a Tea Shop suspects that the way in which the Shop is operated means that customers have to spend too much time waiting to be served, and so tend to go elsewhere instead. In order to evaluate the situation, a simulation of the Shop has been commissioned. Initially this simulation will simply run with text output describing the events as they occur in the Shop, and collect a minimal amount of statistical data.

Intention of assignment

The simulation is valuable to the Owner, but note that there are much better techniques for simulating than writing a concurrent program. The purpose of this assignment is to teach you to write a program in which synchronization and communication take place between several concurrent processes. It is intended to force you to solve (and not simply avoid) a range of interesting synchronisation problems.

Choice of programming language

You may solve this assignment using either Erlang or JR.

Synchronisation constructs

For synchronisation you are only allowed to use message passing. Anything else is strictly forbidden -- no semaphores, no monitors, etc. This also means that you are not allowed to use any shared variables except channels.

Students doing the lab in Erlang will notice that it is very easy to stick to this rule, as Erlang is built entirely around message passing.

Last modified: Monday, 16-Sep-2013 09:51:32 CEST
COMPUTER SCIENCE AND ENGINEERING - Chalmers University of Technology and Göteborg University
SE-412 96 Göteborg, Sweden - Tel: +46 (0)31- 772 1000