A pair of programs which display the use of Inter Process Communication (IPC)
- md5 - which distributes the load of calculating md5 hashes into multiple processes
- view - which through shared memory allows for the viewing of md5's output
This project requires the following to be built & run
- Docker
- Agodio-Image or ImNotGone-Image (based on agodio's image)
Agodio's image requires adittional steps to for example update pvs-studio (linked below)
Additional information on how to install docker & agodio's image here, to use ImNotGone's image just replace agodio/itba-so:1.0
with imnotgone/itba-so
everywhere you see it
To start the container and execute code inside it, run the following command:
docker run -v "${PWD}:/root" --privileged --rm -ti $SO_IMAGE
This will let you run commands on your image of choice nedded for this project to be built & run.
Where the /root folder will attach to your current directory & $SO_IMAGE
is your image of choice (agodio/itba-so:1.0
or imnotgone/itba-so
).
(make sure to be in /root when trying to build using make)
To create both ./md5 and ./view the following command should be executed inside the containers
make all
./md5 file1 file2 file3 ... | ./view
or
./md5 file1 file2 file3 ...
-
./view <INFO1> <INFO2> ...
-
./view <INFO1><ENTER> <INFO2><ENTER> ...
(with less than 2 seconds of time between executions in term1 & term2)
To test the two terminal execution you may start up a container using the command show above, and then run this command to enter the same container in another terminal session:
docker exec -it $(docker ps -q) bash
The terminal session will be opened on your most recent running docker container
To run the static code analysis tools use the following commands
pvs-studio (requires and update when using agodio's image, steps here)
make pvs
make cpp-check