Suppose a program has a certain number of instructions, which on average execute in a given time. Write a Java program that simulates the execution of instructions on a typical computer. Use the “standard” execution time values in the sample below. Use four instance variables to store these values as time variables. No user input is necessary.
AssignmentExecutionInstructions/ExecutionTime.java
Instructions/ExecutionTime.java
Write a Java program that simulates the execution of instructions on a typical computer. Use the “standard” execution time values in the sample below. Use four instance variables to store these values as time variables. No user input is necessary.
Sample execution: Assumed number of instructions to execute: 10000 Assumed execution time of each instruction: 10.0 ns Assumed clock speed: 3.0 GHz Assumed number of instructions per cycle: 1 Total execution time = 1.667 x 10^-4 seconds
Notes:
Reviews
There are no reviews yet.