Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Another pitfall cited in Section 1.10 is expecting to improve the overall performance of a computer by improving only one aspect of the computer. Consider a computer running a program that requires 250 s, with 70 s spent executing FP instructions, 85 s executed L/S instructions, and 40 s spent executing branch instructions.

1.13.1 [5] <§1.10> By how much is the total time reduced if the time for FP operations is reduced by 20%?

1.13.2 [5] <§1.10> By how much is the time for INT operations reduced if the total time is reduced by 20%?

1.13.3 [5] <§1.10> Can the total time can be reduced by 20% by reducing only the time for branch instructions?

Short Answer

Expert verified

1.13.1

236 seconds is reduced if the time for FP operations is reduced by 20%.

1.13.2

90% of the time for INT operation is reduced if the total time is reduced by 20%.

1.13.3

No, the total time can’t be reduced by 20% by only reducing the time for branch instructions.

Step by step solution

01

Define the concept.

1.13.1

If the previous time of running a program, the previous time for FP operations, the reducing percentage of the time for FP operations are known then it can be possible to calculate the time of running a program after reducing the specified percentage.

1.13.2

If the previous total time of running a program, the previous time of INT operation, the reducing percentage of the total time are known then it can be possible to calculate the time of INT operation after reducing the specified percentage by using.

The total time can be defined as,Thetotaltime=ThetimeofexecutingFPinstruction+ThetimeofexecutingL/Sinstructions+thetimeofexecutingbranchinstructions+theexecutiontimeofINToperations.

1.13.3

It is not possible to reduce the total time by 20% by only reducing the time for branch instructions.

The total time is the sum of the time of executing FP instruction, the time of executing L/S instructions, the time of executing branch instructions, and the execution time of INT operations.

02

Details of the calculation.

Given that, the time of running a program is 250 seconds.

The time of executing FP instructions is 70 seconds.

According to the question, the time for FP operations is reduced by 20%.

Hence, after reducing the time for FP operations, the required time of executing FP instructions = 0.8×70 = 56 secondsTherefore, the required time of running the program =250-70-56seconds=250-14seconds=236seconds

1.13.2

Given that, the time of running a program is 250 seconds.

The time of executing FP instructions is 70 seconds.

The time of executing L/S instructions is 85 seconds.

And the time of executing branch instructions is 40 seconds.

According to the question, the total time is reduced by 20%.

Hence, after reducing the total time, the required total time is 0.8×250seconds = 200 seconds

Let, only the execution time of INT operations is changed.

Hence, after reducing the total time, the execution time of INT operations is

the required new total time - the time of executing FP instructions- the time of executing L/S instructions - the time of executing branch instructionsseconds=200-70-85-40seconds= 5 seconds

Before reducing the total time, the execution time of INT operations was

the required total time - the time of executing FP instructions\hfill- the time of executing L/S instructions - the time of executing branch instructionsseconds=250-70-85-40seconds= 55 seconds

Hence,After reducing the total time, the execution time of INT operationsBefore reducing the total time, the execution time of INT operations=555=0.09

So, the time for INT operations is reduced by 91%.

1.13.3

Given, the time of running a program is 250 seconds.

The time of executing FP instructions is 70 seconds.

The time of executing L/S instructions is 85 seconds.

And the time of executing branch instructions is 40 seconds.

role="math" localid="1655190561140" The total time of execution =55+70+85secondsBy ignoring the executing time ofbranch instructions= 205 secondsHence,The new total time of executionThe new total time of execution=205250=0.82

The total time of execution is reduced by 18%.

So, the total time can’t be reduced by 20% by only reducing the time for branch instructions.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Question: Assign state numbers to the states of the finite-state machine you constructed for Exercise B.37 and write a set of logic equations for each of the outputs, including the next-state bits.

B.31 [10] <§B.6> Instead of thinking of an adder as a device that adds: two numbers and then links the carries together, we can think of the adder as a hardware device that can add three inputs together (ai, bi, ci) and produce two outputs (s, ci + 1). When adding two numbers together, there is little we can do with this observation. When we are adding more than two operands, it is possible to reduce the cost of the carry. The idea is to form two independent sums, called S (sum bits) and C (carry bits). At the end of the process, we need to add C and S together using a normal adder. This technique of delaying carry propagation until the end of a sum of numbers is called carry save addition. The block drawing on the lower right of Figure B.14.1 (see below) shows the organization, with two levels of carry save adders connected by a single normal adder. Calculate the delays to add four 16-bit numbers using full carry-lookahead adders versus carry save with a carry-lookahead adder forming the final sum. (The time unit T in Exercise B.28 is the same)

A.3 Is it ever safe for a user program to use registers \(k0 or \)k1?

What is the function implemented by the following Verilog modules:

Module FUNC1 (I0, I1, S, out):

input I0, I1;

input S;

output out;

out = S? I1: I0;

endmodule

module FUNC2 (out, ctl, clk,reset);

output [7:0] out;

input ctl, clk, reset;

reg [7:0] out;

always @(posedge clk)

if (reset) begin

out <= 8’b0;

end

else if (ctl) begin

out <= out+1;

end

else begin

out <= out-1;

end

endmodule

Prove that the NAND gate is universal by showing how to build the AND, OR, and NOT functions using a two-input NAND gate.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free