The goal of this project was to become familiar with concurrent processing in Unix/Linux using shared memory and with semaphores in POSIX-based operating systems.
This program simulates a swim mill that shows the behavior of a fish swimming upstream. Somewhere upstream, a pellet is dropped into the stream, and our fish will start traveling towards it sideways to capture it.
The code for pellet
, fish
, and swim_mill
processes should be compiled separately and the executables be named pellet
, fish
, and swim_mill
, respectively. The program should be executed by calling: swim_mill
.