lift simulator, Programing Languages, Algorithms and Concurrency assignment2

完成了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.

posted on 2023-04-19 00:04  Jerly_Zhou  阅读(61)  评论(1)    收藏  举报