0
43kviews
What is an instruction queue? Explain?
1 Answer
0
1.9kviews

The Instruction Queue:

  1. The execution unit (EU) is supposed to decode or execute an instruction.
  2. Decoding does not require the use of buses.
  3. When EU is busy in decoding and executing an instruction, the BIU fetches up to six instruction bytes for the next instructions.
  4. These bytes are called as the pre-fetched bytes and they are stored in a first in first out (FIFO) register set, which is called as a queue.

Significance of Queue:

enter image description here

  1. As shown in the above figure, while the EU is busy in decoding the instruction corresponding to memory location 100F0, the BIU fetches the next six instruction bytes from locations 100F1 to 100F6 numbered as 1 to 6.
  2. These instruction bytes are stored in the 6 byte queue on the first in first out (FIFO) basis.
  3. When EU completes the execution of the existing instruction and becomes ready for the next instruction, it simply reads the instruction bytes in the sequence 1, 2…. from the Queue.
  4. Thus the Queue will always hold the instruction bytes of the next instructions to be executed by the EU.

Pipelining:

  1. The process of fetching the next instruction when the present instruction is being executed is called as pipelining.
  2. Pipelining has become possible due to the use of queue.
  3. BIU (Bus Interfacing Unit) fills in the queue until the entire queue is full.
  4. BIU restarts filling in the queue when at least two locations of queue are vacant.

Advantages of pipelining:

  1. The execution unit always reads the next instruction byte from the queue in BIU. This is faster than sending out an address to the memory and waiting for the next instruction byte to come.
  2. In short pipelining eliminates the waiting time of EU and speeds up the processing.
  3. The 8086 BIU will not initiate a fetch unless and until there are two empty bytes in its queue. 8086 BIU normally obtains two instruction bytes per fetch.
Please log in to add an answer.