به همراه نمونه ورودی ها و خروجی ها
Enter the number of resources:4
Enter the number of processes:5
Enter Claim Vector(availabel resources):8 5 9 7
Enter Allocated Resource Table:
2 0 1 1
0 1 2 1
4 0 0 3
0 2 1 0
1 0 3 0
Enter Maximum Claim table(maximum):
3 2 1 4
0 2 5 2
5 1 0 5
1 5 3 0
3 0 3 3
//result(khoruji):
The Claim Vector is: 8 5 9 7
The Allocated Resource Table:
2 0 1 1
0 1 2 1
4 0 0 3
0 2 1 0
1 0 3 0
The Maximum Claim Table:
3 2 1 4
0 2 5 2
5 1 0 5
1 5 3 0
3 0 3 3
Allocated resources: 7 3 7 5
Available resources: 1 2 2 2
Process3 is executing
The process is in safe state
Available vector: 5 2 2 5
Process1 is executing
The process is in safe state
Available vector: 7 2 3 6
Process2 is executing
The process is in safe state
Available vector: 7 3 5 7
Process4 is executing
The process is in safe state
Available vector: 7 5 6 7
Process5 is executing
The process is in safe state
Available vector: 8 5 9 7
پروژه شبیه سازی الگوریتم بانکداران یا همان bankers با ++c