To demostrate knowledge of banker's algorithm by implementing it in a C program.
To run the banker's algorithm program, the repository must be cloned and its destination must be accessed from cmd to run. Link to clone: https://github.com/zancrash/CP386-A4.git
After cloning, ensure the Makefile is in the root directory, then run:
make
To execute the compiled program, run the file name, followed by the number of resources:
./Question1 10 5 7 8
- Nicolas Lozano: main(), safety()
- Muhammad Ali: main(), realFile(), runThread(), getSinglePointer(), getDoublePointer();
- RQ - Request resources to fill allocation array
- RL - Release Resources and update data structures
- Status - Display current state
- Run - Exectute threads in a safe sequence
- Exit - Exit out of program
See screenshots
// Function declarations
int **readFile(char* filename);
void *runThread(void *t);
int *safetyCheck();
void getSinglePointer(int *info, int j);
void getDoublePointer(int **info, int j, int k);
void run(int safe, int customerCount);
Muhammad Ali: https://github.com/zancrash
Nicolas Lozano: https://github.com/Xlox88
Contributor: Muhammad Ali: https://github.com/zancrash
Contributor: Nicolas Lozano: https://github.com/Xlox88
Copyright 2021 Muhammad Ali and Nicolas Lozano