![]() Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Nam lacinia pulvinar tortor nec facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. HINTS: - The input files should start with N and M, then the necessary matrices - Work on your own computer or online using This must be checked and reported by your program before any attempt of finding a solution. Note 2: The input file may be incorrect, for various reasons. Note 1: the solution must be based on the Greedy version for the Banker's algorithm in particular, using an approach for finding ALL solutions and then keeping and reporting just two of them is NOT allowed. ![]() If there are more than two solutions, it doesn't matter which ones are found, as long as they are exactly two. The solutions must be displayed on screen. The program must find EXACTLY TWO solutions. There are TWO OR MORE solutions (safe sequences). The solution must be displayed on screen. The program must report there is exactly one solution. There is EXACTLY ONE solution (safe sequence). The program must report there is no solution. To resume, there are only three possible scenarios, for a correct input file: 1. If the algorithm only has one solution this must be reported as such and the single solution must be displayed. You must adjust this algorithm to find exactly TWO solutions instead of just one (assuming of course there are at least two solutions). We know that this algorithm only finds ONE solution (safe sequence of processes) assuming there is one otherwise reports there is no solution. The pseudo code for the Greedy version for the Banker's algorithm can be found in this module's Commentary. The input data and the result of the algorithm must be displayed on the screen. You are free to choose the format of the input file, just make sure it contains all the necessary data. The program reads all the necessary input data from that file. ![]() Use Java or C/C++ for the implementation, with a simple interface, where the user only supplies the name of the input file (text file, say "input.txt"). , PN) and M resource types (M<10, resources are R1, R2. Implement the Banker's algorithm for deadlock avoidance, with a given set of N processes (N<10, processes are P1, P2.
0 Comments
Leave a Reply. |