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

  Java how to program 10th edition

Java How To Program 10th Edition

  Briefly describe the earned value schedule indicators

Briefly describe the earned value schedule indicators table in MS Project 2010. Under what circumstances would a project manager use this table

  Design a 2-bit counter

Design a 2-bit counter that, when v = 1, counts in the repeating sequence: 0, 3, 1, 2, and when v = 0, counts in the reverse direction. (a) Construct a state diagram and state table.

  Evaluate the range of numbers

Evaluate the range of numbers that can be represented in 2's complement, 1's complement and Sign and Magnitude using the given size registers:

  Analyze the effect of sarbanes-oxley on pricing practices

Analyze the effect of Sarbanes-Oxley on pricing practices

  Create a mailmerge

Create a Mailmerge-Your form letter must include an inserted picture or graphic and should give the address of a web site

  Difference between the android vs. ios

Both Android and iOS are operating systems developed for a primary purpose to be used for mobile devices. While Android is developed by Google, iOS is developed by Apple.

  Define business performance management

Define Business Performance Management and how DSS relates the Business Performance Management and Describe how Knowledge Management benefits organizations.

  Linux-support skills

After completing the activities, take a screenshot of the following and copy onto this report. Linux+ Support skills: Editing Files in Linux

  How to find malicious behavior using time slicing

How to find malicious behavior using Time slicing or timing Number of connections Number of sequential connections

  Write a program that asks user to input grade of student

Write a program that asks the user to input the grade of the student. If the grade is equal or greater than 60, the program prints the word "pass", otherwise it prints the word "fail".

  Analyze the fundamental impact of it architecture

Ascertain the importance of information management for the company or industry that you have chosen. Analyze the fundamental impact of IT architecture or enterprise architecture on information management for your chosen company or industry.

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