This collection of five lab exercises is designed to familiarize introductory operating systems students with the fundamentals of interprocess communication through the implementation of the Ben Ari Concurrency Interpreter.
The exercises progress as follows:
- Lab #1 provides BACI download instructions and introduces the BACI programming environment to the student. Students are then instructed to translate pseudocode for a flawed software solution to the two-process problem into BACI; they are to run it repeatedly and identify the problem with this attempt.
- Lab #2 gives students further opportunity to translate pseudocode for attempts to the two-process problem, culminating in Peterson’s correct solution. They are also provided with pseudocode of Lamport’s Bakery Algorithm and instructed to code it in BACI for homework.
- Lab #3 involves the simulation of hardware solutions and atomic instructions. Students are required to create an atomic swap instruction and to implement it.
- Lab #4 involves semaphores to enforce process synchronization.
- Lab #5 provides students with partial solutions to two classical interprocess communication problems: producer-consumer (to be solved with semaphores) and readers-writers (to be solved with a monitor). These program shells are derived from those made available on the BACI site.
Requests for solutions can be made to me at appel@sxu.edu. Please provide evidence of your faculty status.