Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Tests  >  Test: Instruction Pipelining - Computer Science Engineering (CSE) MCQ

Test: Instruction Pipelining - Computer Science Engineering (CSE) MCQ


Test Description

10 Questions MCQ Test - Test: Instruction Pipelining

Test: Instruction Pipelining for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Test: Instruction Pipelining questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: Instruction Pipelining MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Instruction Pipelining below.
Solutions of Test: Instruction Pipelining questions in English are available as part of our course for Computer Science Engineering (CSE) & Test: Instruction Pipelining solutions in Hindi for Computer Science Engineering (CSE) course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: Instruction Pipelining | 10 questions in 30 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
Test: Instruction Pipelining - Question 1

Which of the following hazards occurs if the read takes place before the write operation is complete?

Detailed Solution for Test: Instruction Pipelining - Question 1

A flow dependence, also known as a data dependency, true dependency, or read-after-write (RAW) happens when one instruction is dependent on the outcome of another. A hazard occurs if the read takes place before the write operation is complete.
Hence the correct answer is True dependency.

Test: Instruction Pipelining - Question 2

Which of the following statements is true?

Detailed Solution for Test: Instruction Pipelining - Question 2

Concept:
Data forwarding also known as bypassing is an efficient way to solve data hazards in pipelined instruction execution. In the data forwarding or bypassing technique, the normal processor is updated with special hardware.

In this technique, the result of one stage is forward before the complete execution of particular instruction. Where the result is required it is directly passed to that pipeline stage. In the forwarding, there is no restriction from which stage data is transferred to next every next stage.

Option 1: Write after Write (WAW) hazard can be mitigated by data forwarding.
False, Write after Write (WAW)  is a situation that occurs when an instruction tries to write an operand before the first instruction writes it. This kind of hazard can also occur due to the concurrent execution of instructions. It may not calculate the inconsistent results. 

Option 2: Both WAW and WAR hazards can be mitigated by data forwarding.
False, Write after write, and write after reading can not reduce the problem of data forwarding where the result of one stage is forward before the complete execution of particular instruction is not possible because these are concurrent execution of instructions.

Option 3: Write after reading (WAR) hazard can be mitigated by data forwarding.
False, Write after the read is a situation that occurs when instruction II tries to write a destination before instruction I read it. It occurs due to the concurrent execution of instructions. It is also called Name dependence. Data forwarding the results are required it is directly passed to that pipeline stage but it is not possible where values are updated consequently. 
Hence the correct answer is None of the above.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Instruction Pipelining - Question 3

Consider an instruction pipeline with four stages (S1, S2, S3 and S4) each with combinational circuit only. The pipeline registers are required between each stage and at the end of the last stage. Delays for the stages and for the pipeline registers are as given in the figure.

What is the approximate speed up of the pipeline in steady state under ideal conditions when compared to the corresponding non-pipeline implementation?

Detailed Solution for Test: Instruction Pipelining - Question 3

Concept:
The segments are separated by registers Ri that holds the intermediate results between the stages.

Data:
Stage delay and corresponding register delay given
S1 = 5 ,
S2 = 6 ,
S3 = 11,
S4 = 8,
And corresponding register delay is 1 for each stage
Number of stage = 4
Time is taken to execute N instructions in non-pipelined implementation will be = (5 + 6 + 11 + 8)N = 30 × N
Clock period for pipelined implementation = max(5, 6, 11, 8) + 1 = 12 ns
Time is taken to execute N instructions in pipelined implementation will be = (4 + N-1)12 ≈ 12×N (N is very large)
Speedup = 30 N/12N = 2.5

Test: Instruction Pipelining - Question 4

A non-pipeline system takes 50ns to process a task. The same task can be processed in six-segment pipeline with a clockcycle of 10ns. Determine approximately the speedup ratio of the pipeline for 500 tasks. 

Detailed Solution for Test: Instruction Pipelining - Question 4

Concept:
Speed up factor is defined as the ratio of time required for non-pipelined execution to that of time received for pipelined execution.

Data:
Time for non-pipelined execution per task = tn = 50 ns
Time for pipelined execution per task =  tp = 10 ns
Number of stages in the pipeline = k = 6
Number of tasks = 500

Formula
S = Tn/Tp
S = speed up facto

Calculation:
Time for non-pipelined = Tn = tn × Number of tasks
Time for non-pipelined = Tn =  50 × 500
Time for pipelined = Tp​ = 1st task × k × tp + (All Remaining Tasks (k - 1)) × tp
Time for pipelined = Tp​ =  1 × 6 × 10 + (500 - 1) × 10
S = Tn/Tp = 4.95

Test: Instruction Pipelining - Question 5

The speed gained by an 'n' segment pipeline executing 'm' tasks is:

Detailed Solution for Test: Instruction Pipelining - Question 5

Data:
number of instructions/tasks = m
number of stage (segment) = n

Non-pipeline
Assume each stage take 1 unit of time
Time taken (Twp)  = number of stage × number of instructions
Twp  = n.m

For pipeline 
Only 1st instruction takes n unit time then every (m - 1) instruction takes 1 unit time
Time taken(Tp) = (n + m - 1) 

Therefore option 2 is correct

*Answer can only contain numeric values
Test: Instruction Pipelining - Question 6

A five-stage pipeline has stage delays of 150, 120, 150, 160 and 140 nanoseconds. The registers that are used between the pipeline stages have a delay of 5 nanoseconds each.
The total time to execute 100 independent instructions on this pipeline, assuming there are no pipeline stalls, is ______ nanoseconds.


Detailed Solution for Test: Instruction Pipelining - Question 6

Data:
Number of Instructions = n = 100
Number of stages = 5;
Stage delay = 5 ns

Calculation:
Time taken by five stage pipeline processor of singel instruction = T = Max (150, 120, 150, 160,140)  + stages delay
= 160 + 5 = 165 ns
The time required to execute n instructions with pipeline = [k + (n – 1)]T
= (5 + (100 - 1))×165 = 17160 ns

Test: Instruction Pipelining - Question 7

In an instruction execution pipeline, the earliest that the instruction TLB and data TLB can be accessed are 

Detailed Solution for Test: Instruction Pipelining - Question 7

Concept:
Instruction pipelining partitions the execution process into multiple independent steps capable of occurring in parallel. Instructions traverse these partitions one stage at a time. Once an instruction progresses to the next step, the next instruction can take its place in the pipeline, and so on.

RISC processor has 5 stage instruction pipeline to execute all the instructions in the RISC instruction set.

  • Instruction Fetch: In this stage, the CPU reads instructions from the address in the memory whose value is present in the program counter.
  • Instruction Decode: In this stage, instruction is decoded and the register file is accessed to get the values from the registers used in the instruction.
  • Instruction Execute: In this stage, ALU operations are performed.
  • Memory Access: In this stage, memory operands are read and written from/to the memory that is present in the instruction.
  • Write Back: In this stage, the computed/fetched value is written back to the register present in the instructions.

A processor that supports paging (which typically includes a mechanism for excluding execute permission even if not separately from reading permission) will access a TLB as part of instruction fetch. A translation lookaside data (TLB) is a memory cache that is used to reduce the time taken to access a user's memory location. The earliest that the instruction TLB and data TLB can be accessed is the fetch stage and memory stage respectively.

Hence the correct answer is the Fetch stage and memory stage respectively.

Test: Instruction Pipelining - Question 8

A 5-stage pipelined processor has Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Perform Operation (PO) and Write Operand (WO) stages. The IF, ID, OF and WO stages take 1 clock cycle each for any instruction. The PO stage takes 1 clock cycle for ADD and SUB instructions, 3 clock cycles for MUL instruction, and 6 clock cycles for DIV instruction respectively. Operand forwarding is used in the pipeline. What is the number of clock cycles needed to execute the following sequence of instructions?

Detailed Solution for Test: Instruction Pipelining - Question 8

It is given that there is operand forwarding. In the case of operand forwarding, the updated value from the previous instruction's PO stage is forwarded to the present instruction's PO stage. Here there's a RAW dependency between I1-I2 for R5 and between I2-I3 for R2. These dependencies are resolved by using operand forwarding as shown in the below table. The total number of clock cycles needed is 15.

clock cycles = 15.
Hence the correct answer is 15.

Test: Instruction Pipelining - Question 9

Pipelining increases ______ of the processor.

Detailed Solution for Test: Instruction Pipelining - Question 9

Concept:
Pipelining is an implementation technique whereby multiple instructions are overlapped in execution. It is like an assembly line. 
In pipelining, each step operates parallel with other steps. It stores and executes instructions in an orderly manner.
The main advantages of using pipeline are :

  • It increases the overall instruction throughput. 
  • Pipeline is divided into stages and stages are connected to form a pipe-like structure.
  • We can execute multiple instructions simultaneously.
  • It makes the system reliable. 
  • It increases the program speed.
  • It reduces the overall execution time but does not reduce the individual instruction time.
Test: Instruction Pipelining - Question 10

Which one of the following is false about Pipelining?

Detailed Solution for Test: Instruction Pipelining - Question 10

Concept:
Pipelining is an implementation technique whereby multiple instructions are overlapped in execution. It is like an assembly line. 
In pipelining, each step operates parallel with other steps. It stores and executes instructions in an orderly manner.
The main advantages of using pipeline are :

  • It increases the overall instruction throughput. 
  • Pipeline is divided into stages and stages are connected to form a pipe-like structure.
  • We can execute multiple instructions simultaneously.
  • It makes the system reliable. 
  • It increases the program speed.
  • It reduces the overall execution time but does not reduce the individual instruction time.

​Therefore option 2 is the false statement about Pipelining

Information about Test: Instruction Pipelining Page
In this test you can find the Exam questions for Test: Instruction Pipelining solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Instruction Pipelining, EduRev gives you an ample number of Online tests for practice

Top Courses for Computer Science Engineering (CSE)

Download as PDF

Top Courses for Computer Science Engineering (CSE)