Que 1:A microprocessor provides an instruction capable of moving a string of bytes from one area of memory to another. The fetching and initial decoding of the instruction takes 20 clock cycles. Thereafter, it takes 25 clock cycles to transfer each byte. The microprocessor is clocked at a rate of 20 GHz. a. Determine the length of the instruction cycle for the case of a string of 128 bytes. b. What is the worst-case delay for acknowledging an interrupt if the instruction is non- interruptible? c. Repeat part (b) assuming the instruction can be interrupted at the beginning of each byte transfer.

Answer:

Given Data:

  • Clock rate of the microprocessor: 20 GHz (which is 20×109 cycles per second).
  • Initial fetching and decoding time: 20 clock cycles.
  • Time to transfer each byte: 25 clock cycles.
  • Number of bytes to be transferred: 128 bytes.

Part (a): Length of the Instruction Cycle

  1. Fetching and Initial Decoding:

    • This step takes 20 clock cycles.
  2. Transferring Each Byte:

    • Each byte transfer takes 25 clock cycles.
    • For 128 bytes, total cycles for transfer = 128 bytes * 25 clock cycles/byte = 3200 clock cycles.
  3. Total Length of the Instruction Cycle:

    • Total clock cycles = Initial fetching and decoding cycles + Transfer cycles
    • Total clock cycles = 20 cycles + 3200 cycles = 3220 clock cycles.
  4. Convert Clock Cycles to Time:

    • Clock speed = 20 GHz = 20×109 cycles/second.
    • Time per cycle = 120×109 seconds.
    • Total time for the instruction cycle = Total clock cycles * Time per cycle
    • Total time = 3220 cycles * 120×109 seconds/cycle
    • Total time = 322020×109 seconds
    • Total time = 322020×109 seconds
    • Total time = 1.61×107 seconds
    • Total time = 161 nanoseconds (ns).

So, the length of the instruction cycle for transferring a string of 128 bytes is 161 ns.

Part (b): Worst-case Delay for Acknowledging an Interrupt (Non-interruptible Instruction)

  • If the instruction is non-interruptible, the worst-case delay for acknowledging an interrupt is the total time taken by the instruction cycle.
  • From part (a), we have already determined this time to be 161 ns.

Part (c): Worst-case Delay for Acknowledging an Interrupt (Interruptible at Each Byte Transfer)

  • If the instruction can be interrupted at the beginning of each byte transfer, the worst-case scenario for the delay would be just before a new byte transfer starts.
  • In this case, the maximum delay for acknowledging an interrupt would be the time taken to transfer one byte after the initial fetching and decoding time.
  1. Time for Initial Fetching and Decoding:

    • This is 20 clock cycles.
  2. Time to Transfer One Byte:

    • This is 25 clock cycles.
  3. Total Worst-case Delay:

    • Total cycles = Initial fetching and decoding cycles + Time for one byte transfer
    • Total cycles = 20 cycles + 25 cycles = 45 clock cycles.
  4. Convert Clock Cycles to Time:

    • Time for 45 cycles = 45 cycles * 120×109 seconds/cycle
    • Time = 4520×109 seconds
    • Time = 2.25×109 seconds
    • Time = 2.25 nanoseconds (ns).

So, the worst-case delay for acknowledging an interrupt, if the instruction can be interrupted at the beginning of each byte transfer, is 2.25 ns.

Comments

Popular posts from this blog

7.Write a program to read a list containing item name, item code and cost interactively and produce a three-column output as shown below. NAME CODE COST Turbo C++ 1001 250.95 C Primer 905 95.70 ------------- ------- ---------- ------------- ------- ---------- Note that the name and code are left-justified and the cost is right-justified with a precision of two digits. Trailing zeros are shown.

Questions 2 : Assume there are three small caches, each consisting of four one-word blocks. On cache is direct-mapped, a second is two-way set-associative, and the third is fully associative. Find the number of hits for each cache organization given the following sequence of block addresses: 0, 8, 6, 5, 10, 15 and 8 are accessed twice in the same sequence. Make a tabular column as given below to show the cache content on each of columns as required. Show all the pass independently pass. Draw as many numbers Assume the writing policy is LRU. Memory location Hit/Mis Add as many columns as required

Quetion 6 : Consider the "in-order-issue/in-order-completion" execution sequence shown in f In Figure Decode OWE Execute 12 12 12 14 16 13 16 13 15 15 16 Write 024/06/02 11 3 4 11 12 13 13 N 15 16 a. Identify the most likely reason why I could not enter the execute fourth cycle. stage until the [2] b. Will "in-order issue/out-of-order completion" or "out-of-order issue/out-of-order completion" fix this? If so, which? Explain