To compile and run each program, run the following command inside the corresponding folder:
make
For Q1 after compiling, you can either run:
$ make run
that runs ./samples quote.txt 4 8
. Or manually by:
$ ./samples quote.txt n m
Where n is the number of fragments and m is the number of chatacters.
For Q2 after compiling,you can either run:
$ make run
that runs ./txt2epub f1.txt f2.txt f3.txt f4.txt
. Or manually by:
$ ./txt2epub f1.txt f2.txt f3.txt ... fn.tx
Where n is the last file you wish to process.
For Q3 after compiling, you can either run:
$ make run
that runs ./tokenring 5 0.01 10
. Or manually by:
$ ./tokenring n p t
Where n is the number of pipes, p is the probability and t is the waiting time.
To clean each folder, run the following command:
make clean
To run valgrind on each program (with the recommended flags), run the following command:
make valgrind
Francisco Pimentel Serra 202007723 [email protected]
Pedro Miguel da Silva Correia 202006199 [email protected]
Guilherme de Sousa Ribeiro 202108731 [email protected]
João Pedro Silva Duarte 201504089 [email protected]