RISC Pipelining Numerical Problem and Solution-Computer Organization & Architecture

Chapter-8

RISC

1.Assume that a pipeline has k=4 segments and executes n=100 tasks in sequence . Let the time taken to process a sub operation in each segment is 20 nano seconds. Calculate the speed up ratio in the pipeline.

Let’s assume that tp = 20ns the pipeline has k = 4 segments executes n = 100 tasks in sequence

The pipeline will  (k – n + 1) tp = (4 + 100 -1) × 20 ns = 2060 ns to complete the task

Assuming tn = 4 × 20 = 80ns, it will require ktp = 100 × 80 = 8000 ns. Therefore, the speedup is 8000/2060=3.88

Therefore, the speedup will approach 4 as n grows.

2. A non pipeline system takes 50 ns to process a task. The same task can be processed in six segment pipeline with a clock cycle of 10 ns. Determine the speed up ratio of the pipeline for 100 tasks. What is maximum speed up that can be achieved?

ANS:    tn=50 ns, k=6, tp=10ns, n=100 Then,
Speed Up Ratio= n tn/[(k+n-1)*10] = 100*10/[(6+99)*10] = 4.76

Smax= tn/tp= 50/10 =5

Therefore, Smax= 5

How To Apply Formula:

Where a k-segment pipeline with a clock cycle time tp is used to execute n tasks.

  • The first task T1 requires a time equal to ktp to complete its operation.
  •  The remaining n-1 tasks will be completed after a time equal to (n-1)tp
  • Therefore, to complete n tasks using a k-segment pipeline requires k+(n-1) clock cycles.

Consider a non-pipeline unit that performs the same operation and takes a time equal to tn to complete each task.

  • The total time required for n tasks is ntn.
  • The speedup of a pipeline processing over an equivalent non-pipeline processing is defined by the ratio S = ntn/(k+n-1)tp .
  • If n becomes much larger than k-1, the speedup becomes S = tn/tp.
  • If we assume that the time it takes to process a task is the same in the pipeline and non-pipeline circuits, i.e., tn = ktp, the speedup reduces to S=ktp/tp=k.
  • This shows that the theoretical maximum speed up that a pipeline can provide is k, where k is the number of segments in the pipeline.

3. Assume that a pipeline has k=8 segments and executes n=125 tasks in sequence . Let the time taken to process a sub operation in each segment is 30 seconds. Calculate the speed up ratio in the pipeline.

ANS: Let’s assume that tp = 30 sec the pipeline has k = 8 segments executes n = 125 tasks in sequence

The pipeline will  (k – n + 1) tp = (48+ 125 -1) × 30 sec = 3960 sec to complete the task

Assuming tn = 8 × 30 = 240 sec, it will require ktp = 125*240 = 30000 sec. Therefore, the speedup is 30000/3960=7.575

Therefore, the speedup will approach 4 as n grows.

 

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button