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
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
|