Question

Consider a computer with identical interpreters at levels 1, 2, and 3. It takes an interpreter...

Consider a computer with identical interpreters at levels 1, 2, and 3. It takes an interpreter n instructions to fetch examine and execute one instruction. A level 1 instruction takes k seconds to execute. How long does it take for an instruction at levels 2, and 3?

Homework Answers

Answer #1

ANSWER:

1.Instruction execution times at level 2 is kn.

2.Instruction execution times at level 3 is kn².

EXPLAINATION:

  • At each level, a factor of n is lost.
  • It is given that it takes an interpreter n instructions to fetch, examine, and execute one instruction. So if at level-1 an instruction takes k nanoseconds to execute then at level-2 instruction takes kn .
  • To execute as at each level we tend to lose a factor of n.
  • At level-3 instruction takes k(n.n) = kn² to execute.
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
(Pipelining) Given 3 different instruction types, A, B and C. Each type-A, B, and C instruction...
(Pipelining) Given 3 different instruction types, A, B and C. Each type-A, B, and C instruction takes 40ns, 25ns and 50ns to complete, respectively. An assembly program is written with 30 type-A, 40 type-B and 20 type-C instructions. (a). Assume a single-issue not pipelined processor, how much time (in nano-seconds) is required to complete the execution of this program? (10pts) (b). Now let us pipeline these instructions based on a cycle time of 10ns. To pipeline these instructions equally and...
Consider the first three energy levels of hydrogen (n = 1, 2, 3). a) What photon...
Consider the first three energy levels of hydrogen (n = 1, 2, 3). a) What photon energies can be observed from transitions between these levels? Label these in increasing order as E1, E2, and E3. b) A hydrogen atom which is initially in the n = 2 level collides with an aluminum atom in its ground state (the kinetic energy of the collision is nearly zero). The hydrogen can drop to the n = 1 level and ionize the aluminum...
1. Suppose a firm’s production function is given by Q = K(1/3)L(2/3), whereMPK = 1K(−2/3)L(2/3) and...
1. Suppose a firm’s production function is given by Q = K(1/3)L(2/3), whereMPK = 1K(−2/3)L(2/3) and MPL = 2K(1/3)L(−1/3) 33 (a) What happens to MPK as K increases? Hint: consider how MPK changes as Kchanges by one unit at low values of K high levels of K. (2 points) (b) What happens to MPK as L increases? (2 points) (c) Explain why MPK changes as L changes. (3 points)
Pb(s) + PbO2(s) + 2 H2SO4(aq) → 2 PbSO4(s) + 2 H2O(l) 1. If it takes...
Pb(s) + PbO2(s) + 2 H2SO4(aq) → 2 PbSO4(s) + 2 H2O(l) 1. If it takes 6.0 seconds of discharge for a car battery to start the engine and the starter drew a current of 230 A, what mass of Pb will be oxidized to PbSO4 in this time? 2. How long will it take to re-charge the battery with an alternator current of 30.0 A?
Consider the following code segment, where the branch is taken 30% of the time and not-taken...
Consider the following code segment, where the branch is taken 30% of the time and not-taken 70% of the time. R1 = R2 + R3 R4 = R5 + R6 R7 = R8 + R9 if R10 = 0, branch to linex R11 = R12 + R13 R14 = R11 + R15 R16 = R14 + R17 ... linex: R18 = R19 + R20 R21 = R18 + R22 R23 = R18 + R21 ... Consider a 10-stage in-order processor,...
2.) Consider an input array A of size n in which n − 1 of the...
2.) Consider an input array A of size n in which n − 1 of the elements have identical values and the remaining one value is smaller than the n − 1 identical values. What is the running time of Heapsort with input A?
Consider the following pseudocode segment. x ← 3 for i  {1, 2,   , n} do      for j  {1,...
Consider the following pseudocode segment. x ← 3 for i  {1, 2,   , n} do      for j  {1, 2,   , n} do      x ← x + 5      for k  {1, 2, 3, 4, 5} do      x ← x + k + 1 What is the value of x after this segment runs?
discrete structures problems 1. A program P takes time proportional to logn where n is the...
discrete structures problems 1. A program P takes time proportional to logn where n is the input size. If the program takes 1 minute to process input of size 1,000,000, how many seconds does it take to process input of size 100? 2. When the best possible algorithm to solve a problem is exponential-time, or in general in nonpolynomial (not in O(np) for any p) we call such a problem ___________________. 3. f(x) is O(x 2) and g(x) is O(x...
1. I have a pile of n identical ping-pong balls and two boxes, labelled Box 1...
1. I have a pile of n identical ping-pong balls and two boxes, labelled Box 1 and Box 2. How many different ways are there to distribute the n balls into the two boxes? Explain why your answer is correct. 2. How many ways are there to distribute n ping-pong balls among k boxes? 3. I have n books with n different titles. I want to put them on shelves in my library. How many different ways are there to...
1) A box has initial velocity of v0 = 0.3 m/s down the ramp. The coefficients...
1) A box has initial velocity of v0 = 0.3 m/s down the ramp. The coefficients of kinetic and static friction are ?k = 0.3 and ?s = 0.5 and the box has a mass of m = 2 kg. If the ramp is at angle 45°, and the box is given an initial velocity of v0 = 0.3 m/s, down the ramp, how long does it take to get to the bottom of the ramp, which is 3 meters...