Menu

[Solved]Task 2 15 Pts Program Take Request Vector User Input Print Either Granted Granted Indicate Q37197305

In Python using the Bankers Algorithm, write a program that:

Task 2 [15 pts] Your program should take a Request vector as user input and print out either GRANTED or NOT GRANTED to i

Task 2 [15 pts] Your program should take a ‘Request vector as user input and print out either ‘GRANTED’ or ‘NOT GRANTED’ to indicate whether the resource request can be granted or not. Assume that the requesting process is Process 0. For example, Prog2> /a.out sys_config.txt SAFE Request vector: 10 2 NOT GRANGTED Request vector: 10 1 GRANTED Request vector: 1 0 2 3 Wrong input! take user input < continue to take another user input print out ‘Wrong input, if the length of the request vector does not match. < < Request vector: 12 22 NOT GRANTED Show transcribed image text Task 2 [15 pts] Your program should take a ‘Request vector as user input and print out either ‘GRANTED’ or ‘NOT GRANTED’ to indicate whether the resource request can be granted or not. Assume that the requesting process is Process 0. For example, Prog2> /a.out sys_config.txt SAFE Request vector: 10 2 NOT GRANGTED Request vector: 10 1 GRANTED Request vector: 1 0 2 3 Wrong input! take user input

Expert Answer


Answer to Task 2 [15 pts] Your program should take a ‘Request vector as user input and print out either ‘GRANTED’ or ‘NOT GRANTED’… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *