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 (interpreter at each level to execute an instruction at that level). A level-1 instruction takes k nanoseconds to execute. How long does it take for an instruction at levels 2 and 3?

Respuesta :

Answer:

instruction execution times at level 2 is kn

instruction execution times at level 2 is kn²

Explanation:

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.

ACCESS MORE
ACCESS MORE
ACCESS MORE
ACCESS MORE