Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Using Remote Procedure Calls, write a concurrent server program to sort random numbers in the interval [-10,10] with at least four versions, each using a different well known sorting algorithm. Use Quicksort, Heapsort, Insertion Sort, and Shellsort as your versions of the service which should be called SORT_NUMBERS. The program that you write should be tested with at least 3 clients. The server should be written using Solaris and the clients should use local machines (not Galaxy) in Maes 208 running Linux. Input files in the form of arrays of at least 50 numbers should be created for each client: the files should be named inputfileC1, inputfileC2, and inputfileC3 for the three clients, respectively.

The input should begin with a line containing the number of elements in the input. Each sort should be run with at least 2 examples per client. To check for errors in input, put a few elements outside the interval [-10,10] so that errors can be caught. If the number of items in the array is not an integer, that also is an error that should be caught by your program.
The input array should be sent to the server (a Sun workstation in Maes 214) with the version of sorting routine that you want to use. Make sure you test all four versions on each sample file and measure the running times of each example (make sure you only include the computation time, not the I/O). The server will sort the numbers and print the sorted array with its client and the name of the sort used on the server display device, and then return the sorted array, with the sort name and running time to the client that made the request. The client will print the array when it arrives on its display, and then write the results including the array, sort name, and running time in a output file "OUTPUT.dat" in the order in which they are returned by the server. Write the output so that the reader of an OUTPUT.dat file can clearly understand the output. In other words, label your output fields and leave extra spaces in the output file to make it readable.

The server must be concurrent in order to handle the requests of multiple clients at the same time. To ensure that the clients are making requests concurrently, have all clients sending the requests together at the start of the program. One server child process should be allocated for each sort during execution and then de-allocated when the sort is completed. In other words, separate connections will need to be made for the execution of each sort version for each client. When you test your work, ensure that more than one request is running on the server at a time. Ideally, several should be running to test the concurrency. You may want to use arrays larger than 50 elements to prevent all of the sorts to finish so quickly that multiple child processes are not needed. Remember to kill child processes when a connection is closed. Processes do not die otherwise. They become zombies and eventually they take so much process time that there is no longer enough space to run any process and the system will crash. Students who do this more than once will be penalized. Ask the technicians if you do not know what you are doing.

The clients should send requests to the server only in the form of Remote Procedure Calls. Sockets cannot be used for this assignment.

Since you are sending arrays of unsorted numbers to the server, you will need to send a structure that consists of an array and an array size to the server. Use XDR to ensure that the information that you marshall for transmission can be understood by the receiver. Use TCP forms of RPCs.

Due Date: February 13 by 10 p.m. These should include a Make file, the source code, and any information that you think is needed to run your program in a ReadMe file. You do not need to include your input files as we will use our own to test your program, but you need to construct your program using the correct names for the sorts and input files. For that reason it is important that you name your files according to the directions above.

Note: This program is to be written in C or C++ language using RPC. Run a Solaris server and Linux clients.
Each student is required to do this assignment. Students may discuss the program among themselves, but you are not permitted to copy code nor allow others to copy your code. Doing so will result in a grade of zero on this assignment.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91670200
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Coa assignment task -q1 a the fibonacci numbers are the

COA Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of ...

Question some help me to answer this1 discuss the osi

Question: Some help me to answer this 1. Discuss the OSI reference model and TCP/IP model. discuss in details their features, advantages and disadvantages 2. Compare and contrast the two models. The response must be type ...

Round robin rr jobs are processed using a fixed time-slice

Round Robin (RR): Jobs are processed using a fixed time-slice. The jobs are initially kept in a queue based on the order of arrival. The job at the front of the queue is removed and served similar to the FIFO algorithm. ...

Taylor found that 8 of the recipients of loans from a

Taylor found that 8% of the recipients of loans from a particular mortgage lending institute default within the first 3 years. If he takes a random sample of 4 customers, who received loans 3 years ago, what is the proba ...

Nfs allows the file system on one linux computer to be

NFS allows the file system on one Linux computer to be accessed over a network connection by another Linux system. Discuss the security vulnerabilities of NFS in networked Linux systems, and possible mitigation solutions ...

Referring to the in class rectangleclass examplelt

Referring to the in class RectangleClass example: class RectangleMain{ > static void main(String[] args)> use to test You will Create a Class named and RtTriangleMain { > args)> to test your The will: 1)Establish Two pub ...

Why are farmers paid so littlenbspthe price of agricultural

Why are farmers paid so little?  The price of agricultural goods like chickens and coffee has been falling for decades and the share going to farmers has also been falling. What is the "Global division of labor" in food ...

Assume the following information for an imaginary closed

Assume the following information for an imaginary, closed economy. GDP = $100,000; taxes = $22,000; government purchases = $25,000; national saving = $15,000. Refer to Scenario 26-1.  For this economy, investment amounts ...

A calling agency has data showing that the average response

A calling agency has data showing that the average response time is 5.6 minutes with a standard deviation of 1.8. The manager wants to know how much time is required for 75% of all calls to be handled (in other words, th ...

How does consumers influence the market price of goods it

How does consumers influence the market price of goods it sells, and what does the term, "market power" means?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As