Question

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

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:

1.CPI (clock cycles per instruction) = #clock cycles /#instructions

2.CPU execution time = #instructions x CPI x clock cycle time .

cylce time = 1/CPU clock rate in hertz units

3.MIPS (mega instructions per second)= #instrucrions/ CPU X 1000000

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 processor’s CPU (central processing unit).

You must implement the following:

1.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).

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

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

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

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

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

Design and implement a C Language program that mea

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.

Can anyone help me with this question ??

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Design and implement a C Language program that measures the performance of given processors. There are...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Make sure to show how you solved the problem step-by-step: Consider three different processors P1, P2,...

    Make sure to show how you solved the problem step-by-step: Consider three different processors P1, P2, and P3, executing the same instruction set. P1 has a clock cycle time of 300 picosecond and a CPI (clock cycles per instruction) of 1.5. P2 has a clock cycle time of 400 picosecond and a CPI of 1.0. P3 has a clock cycle time of 250 picosecond and a CPI of 2.0. P1 is running a program with 10 instructions. P2 is running...

  • Consider three different processors Pi, P2, and P3 executing the same instruction set with the clock...

    Consider three different processors Pi, P2, and P3 executing the same instruction set with the clock rates and CPIS given in the following table 1. Clock Rate Processor CPI 3.4 GHz 1.2 P2 Рэ 2.6 GHz 1.0 2.2 4 GHz Which processor has the highest performance expressed in instructions per second? If the processors each execute a program in 15 seconds, find the number of cycles and the mumber of instructions We are trying to reduce the time by 30%...

  • Problem 3. (25 pts.) Compilers can have a profound impact on the performance of an application....

    Problem 3. (25 pts.) Compilers can have a profound impact on the performance of an application. Assume that for a program, compiler A results in a dynamic instruction count of 1 billion instructions and has an execution time of 1.1 seconds, while compiler B results in a dynamic instruction count of 1.2 billion instructions and an execution time of 1.5 seconds. A) Find the average CPI for each program given that the processor has a clock cycle time of 1...

  • Consider three different processors P1, P2, and P3 executing the same instruction set. P1 has a...

    Consider three different processors P1, P2, and P3 executing the same instruction set. P1 has a 3 GHz clock rate and a CPI of 1.5. P2 has a 3 GHz clock rate and a CPI of 1.0. P3 has a 2.5 GHz clock rate and has a CPI of 2.2. a. Which processor has the highest performance expressed in instructions per second? b. If each processor executes a program in 35 seconds, find the number of cycles and the number...

  • c. Performance: Company A's processor and Company B's processor are benchmarked on the same program. The...

    c. Performance: Company A's processor and Company B's processor are benchmarked on the same program. The CPI of the component instructions that are executed in the program are shown above for each processor. Additionally, the number of instructions of each type is provided. Company A 5 Branch CPI Load/Store CPI Arithmetic CPI 7 1 Company B 4 Branch CPI Load/Store CPI Arithmetic CPI 9 1 Program Instruction Count Branch Load/Store Arithmetic CPL 1.2x109 1.67x1010 1.5x1011 i. Assume Company A has...

  • Use HCS12 assembly language only - not C code Using CodeWarrior to create a new project...

    Use HCS12 assembly language only - not C code Using CodeWarrior to create a new project that uses assembly language. Write an assembly program that turns on the red LED at the beginning. It switches to off 2 seconds later and switches back to on after three more seconds. (That is, it stays on for 2 seconds and off for 3 seconds.) This switching process lasts forever. Use a loop (or nested loops) for each of the 2/3-second delay where...

  • (6 pts) A program P2 is executed on computer system B, which has a 2.8571429 GHz...

    (6 pts) A program P2 is executed on computer system B, which has a 2.8571429 GHz clock frequency. A programmer writes code to read processor performance monitoring registers after the program completes (Intel refers to the part of the CPU that can be used to collect run-time information as the Performance Monitoring Unit or PMU). The performance monitoring unit indicates that 23,118,471,971 user instructions were executed (just the instructions of P2 excluding OS and overhead instructions) in 53,866,039,692 clock cycles....

  • Playing a video game on a computer can give different experiences based on the performance capabi...

    Playing a video game on a computer can give different experiences based on the performance capabilities of the computer’s hardware (typically processor and graphics card – among other things). Developers of a new game will typically have “recommended” specifications for the computer hardware that is required to run their games on a variety of graphics settings (the faster the hardware, the higher the graphics quality). You are being tasked to create a program that will tell a gamer what graphics...

  • A program that executes 12.3x107 instructions is run on a pipelined processor. The table below provides...

    A program that executes 12.3x107 instructions is run on a pipelined processor. The table below provides the percentage of executed instructions for each type of instruction. Instruction Executed P ipeline CPU type instructions (%) w/o hazards ALU 29.4 Load 29.7 Store 14.7 Branch 26.2 2 (w/o prediction) 27% of the load instructions are followed by instructions that need the data being loaded, 47% of the branches are actually.not taken, please assume not taken prediction. a) Please determine the overall cycles...

  • CASE II AziTech is considering the design of a new CPU for its new model of...

    CASE II AziTech is considering the design of a new CPU for its new model of computer systems for 2021. It is considering choosing between two (2) CPU (CPUA and CPUB) implementations based on their performance. Both CPU are expected to have the same instruction set architecture. CPUA has a clock cycle time of 60 ns and CPUB has a clock cycle time of 75 ns. The same number of a particular instruction type is expected to be executed on...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT