0
18kviews
What is instruction pipelining? Give advantages and challenges associated with it.
1 Answer
0
668views
  1. In 8086, to speed up the execution of program, the instruction fetching and execution of instructions are overlapped with each other.
  2. This process of fetching the next instruction when the present instruction is being executed is called as pipelining.
  3. In pipelining, when the nth instruction is executed, the (n+1) th instruction is fetched and thus the processing speed is increased.
  4. Pipelining has become possible due to the use of queue.
  5. BIU (Bus Interfacing Unit) fills in the queue until the entire queue is full.
  6. BIU restarts filling in the queue when at least two locations of queue are vacant.

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.

Advantages of pipelining:

  1. The EU always reads the next instruction byte from the queue in BIU. This is much 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.

Disadvantages of pipelining:

  1. While pipelining can severely cut the time taken to execute a program, there are problems that cause it to not work as well as it perhaps should.
  2. The three stages of the instruction execution process do not necessarily take an equal amount of time, with the time taken for 'execute' being generally longer than 'fetch'. This makes it much harder to synchronise the various stages of the different instructions.
  3. Also, some instructions may be dependent on the results of other earlier instructions. This can arise when data produced earlier needs to be used or when a conditional branch based on a previous outcome is used.
Please log in to add an answer.