This is a a multi-threaded, command-line/CLI based program that implements the banker's algorithm.
The Motivation for the assignment comes from the course requirments of CP383: Operating Systems
int load_available_resources(int count, char *args[]); //Nausher
int load_customer_resources() //Nausher
void run_program() //Nausher
bool safe_state() //Declan
void request_resources_command(int customer_index, int *requested_resources) //Nausher
void release_resources_command(int customer_index, int *releasing_resources) //Nausher
void status_command() //Nausher
char **split_string_array(char* input, char *delimiter) //Nausher
int *split_int_array(char* input, char *delimiter) //Nausher
int length_int_array(int *array) //Nausher
bool need_work_comparison(int *need, int *work) //Declan
bool need_request_comparison(int *need, int *request) //Declan
bool available_request_comparison(int *available, int *request) //Declan
int *array_addition(int *work, int *allocation) //DeclanThis program implements the Banker's Algorithm and allows a Customer to request and release resources from the bank. The banker will grant a request if it satsfies the safety algorithm.
EX:
./main 10 5 7 8
rq 0 1 0 0 1
rq 1 1 1 1 1
rq 2 2 2 2 2
rq 3 1 1 1 1
rq 4 1 0 0 0
run
EX:
rq: request resource
rl: release resource
status: see the current status of the bank
exit: exit the program
- Declan Hollingworth: Wilfrid Laurier University BSc in Computer Science '23
- Nausher Rao: Wilfrid Laurier University BSc in Computer Science and Applied Maths '23
- Declan Hollingworth
- Nausher Rao
This project uses the MIT License which can be located here


