1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
OverLord2011 [107]
3 years ago
7

Assume your computer is able to complete 4 double floating-point operations per cycle when operands are in registers and it take

s an additional delay of 100 cycles to access any operands that are not in registers. The clock frequency of your computer is 2 Ghz.

Business
1 answer:
svp [43]3 years ago
8 0

Answer:

<em>For 1st algorithm</em><em>: The total run time is 200.25 s, while that of total waste time is 200 sec and the percentage of the waste time is 99.8%.</em>

<em>For 2nd algorithm:</em><em>The total run time is 100.35 s, while that of total waste time is 100.1 sec and the percentage of the waste time is 99.75%.</em>

Explanation:

As the complete question is not visible, therefore, the question is searched online and following reference question is obtained.

Following data is given as

Floating point operation time=T/4

Memory Access Time =100T

Frequency =2 GHz

Number of Cycles=1000

<u>1st Algorithm</u>

<em>/*dgemm0: simple ijk version triple loop</em>

<em>algorithm*/</em>

<em>for (i=0; i<n; i++)</em>

<em>for (j=0; j<n; j++)</em>

<em>for (k=0; k<n; k++)</em>

<em>c[i*n+j] += a[i*n+k] * b[k*n+j];</em>

First by rewriting the operation inside the inner loop:

= + ×

Now first A, B and C are loaded into the registers so

Load \,Time=3 \times Memory \,Access \,Time=3 \times 100\, T =300\, T

For 2 floating point computations (addition and multiplication)

Computation\, Time=2 \times Floating\, Time\\Computation\, Time=2 \times \frac{T}{4}\\Computation\, Time=\frac{T}{2}

Finally, to store and repeat the cycle as N^3 times the time is estimated as

Store \,Time=Memory\, Access\, Time=100T

Total Run time is given as

T_{run}=N^3 \times [T_{load}+T_{comp}+T_{store}]\\T_{run}=1000^3 \times [300T+\frac{T}{2}+100T]\\T_{run}=1000^3 \times [400.5T]\\T_{run}=200.25 s

Total Wasted time is given as

T_{waste}=N^3 \times [T_{load}+T_{store}]\\T_{waste}=1000^3 \times [300T+100T]\\T_{waste}=1000^3 \times [400T]\\T_{waste}=200 s

Percentage of Waste time is given as

\%age \, waste=\frac{T_{waste}}{T_{run}}\times 100\\\%age \, waste=\frac{200}{200.25}\times 100\\\%age \, waste=99.8\%

<em>The total run time is 200.25 s, while that of total waste time is 200 sec and the percentage of the waste time is 99.8%.</em>

<u>2nd Algorithm</u>

<em>/*dgemm1: simple ijk version triple loop</em>

<em>algorithm with register reuse*/</em>

<em>for (i=0; i<n; i++)</em>

<em>for (j=0; j<n; j++) {</em>

<em>register double r = c[i*n+j];</em>

<em>for (k=0; k<n; k++)</em>

<em>r += a[i*n+k] * b[k*n+j];</em>

<em>c[i*n+j] = r;</em>

<em>}</em>

Initialize register r with the content of C for N2 Times as given as Initialization\,Time=N^2 \times Memory \,Access \,Time=N^3 \times 100\, T

Time for Loading Operands A and B into registers for N3 Times is given as

Load \,Time=N^3 \times 2 \times Memory \,Access \,Time=N^3\times 2 \times 100\, T =N^3\times 200\, T

For 2 floating point computations (addition and multiplication)

Computation\, Time=N^3 \times\frac{T}{2}

Final Memory update to store result in the register r to the memory for N2 Times

Store \,Time=Memory\, Access\, Time=N^2 \times 100T

Total Run time is given as

T_{run}=N^3 \times [T_{load}+T_{comp}]+N^2 \times [T_{linit}+T_{store}]\\T_{run}=1000^3 \times [200T+\frac{T}{2}]+1000^2 \times [100T+100T]\\T_{run}=1000^3 \times [200.5T]+1000^2 \times [200T]\\T_{run}=100.35 s

Total Wasted time is given as

T_{waste}=N^3 \times [T_{load}]+N^2 \times [T_{init}+T_{store}]\\T_{waste}=1000^3 \times [200]+1000^2 \times [100T+100T]\\T_{waste}=1000^3 \times [200T]+1000^2 \times [200T]\\T_{waste}=100.1 s

Percentage of Waste time is given as

\%age \, waste=\frac{T_{waste}}{T_{run}}\times 100\\\%age \, waste=\frac{100.1}{100.35}\times 100\\\%age \, waste=99.75\%

<em>The total run time is 100.35 s, while that of total waste time is 100.1 sec and the percentage of the waste time is 99.75%.</em>

You might be interested in
An apartment building has potential annual rents of $80,000. Expenses are $26,000. The current vacancy rate is 6%. The owner has
algol [13]

Answer:

The building is valued at $328,000 for the owner.

Explanation:

We calcualte the value of the building using the perpetuity formula:

C/r = Value

Where:

C = annual income generate for the building

<u>expected rent revenue: </u> revenue x (1 - vacancy)

80,000 x (1 - 0.06) =   75,200

expenses per year  <u>  (26,000)   </u>

<em>income per year:        49,200</em>

<em />

rate of return 15% = 15/100 = 0.15

C/r = Value

49,200 / 0.15 = <em>Value  = 328,000</em>

6 0
4 years ago
Suppose the economy is in short-run equilibrium above potential GDP, the unemployment rate is very low, and wages and prices are
Effectus [21]

Answer:

an open market sale of Treasury securities (bonds).

Explanation:

An open market sale will decrease the money supply so aggregate demand decreases and shifts to the left.

8 0
3 years ago
Suppose these selected condensed data are taken from recent balance sheets of Bob Evans Farms (in thousands). 2022 2021 Cash $13
Fiesta28 [93]

Answer:

Current ratio for 2022: 0.311

Current ratio for 2021: 0.231

Explanation:

The current ratio is a liquidity ratio that indicates a company's ability to pay its current liabilities when they come due. The current ratio is calculated by the following formula:

Current Ratio =  Total Current Assets/Total Current Liabilities

In Bob Evans Farms:

Current ratio for 2022 =  $80,200/$257,500 = 0.311

Current ratio  for 2021 = $71,809/$311,100 = 0.231

​  

​

4 0
3 years ago
If you write a check for $4,000 to buy a car when you have only $57.18 in your checking account (and no overdraft protection), w
gayaneshka [121]
You will have a negative amount of moneyz in your checking account.(You will owe moneyz)
5 0
3 years ago
Read 2 more answers
A ______ summarizes what the holder of the job does and how and why he or she does it. For example, this document might state, "
Reptile [31]
Answer: job description
8 0
4 years ago
Other questions:
  • On June 1, Westbrook Productions had beginning balance of $41,000 in their Manufacturing Overhead account. During the month, the
    12·1 answer
  • B) Imagine that you earned $8,425 in one year. If the government enforces a 15% income tax, how much money would you owe in taxe
    14·1 answer
  • (I) A share of common stock in a firm represents an ownership interest in that firm. (II) Preferred stockholders hold a claim on
    11·1 answer
  • What is two examples of a value chain?
    13·1 answer
  • You put money into an account that earns a 5 percent nominal interest rate. The inflation rate is 2 percent, and your marginal t
    11·1 answer
  • The money supply is backed Multiple Choice by the government's ability to control the supply of money and therefore to keep its
    7·1 answer
  • A company uses the weighted average method for inventory costing. At the start of a period the production department had 48,000
    8·1 answer
  • Statements Answer 1. Significant financial statement accounts are materially affected, either directly through entries in the ge
    7·1 answer
  • Hart Attorney at Law experienced the follwoing transactions in 2016, the first year of operations:
    8·1 answer
  • If the economy is initially in equilibrium at full employment real GDP (QN), and a stock market crash reduces household wealth a
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!