Individual turn around time and the average turnaround time

Assignment Help C/C++ Programming
Reference no: EM133119209

Question:

Create a Deadlock Prevention program that submits processes to the Ready State only if they can be allocated all of the devices they request for execution. The server has a list of total resources, such as scanner, laser printer, and 3-D printer and a total number of devices for each. A client is prompted to enter a given device (for example "S", "L" or "D") and the number of instances of that device needed. Such a request is sent to the server by several clients. If the full request for devices cannot be allocated for this client, none of the devices will be allocated and the client request is rejected with a message back to the client. If the full request for devices can be satisfied, this client is allowed to be placed in the Ready State. Use appropriate print statements to indicate whether or not device requests are satisfied, thus allocated. When at least 3 clients have been added successfully to the Ready state, the server "runs" the client processes that are in the Ready State (by adding the CPU burst to a "clock"). As each process completes, its resources will be deallocated and added back to the available resources. Show the initial list of resources, the available resources after they have been allocated for each client, and the final list of resources when a process completes. Report to each client its individual turn around time and the average turnaround time for all client processes.

Assume that all processes arrive at time 0. Format your output to one place after the decimal.

For example:

Total Devices: 5 scanners, 3 laser printers, 6 3_D Message on server: S5 L3 D6 available
printers

Request from client1: S2, L0, D3, cpu burst 22 Message on server: S2L0D3 allocated
Message on server: S3L3 D3 available

Request from client2: S1, L2, D2, cpu burst 17 Message on server: S1L2D2allocated
Message on server: S2 L1 D1 available

Request from client3: S3, L1, D1, cpu burst 33 Message on server: S2 L1 D1rejected
Message from server to client 3: not enough resources

Request from client4: S1, L1, D1, cpu burst 8 Message on server: S1L1D1 allocated
Message on server: S1 L0 D0 available

Client programs are now in Ready and have been allocated resources...

Returned to client1 from server: 22 (turnaround time), 15.7 (average turnaround time)
Message on server: S3 L0D3 available

Returned to client2 from server: 39 (turnaround time), 15.7 (average turnaround time)
Message on server: S4 L2 D5 available

Returned to client4 from server: 47 (turnaround time), 15.7 (average turnaround time)
Message on server: S5 L3 D6 available

Please note: My messages have been abbreviated to fit on the page. Your output can be more descriptive.

Reference no: EM133119209

Questions Cloud

How is ownership to blackacre held after bob and carol die : Aaron, Bob and Carol purchased Blackacre and own the property as joint tenants with the right of survivorship. Aaron owns 40%. Bob and Carol own 30% each.
Sleeping on the job : Should the company's treatment of the grievant for the first two "sleeping on the job" incidents influence the outcome in this case? Explain.
What was the quantity produced and the price per toy : We have been asked to analyze our toy products by price (from $10.00 to $13.00 by 0.25). When the profit = $1,210, what was the quantity produced and the price
Best estimate of the current stock price : The XYZ paid $1.15 dividend yesterday. It's growth rate is expected to be constant at 21.10% for 2 years, after which dividends are expected to grow at a rate o
Individual turn around time and the average turnaround time : Report to each client its individual turn around time and the average turnaround time for all client processes
What is the theta of the option as the expiration time : What is the theta of the option as the expiration time declines from 60 to 50 days? Answer to 2 decimal places.
Why the elevator speech is important : Why the elevator speech is important and how it will help you prepare for recruiting events, interviews, and a career in the accounting profession
What will be the return on the portfolio a : Assume that a three-factor APT describes the returns of all well-diversified portfolios, and that the three factors are unexpected changes in production (factor
Determine the return on stockholders equity : Average common stockholders' equity 1,465,263. Determine (a) the return on stockholders' equity and (b) the return on common stockholders' equity

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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