+1 vote
357 views

asked | 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

Speedup=8/4=2

Efficiency=2/4=50%
You are right. I took 8 processors. Everthing is given in question itself☺

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

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:

http://gateoverflow.in/52258/isro2011-10

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

+1 vote