Massey University 159.341 Programing Languages, Algorithms and Concurrency assignment2

发布时间 2023-04-19 00:06:26作者: Jerly_Zhou

完成了Massey大学的Programing Languages, Algorithms and Concurrency这门课的作业2。作业要求主要是模拟电梯使用的实现,提供的代码是C语言。 完成效果演示如下


Problem to solve
An incomplete C implementation of a lift simulator is available (for both Windows and UNIX) on the course stream site (a2_handout.c). This program simulates a number of people moving between different floors in a building using a number of lifts. Each person and each lift are controlled by a different thread.

Currently there are a number of missing sections of code (marked by ---) and variety of race-conditions, you must complete the code then identify and protect against these errors.