Question: Design and implement a C Language program that measures the performance of given processors. There are several metrics that measure the performance of a processor.

Design and implement a C Language program that measures the performance of given processors.

There are several metrics that measure the performance of a processor. We will be using the following 3 measures:

Design and implement a C Language program that measures the performance of

Typically, processors performance is measured using a wide selection of software applications and system software. These specific programs are called benchmarks. We will test a set of processors using one such benchmark, and our selected software program is a compiler. The complier program is written using a high level language that will be translated to the Assembly Language instructions that are native to each processor. Next, the number of Assembly Language instructions needed will be counted and used in the equations, above, plus the recorded clock speed and CPU cycles used by the processors CPU (central processing unit).

You must implement the following:

You are to use pointers and a function named performance to measure the performance of a given processor as described, above. The performance function must be a void function (does not return a value).

Your code should read the input from a data file named data.txt which has the data organized in rows such that each row contains the input values of a specific processor, in this order: # clock cycles, CPU speed (clock rate) in Giga Hertz (1 Giga Hertz = 1 x 10+9 Hertz), and # instructions.

Your code should be general and continue reading the data file till EOF is reached.

Your code should be modular. The main function should contain only function calls.

The output of code should be saved to an output file named results.txt and should also be echoed to the display.

5/100 points will be allocated for a Minimum Design feature of your code. A minimum design is the implemented code that has the minimum number of instructions that would successfully execute the desired task. Code that is unnecessarily long with unneeded structures or variables is not a minimum design.

Here is a sample run for data file that has data for 2 processors:

given processors. There are several metrics that measure the performance of a

To understand the first line of data, processor 1 has executed the complier program using 10 billion Assembly instructions and 7 billion clock cycles. Its processor speed (clock rate) is 4 Giga Hertz.

processor. We will be using the following 3 measures: Typically, processors performance

Note: Both the input data file and the results file contain numbers in scientific notation. Please refere to Task03 of ICS 103 Lab02 for an explanation on how to read and display a number in scientific notation.

# clock cycles instructions CPI (clock cycles per instruction) CPU execution time-#instructions x CPI x clock cycle time Notice that the Cycle Time- 1. 2. CPU Clock Rate in Hertz units per second)Execution Time X 100 # instructions CPU Execution Time X 1000000 3. MIPS (mega instructions per second)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!