Why program needs to handle the error

Assignment Help Computer Engineering
Reference no: EM1335412

Specification
Implement the Banker's algorithm described in Section 8.5.3 using C/C++. Your program should .

1) Prompt user to enter the size of matrix n and m. Your program should accept any n x m matrix and m vectors where n and m are positive integer less than 10.

2) Read in Allocation, Max, and Available from allocation.txt, max.txt, and available.txt, respectively. You can assume that each entry of the matrix (or vector) in the input files is separated with ' ' or 'n'. That is, the input files

7 5 3 3 2 2 9 0 2 2 2 2

and

7 5 3
3 2 2
9 0 2
2 2 2

are considered to be identical entries, and they can be interpreted as 1x12, 2x6, 3x4, 4x3, and etc depending on the user input n and m. Obviously, your program needs to handle the error when the total number of entries in matrix exceeding the total number of entries in input files.

3) Properly perform Safety algorithm to report user if the initial state is in safe state. If state is safe, report a safe sequence and go to step 4. If not, terminate the program.

4) Prompt user for new Requesti, perform Resource-Request algorithm, and perform Safety algorithm to report if the current state is safe. If state is safe, report a safe sequence. If state is unsafe, output "unsafe"

5) Repeat step 4 above until user terminates the program.

Reference no: EM1335412

Questions Cloud

Write a process findranks in java : Write down a method findRanks in Java that accepts an unsorted array of integers vals, and a starting and ending rank start and end, numbering ranks from 0, and returns an unsorted (any order is acceptable) array containing the lo-th through the h..
Explaining rationale for each expenditure : Draft a memo to the city council addressing where you desire to spend the additional money. Explain your rationale for each expenditure.
Explain why might the unemployment rate tend to actually : Explain why might the unemployment rate tend to actually underestimate the unemployment problem, especially during a recession.
Prepare documentation for human resources professional : Prepare documentation for human resources professional to manage a payroll/benefits coordinator position. The materials you create would assist HR professionals to choose, train, and develop successful employees toward helping company meet its goa..
Why program needs to handle the error : Prompt user to enter the size of matrix n and m. Your program must accept any n x m matrix and m vectors where n and m are positive integer less than 10.
Develop a regression relationship : Develop a regression relationship
Suppose which major function of profit is to allocate : Suppose which major function of profit is to allocate resources according to consumer preferences
Pros and cons of progressive discipline : Explain What are some pros and cons of progressive discipline in general, and should I agree or disagree with the two statements on progressive discipline
Write down a big-inteter calculator program : note down a big-inteter calculator program that allows the user to enter two large integers and the operation to be performed and that calls the appropriate function to carry out the designated operation.

Reviews

Write a Review

Computer Engineering Questions & Answers

  How to write a class named dayofyear that gets an integer

How to write a class named DayOfYear that gets an integer Day 2 would be January 2 Day 32 would be February 1 Day 365 would be December 31

  Write down a program to test class rectangle

make a class Rectangle. The class has attributes length and width, each of which defaults to 1. It has methods that calculate the perimeter and the area of the rectangle

  C++ questions

Define an enum type, bookType, along with the values CSC, MATH, ENGLISH, HISTORY, PHYSICS, and PHILOSOPHY. Declare a variable book of type book Type.

  Illustrate decryption equation

Illustrate decryption equation.

  Give one huge advantage of using javascript

One huge advantage of using JavaScript is you can accept input from the visitors to your site. As a visitor adds information to your form, what would you do to control inappropriately entered values.

  How to create a user interface

Note down the conversion is from wet liters to wet pints and from wet liters to wet gallons.

  Make a class for services offered by a hair-styling salon

make a class for services offered by a hair-styling salon. Data fields include a String to hold the service description (for example, "Cut", Shampoo", or "Manicure"), a double to hold the price, and an integer to hold the average number of minutes..

  Problem on encryption using a one-round version of des

Problem on encryption using a one-round version of DES.

  How converting between different data system

I would like to know how I can convert from signed binary numbers to decimal values, from decimal numbers to signed magnitude, 2's complement, and short floating point format. Also, it would be better to provide examples with positive and negative..

  Find out the correct solution

if the percentage of the correct answers is 75% of the 10 questions, then it would take us to the next level from 7 to 9. it continues to next level from 10 to 60 and thne next level from 70 to 90.

  What is missing, incomplete, inaccurate

Email clients have to enable SSL encryption both for POP and SMTP. That way regardless of where we work, our email traffic would not expose any data to network eavesdropping techniques.

  Implementing the soubly linked list adt

Develop, implement, and test the soubly linked list ADT, utilizing the DLLNode objects as the nodes. Additionally to our standard list operations, your class must offer for backward iteration through the list.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd