The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+3 votes

asked in CO & Architecture by Veteran (12.3k points)
retagged by | 372 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

+6 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 (96.7k 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 Boss (5.1k points)
5 processors are there in that question

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

29,157 questions
36,984 answers
34,824 users