Calculate a running total of all cpu bursts

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

Question: Create a server process that accepts input from each of several clients. One at a time, a client sends a struct containing three values: a job name, a CPU burst (an integer), and a private FIFO name through a FIFO named Common_FIFO. The server calculates a running total of all CPU bursts it has received so far from the clients, and sends the current running total of CPU bursts back to the current client through its individual private FIFO. The server prints the name of the job, the value from the current client, and the current running total. After three clients have submitted their structs, the server calculates the average of all integers submitted by the clients.

A client prompts the user to enter an integer value between 1 and 16. If the integer is not in that range, continue to prompt the user for a valid integer. The current running total that is sent to the client from the server is also displayed on the client.

For example:
client 1 sends: Hmwk_6.c, 15, FIFO_4567 -> server calculates total as 15 and sends 15 to client 1
client 2 sends: OS_24, 9, FIFO_1238 -> server calculates total as 24 and sends 24 to client 2
client 3 sends: Prog_1.c, 8, FIFO_6789 -> server calculates total as 32 and sends 32 to client 3
... the server echoes all the values it receives from the clients
... the server prints "Average of 3 input values is 10.67 "
... to format this nicely, you can use: printf("%.2f", average);

Common_FIFO is created and opened once, and receives one struct input per client.

Prepare your own test data. For testing purposes, burst values will be those given in the example. Your program should allow one of the clients to input a value of 0, then 28 before it submits a valid integer in the range.

Attachment:- CPU burst.rar

Reference no: EM133119197

Questions Cloud

Describe target capital budgeting process : Describe Target's capital budgeting process and evaluate it. While doing so, discuss the role of the real-estate managers & CEC (Capital Expenditure Committee),
What are the average collection period : What are the Average Collection Period, Net Profit Margin, Total Asset Turnover, and Equity Multiplier for McDonalds and Wendys for FY2019 and FY2020?
Prepare an amortization schedule : The contract required payments of $200,000 a year over five years with the first payment due on December 31, 20x1. Prepare an amortization schedule
Estimate the cost of capital for utx corporation : You have been asked to estimate the cost of capital for UTX Corporation. The company has 7 million shares and 150,000 bonds outstanding at par value $10,000.
Calculate a running total of all cpu bursts : Create a server process that accepts input from each of several clients. One at a time, a client sends a struct containing three values: a job name
Calculate bank gogo earnings per share : PT Bank GoGo Tbk. has 50 million shares of stocks outstanding. In fiscal year 2020, Bank Gogo's after-tax profits reached IDR15 billion and the firm's stock is
Fitch downgrades waskita karya to ccc : Tue 06 Oct, 2020 - 5:55 AM ET Fitch Ratings - Jakarta - 06 Oct 2020: Fitch Ratings Indonesia has downgrade Indonesia-based contractor PT Waskita Karya (Persero)
Prepare a statement of owner equity for the year ended : On January 1, 20Y3, Xavier Heffner, Capital had a balance of $154,200. Prepare a statement of owner equity for the year ended
Dealing with a american call on currency : Suppose that you are dealing with a American call on currency, and that the foreign currency has risk-free rate 0. Explain why, in this case, the American call

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