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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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