Sending arrays of unsorted numbers to the server

Assignment Help Basic Computer Science
Reference no: EM13975426

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.

Reference no: EM13975426

Questions Cloud

What is the cost to contractors based on cost : Front range cabinet distributors in colorado springs, colorado, sells to its contractors with a 42% markup on cost. if the selling price for cabinets is $9,655, what is the cost to contractors based on cost?
Prepare the relative frequency column : Containers of yogurt were inspected with regard to the number of days until they expire. 0 represents a yogurt container with today's date. The following table gives the frequency distribution of the number of day's expiry date. Prepare the relati..
Too many dollars chasing too few goods : Which of the following is not an accurate description of what can cause inflation?             a. too many dollars chasing too few goods.             b. an increase in labor costs when productivity is not increasing.
Derive a recurrence relation for the numbers : Derive a recurrence relation for the numbers Wn. Justify it and find the formula for the numbers Wn by solving this recurrence.
Sending arrays of unsorted numbers to the server : The clients should send requests to the server only in the form of Remote Procedure Calls. Sockets cannot be used for this assignment.
Find the net torque on the wheel : Find the net torque on the wheel in the figure below about the axle through O, taking a = 11.0 cm and b = 27.0 cm. (Assume that the positive direction is counterclockwise.)
Differentiating the equation with respect to pa : How would I go about differentiating the following equation with respect to PA?
Find the percentage of the total work lost to friction : Find the percentage of the total work lost to friction if 26.9 J of work is put into pushing a block up a ramp resulting in 16.5 J of stored potential energy at the top.
Find the ratio of the rotational inertia of the earth : Find the ratio of the rotational inertia of the Earth for rotation about its own axis to its rotational inertia for rotation about the Sun. (Give your answer in terms of RE, the radius of the Earth, and Ro, the radius of Earth's orbit about the su..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Comp dq microsoft''s website

This discussion board allows you to work with Word templates available on Microsoft's website. First, download a Word template from Microsoft.com by clicking Office, then Templates, then Word. Replace the placeholders with your own content. Upload..

  Service in spite of ip unreliable service

TCP creates a reliable data transfer service, in addition to IP's unreliable best-effort service. Study this statement, and in your own words, summarize how TCP provides a reliable data transfer service.

  Computer science question html website development

Design a preliminary homepage called "cssprelimI.htm". It should be similar in layout to the example below, but you may use your own content.

  Smartphones and the great digital divide

Smartphones and the Great Digital Divide on page 282 in the text and answer the questions below. APA formatting guidelines require a title page, abstract page, and reference page in addition to the body of the paper.

  Create two arrays with 5 elements each

Create two arrays with 5 elements each: one will hold Strings and the second will hold integers.

  Explaining social engineering attack

Study a social engineering attack. What made this attack successful?

  Operator overloading

Operator Overloading

  Write out a cfg

Write out a CFG for the following regular expression a n b m  | m > n > 0

  Data for making intelligent business decisions

Businesses today are extremely reliant on large amounts of data for making intelligent business decisions. Likewise, the data warehouses are often structured in a manner that optimizes processing large amounts of data.

  The organization code of ethics

The organization  code of ethics?

  Determine the amount of time required for a packet

Analyzing Ping Trip Times The ping utility allows you to determine the amount of time required for a packet of information to traverse a network between your computer and another computer.

  Discuss how determining milestones might add additional

Remember that milestones normally have no duration, so you must have tasks that will lead to completing the milestone.

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