First time here? Checkout the FAQ!
+1 vote

asked in CO & Architecture by Veteran (10.8k points)   | 357 views
Let time taken for a single task=1 sec

Then ,Time taken to perform 8 tasks on a single processor =8 as they have to be executed one after another.

Now, when there are 4 processor,(Say P1,P2,P3 and P4)

then allocation of tasks is done in this manner

At t=,P1-T1

At t=2, P1-T2

At t=3 ,P1-T3 P2-T4,P3-T5

At t=4,P1-T6 P2-T7,P3-T8

So total time taken=4s


You are right. I took 8 processors. Everthing is given in question itself☺

2 Answers

+4 votes
Best answer

Here the key thing is :

We have 8 tasks(instructions)..So if we have one processor so task will be done sequentially so :

Time taken to 8 tasks to do sequentially = 8 time units ..Here the assumption is given :

Time taken by each instruction takes same amount of time..Hence it is 8 time units for sequential case..

Now if we consider the parallel case..So we see in the precedence graph.

a) T1 is done first

b) T2 is done next

c) T3,T4 and T5 next in parallel as we have 4 processors so we can assign 3 of them..

d) Then finally T6 , T7 and T8 similarly..

Hence in all we need now 4 time units..

Hence performance enhancement(speedup)   =   Time taken in sequential part / (Time taken in parallelised system)

                                                                  =   8 / 4

                                                                  =   2

Now efficiency is defined in the question as :

Efficiency  = Speed up / No of processors 

Hence efficiency           =       2 / 4

                                    =      50 % 

Hence C) is the correct answer..

answered by Veteran (77.1k points)  
selected by
0 votes

Habib plz check this,

System has 4 processors. Time to complete each process i.e. Ti is same.

Reasoning :
T1 executes on Processor 1. other 3 processors are idle.
T2 executes on Processor 1, other 3 Processors are idle.
T3, T4, T5 can run parallely on different different processors. Now 3 processors are working and 1 are still unused.
T6, T7, T8 can run parallely on different different processors. now 3 processors are working and 1 are still idle.

Total 4*4 =16instance of processors(if serial). 8 out of 16 are working.(in pipeline)
Efficiency = (8/16)*100 = 50%

Similar question:


answered by Loyal (3.4k points)  
5 processors are there in that question

Top Users Sep 2017
  1. Habibkhan

    7166 Points

  2. Warrior

    2640 Points

  3. Arjun

    2574 Points

  4. rishu_darkshadow

    2520 Points

  5. A_i_$_h

    2280 Points

  6. nikunj

    1980 Points

  7. manu00x

    1846 Points

  8. makhdoom ghaya

    1770 Points

  9. Bikram

    1744 Points

  10. SiddharthMahapatra

    1718 Points

26,144 questions
33,726 answers
31,115 users