Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Programming-Assignment-2

Author: Dylan Strnad

Programmming languaged used: C++

Bankers algorithm for deadlock avoidance

Summary

Takes an input file including data for each process, such as how many resources are allocated to each process, the max resources each process uses, and how many resources are avilable.

Uses the data from info.txt to determine if the system is in a safe state. If so, program outputs the safe sequence, and states that system is safe. Otherwise, the program outputs that the system is not safe.

Running Code

To compile code in linux environment, run these commands:

$ g++ main.cpp -o output
$ ./output

Output examples

should output this with the included info.txt file

image

modify info.txt values and output may change. As shown below, the safe sequence never completes, and system is not in safe state

image

About

Bankers algorithm for deadlock avoidance

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages