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

  Authenticating the evidence

You will offer the POC additionally as a matter of procedure the known facts of incident and what are the procedures were utilized during the initial case reviews. Identification of any collection requirements for attaining and authenticating the ..

  Give overview on emerging trends in wearable computing

Give a detailed explanation of Wireless Access Protocol (WAP). Explain with the help of some examples.

  Describing the microsoft access

Describe what is going on within the Microsoft Access. What role do you think SQL is playing?

  Write down a swing applet that displays

Write down a Swing applet that displays your name (Gary Vega) in blue the first time the user clicks a JButton4, and then displays your name larger and in gray second time the user clicks the JButton. Save program as JBlueGray.java

  Pda and cell phone investigations

One of the aspects of the forensics procedure will be to secure and analyze the PDAs and Cell phones. What kinds of the tools may be selected for use in PDA and Cell phone investigations.

  Create an employee class with enough numbers

Create an Employee class with enough numbers.

  Transforming infix to reverse polish

Transform the following formulas from infix to the reverse Polish: A + B + C + D - E, (A - B) x (C +D) + E

  Write a recursive implementation of euclids algorithm

Write a recursive implementation of Euclids algorithm

  What could some of the gains include

Does a new software product always give a fundamental improvement to the system where we install the new software product? What can some of the gains include.

  Develop an application with the chosen dbms

A school intends to procure the integrated student management application holding all details of registered students including personal information, courses taken, and examination grades.

  What is the significance of the "programming language"

Write a response to Hugh McBride's (of McBride Financial Services) e-mail message to Smith Systems Consulting, sent October 12. You can access Internet and Intranet Web sites of McBride Financial Services and of Smith Systems Consulting from the V..

  Suppose poisson arrivals and departures at each router

A CPU in a router can process 2 million packets/sec. The load offered to it is 1.5 million packets/sec. If the route from source to destination contains 10 routers (having no additional traffic), how much time is spent being queued and serviced by..

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