0% found this document useful (0 votes)
74 views24 pages

BCA Semester II Computer Organisation and Architecture (COA

Uploaded by

kannannb789
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views24 pages

BCA Semester II Computer Organisation and Architecture (COA

Uploaded by

kannannb789
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

UNI

TIV-Par
all
elpr
ocessi
ngst
ruct
ures
Par
all
elPr
ocessi
ng

Par
all
elpr
ocessi
ngi
sat
erm usedt
odenot
eal
argecl
assoft
echni
quest
hatar
e
usedt
opr
ovi
desi
mul
taneousdat
a-pr
ocessi
ngt
asksf
ort
hepur
poseofi
ncr
easet
he
comput
ati
onalspeedofacomput
ersy
stem.I
nst
eadofpr
ocessi
ngeachi
nst
ruct
ion
sequent
ial
l
yasi
naconv
ent
ionalcomput
er,apar
all
elpr
ocessi
ngsy
stem i
sabl
eto
per
for
m concur
rentdat
apr
ocessi
ngt
oachi
evef
ast
erexecut
iont
ime.Forexampl
e,
whi
l
eani
nst
ruct
ioni
sbei
ngexecut
edi
ntheALU,t
henexti
nst
ruct
ioncanber
eadf
rom
memor
y.Thesy
stem mayhav
etwoormor
eALUsandbeabl
etoexecut
etwoormor
e
i
nst
ruct
ions att
he same t
ime.Fur
ther
mor
e,t
he sy
stem mayhav
etwo ormor
e
pr
ocessor
soper
ati
ngconcur
rent
ly.Thepur
poseofpar
all
elpr
ocessi
ngi
stospeedup
t
hecomput
erpr
ocessi
ngcapabi
l
ityandi
ncr
easei
tst
hroughput
,thati
s,t
heamountof
pr
ocessi
ngt
hatcanbeaccompl
i
sheddur
ingagi
veni
nter
valoft
ime.Theamountof
har
dwar
eincr
easeswi
th par
all
elpr
ocessi
ng.And wi
thi
t,t
he costoft
he sy
stem
i
ncr
eases.
Commonl
yusedpar
all
elpr
ocessi
ngst
ruct
uresar
e
1.Pi
pel
i
ning
Pi
pel
i
ningi
sat
echni
queofdecomposi
ngasequent
ialpr
ocessi
ntosuboper
ati
ons,
wit
h
each sub pr
ocess bei
ng execut
ed i
n a speci
aldedi
cat
ed segmentt
hatoper
ates
concur
rent
lywi
thal
lot
hersegment
s.Api
pel
i
necanbev
isual
i
zedasacol
l
ect
ionof
pr
ocessi
ngsegment
sthr
oughwhi
chbi
nar
yinf
ormat
ionf
lows.Eachsegmentper
for
ms
par
ti
alpr
ocessi
ngdi
ctat
edbyt
hewayt
het
aski
spar
ti
ti
oned.Ther
esul
tobt
ainedf
rom
t
hecomput
ati
oni
neachsegmenti
str
ansf
err
edt
othenextsegmenti
nthepi
pel
i
ne.The
f
inalr
esul
tisobt
ainedaf
tert
hedat
ahav
epassedt
hroughal
lsegment
s.Thename
"
pipel
i
ne"i
mpl
i
esaf
lowofi
nfor
mat
ionanal
ogoust
oani
ndust
ri
alassembl
yli
ne.I
tist
he
char
act
eri
sti
cofpi
pel
i
nest
hatsev
eralcomput
ati
onscanbei
npr
ogr
essi
ndi
sti
nct
segment
satt
hesamet
ime.Theov
erl
appi
ngofcomput
ati
oni
smadepossi
bleby
associ
ati
ngar
egi
sterwi
theachsegmenti
nthepi
pel
i
ne.Ther
egi
ster
spr
ovi
dei
sol
ati
on
bet
weeneachsegmentsot
hateachcanoper
ateondi
sti
nctdat
asi
mul
taneousl
y
Pr
inci
plesofl
i
nearpi
pel
i
ne

Exampl
e:FourSegmentPi
pel
i
ne

Thegener
alst
ruct
ureofaf
our
-segmentpi
pel
i
nei
sil
l
ust
rat
ed.Theoper
andspass
t
hrough al
lfoursegment
sinaf
ixed sequence.Each segmentconsi
sts ofa
combi
nat
ionalci
rcui
tS;t
hatper
for
msasuboper
ati
onov
ert
hedat
ast
ream f
lowi
ng
t
hrough t
he pi
pe.These segment
s ar
e separ
ated by r
egi
ster
s R;t
hathol
dthe
i
nter
medi
ater
esul
tsbet
weent
hest
ages.I
nfor
mat
ionf
lowsbet
weenadj
acentst
ages
undert
hecont
rolofacommoncl
ockappl
i
edt
oal
lther
egi
ster
ssi
mul
taneousl
y.We
t
askdef
ineat
askast
het
otaloper
ati
onper
for
medgoi
ngt
hroughal
lthesegment
sin
t
hepi
pel
i
ne.
Execut
ionsequenceofi
nst
ruct
ionsi
napi
pel
i
nedpr
ocessorcanbev
isual
i
zedusi
nga
space-
ti
medi
agr
am.Forexampl
e,consi
derapr
ocessorhav
ing4st
agesandl
ett
her
ebe
sequenceofi
nst
ruct
ionst
obeexecut
ed.Wecanv
isual
i
zet
heexecut
ionsequence
t
hrought
hef
oll
owi
ngspace-
ti
medi
agr
ams:

Nonov
erl
appedexecut
ion:

STAGE/CYCLE 1 2 3 4 5 6 7 8
S1 I
1 I
2
S2 I
1 I
2

S3 I
1 I
2

S4 I
1 I
2

Tot
alt
ime=8Cy
cle

Ov
erl
appedPi
pel
i
nedexecut
ion:
I
nthi
sexecut
ion
STAGE/CYCLE 1 2 3 4 5
S1 I
1 I
2 I
3 I
4 I
5

S2 I
1 I
2 I
3 I
4

S3 I
1 I
2 I
3

S4 I
1 I
2

Tot
alt
ime=5Cy
cle
Wher
eI1,I
2,I……….ar
3, ethesetofi
nst
ruct
ions
Pi
pel
i
neSt
ages
RI
SCpr
ocessorhas5st
agei
nst
ruct
ionpi
pel
i
nest
oexecut
eal
lthei
nst
ruct
ionsi
nthe
RI
SCi
nst
ruct
ionset
.Fol
l
owi
ngar
ethe5st
agesofRI
SCpi
pel
i
newi
tht
hei
rrespect
ive
oper
ati
ons:
St
age1(
Inst
ruct
ionFet
ch)
I
nthi
sst
aget
heCPUr
eadsi
nst
ruct
ionsf
rom t
headdr
essi
nthememor
ywhosev
aluei
s
pr
esenti
nthepr
ogr
am count
er.
St
age2(
Inst
ruct
ionDecode)
I
nthi
sst
age,i
nst
ruct
ioni
sdecodedandt
her
egi
sterf
il
eisaccessedt
ogett
hev
alues
f
rom t
her
egi
ster
susedi
nthei
nst
ruct
ion.
St
age3(
Inst
ruct
ionExecut
e)
I
nthi
sst
age,
ALUoper
ati
onsar
eper
for
med.
St
age4(
Memor
yAccess)
I
nthi
sst
age,
memor
yoper
andsar
ereadandwr
it
tenf
rom/
tot
hememor
ythati
spr
esent
i
nthei
nst
ruct
ion.
St
age5(
Wri
teBack)
I
nthi
sst
age,comput
ed/
fet
chedv
aluei
swr
it
tenbackt
other
egi
sterpr
esenti
nthe
i
nst
ruct
ions.
Per
for
manceofapi
pel
i
nedpr
ocessor
Consi
dera‘
k’segmentpi
pel
i
newi
thcl
ockcy
clet
imeas‘
Tp’
.Lett
her
ebe‘
n’t
askst
obe
compl
etedi
nthepi
pel
i
nedpr
ocessor
.Now,t
hef
ir
sti
nst
ruct
ioni
sgoi
ngt
otake‘
k’
cy
clest
ocomeoutoft
hepi
pel
i
nebutt
heot
her‘
n–1’
inst
ruct
ionswi
l
ltakeonl
y‘1’
cycl
e
each,
i.
e,at
otalof‘
n–1’
cycl
es.So,
timet
akent
oexecut
e‘n’
inst
ruct
ionsi
napi
pel
i
ned
pr
ocessor
:

Execut
ionTi
me(
pipel
i
ne)=k+n–1cy
cle
=(
k+n–1)Tp
I
nthesamecase,
foranon-
pipel
i
nedpr
ocessor
,execut
iont
imeof‘
n’i
nst
ruct
ionswi
l
lbe:

Execut
ionTi
me(
non-
over
lappedpi
pel
i
ne)=n*k*Tp

Speedup(
S)oft
hepi
pel
i
nedpr
ocessorov
ernon-
pipel
i
nedpr
ocessor
,when‘
n’t
asksar
e
execut
edont
hesamepr
ocessori
s:
S=Per
for
manceofpi
pel
i
nedpr
ocessor/
Per
for
manceofNon-
pipel
i
nedpr
ocessor
Ast
heper
for
manceofapr
ocessori
sinv
ersel
ypr
opor
ti
onalt
otheexecut
iont
ime,we
hav
e,

S=ETnon-
pipel
i
ne/ETpi
pel
i
ne /
/ET-
Execut
ionTi
me
=>S=[
n*k*Tp]/[
(k+n–1)*Tp]
S=[
n*k]/[
k+n–1]
Whent
henumberoft
asks‘
n’ar
esi
gni
fi
cant
lyl
argert
hank,
thati
s,n>>k
S=n*k/n
S=k
wher
e‘k’
ist
henumberofst
agesi
nthepi
pel
i
ne.

Ef
fi
ciency=Gi
venspeedup/Maxspeedup=S/Smax
Weknowt
hat
,Smax=k

So,
Eff
ici
ency=S/k

Thr
oughput=Numberofi
nst
ruct
ions/Tot
alt
imet
ocompl
etet
hei
nst
ruct
ions
So,
Thr
oughput=n/(
k+n–1)*Tp
Not
e:Thecy
clesperi
nst
ruct
ion(
CPI
)val
ueofani
deal
pipel
i
nedpr
ocessori
s1

I
nst
ruct
ionPi
pel
i
ne
E.
g.Ev
aluat
e(Ai
xBi
)+Ci
Pi
pel
i
nedi
nst
ruct
ionExecut
ioncy
cle
Ar
it
hmet
icPi
pel
i
ne
Ar
it
hmet
ic pi
pel
i
ne i
s most
ly used i
n hi
gh-
speed comput
ers.They ar
e used t
o
i
mpl
ementf
loat
ing-
poi
ntoper
ati
ons,mul
ti
pli
cat
ionoff
ixed-
poi
ntnumber
s,andsi
mil
ar
comput
ati
onsencount
eredi
nsci
ent
if
icpr
obl
ems.

Tounder
standt
heconcept
sofar
it
hmet
icpi
pel
i
nei
namor
econv
eni
entway
,letus
consi
deranexampl
eofapi
pel
i
neuni
tforf
loat
ing-
poi
ntaddi
ti
onandsubt
ract
ion.

Thei
nput
stot
hef
loat
ing-
poi
ntadderpi
pel
i
near
etwonor
mal
i
zedf
loat
ing-
poi
ntbi
nar
y
number
sdef
inedas:
10a ,Y=B*
X=A* 10b
Exampl
e:
9504*103
X=0.
8200*102
Y=0.
Wher
eA andBar
etwof
ract
ionst
hatr
epr
esentt
hemant
issaandaandbar
ethe
exponent
s.
Thecombi
nedoper
ati
onoff
loat
ing-
poi
ntaddi
ti
onandsubt
ract
ioni
sdi
vi
dedi
ntof
our
segment
s.Eachsegmentcont
ainst
hecor
respondi
ngsuboper
ati
ont
obeper
for
medi
n
t
hegi
venpi
pel
i
ne.Thesuboper
ati
onst
hatar
eshowni
nthef
oursegment
sar
e:

1.Compar
etheexponent
sbysubt
ract
ion.
2.Al
i
gnt
hemant
issas.
3.Addorsubt
ractt
hemant
issas.
4.Nor
mal
i
zet
her
esul
t.
Wewi
l
ldi
scusseachsuboper
ati
oni
namor
edet
ail
edmannerl
ateri
nthi
ssect
ion.

Thef
oll
owi
ngbl
ockdi
agr
am r
epr
esent
sthesuboper
ati
onsper
for
medi
neachsegment
oft
hepi
pel
i
ne.
2.
Arr
ayComput
ers
Thi
s ar
chi
tect
urei
ncl
udes a number of pr
ocessor
s(say 64 by 64) wor
king
si
mul
taneousl
y,eachhandl
i
ngoneel
ementoft
hear
ray
,sot
hatasi
ngl
eoper
ati
oncan
appl
ytoal
lel
ement
soft
hear
rayi
npar
all
el.Toobt
aint
hesameef
fecti
naconv
ent
ional
pr
ocessor
,theoper
ati
onmustbeappl
i
edt
oeachel
ementoft
hear
raysequent
ial
l
y,and
soconsequent
lymuchmor
esl
owl
y.
Anar
raypr
ocessormaybebui
l
tasasel
f-
cont
aineduni
tat
tachedt
oamai
ncomput
er
v
iaanI
/O por
tori
nter
nalbus;al
ter
nat
ivel
y,i
tmaybeadi
str
ibut
edar
raypr
ocessor
wher
ethepr
ocessi
ngel
ement
sar
edi
str
ibut
edt
hroughout
,andcl
osel
yli
nkedt
o,a
sect
ionoft
hecomput
er'
smemor
y.
Mi
chael
JFl
ynn’
sCl
assi
fi
cat
ionofAr
rayPr
ocessor
s
Thi
sCl
assi
fi
cat
ionbasedon
Mul
ti
pli
cit
yofi
nst
ruct
ionst
ream anddat
ast
reamsi
nacomput
ersy
stem.
I
tgi
veshowsequenceofi
nst
ruct
ionsordat
awi
l
lbeexecut
eduponasi
ngl
epr
ocessor
I
nst
ruct
ionst
ream:
ist
hesequenceofi
nst
ruct
ionsasexecut
edbyt
hemachi
ne
Dat
aSt
ream:
isasequenceofdat
aincl
udi
ngi
nput
,orpar
ti
alort
empor
aryr
esul
t,cal
l
ed
byt
hei
nst
ruct
ionSt
ream.
Si
ngl
e-i
nst
ruct
ion,
singl
e-dat
a(SI
SD)sy
stems
AnSI
SDcomput
ingsy
stem i
sauni
processormachi
newhi
chi
scapabl
eofexecut
inga
si
ngl
einst
ruct
ion,oper
ati
ngonasi
ngl
edat
ast
ream.I
nSI
SD,machi
nei
nst
ruct
ionsar
e
pr
ocessedi
nasequent
ialmannerandcomput
ersadopt
ingt
hismodelar
epopul
arl
y
cal
l
edsequent
ialcomput
ers.Mostconv
ent
ionalcomput
ershav
eSI
SDar
chi
tect
ure.Al
l
t
hei
nst
ruct
ionsanddat
atobepr
ocessedhav
etobest
oredi
npr
imar
ymemor
y.

Thespeedoft
hepr
ocessi
ngel
ementi
ntheSI
SDmodeli
sli
mit
edbyt
her
ateatwhi
ch
t
hecomput
ercant
ransf
eri
nfor
mat
ioni
nter
nal
l
y.

Si
ngl
e-i
nst
ruct
ion,
mul
ti
ple-
dat
a(SI
MD)sy
stems–
ASI
MDsy
stem i
samul
ti
processormachi
necapabl
eofexecut
ingt
hesamei
nst
ruct
ion
onal
ltheCPUsbutoper
ati
ngondi
ff
erentdat
ast
reams.Machi
nesbasedonanSI
MD
modelar
ewel
lsui
tedt
osci
ent
if
iccomput
ingsi
ncet
heyi
nvol
vel
otsofv
ect
orand
mat
ri
xoper
ati
ons.Sot
hatt
hei
nfor
mat
ioncanbepassedt
oal
lthepr
ocessi
ngel
ement
s
(
PEs)or
gani
zeddat
ael
ement
sofv
ect
orscanbedi
vi
dedi
ntomul
ti
pleset
s(N-
set
sforN
PEsy
stems)andeachPEcanpr
ocessonedat
aset
.
Mul
ti
ple-
inst
ruct
ion,
singl
e-dat
a(MI
SD)sy
stems
AnMI
SDcomput
ingsy
stem i
samul
ti
processormachi
necapabl
eofexecut
ingdi
ff
erent
i
nst
ruct
ionsondi
ff
erentPEsbutal
loft
hem oper
ati
ngont
hesamedat
aset
.
Thesy
stem per
for
msdi
ff
erentoper
ati
onsont
hesamedat
aset
.Machi
nesbui
l
tusi
ng
t
heMI
SDmodelar
enotusef
uli
nmostoft
heappl
i
cat
ion,af
ewmachi
nesar
ebui
l
t,but
noneoft
hem ar
eav
ail
abl
ecommer
cial
l
y.
Mul
ti
ple-
inst
ruct
ion,
Mul
ti
ple-
dat
a(MI
MD)sy
stems
AnMI
MDsy
stem i
samul
ti
processormachi
newhi
chi
scapabl
eofexecut
ingmul
ti
ple
i
nst
ruct
ionsonmul
ti
pledat
aset
s.EachPEi
ntheMI
MDmodelhassepar
atei
nst
ruct
ion
anddat
ast
reams;
ther
efor
e,machi
nesbui
l
tusi
ngt
hismodelar
ecapabl
etoanyki
ndof
appl
i
cat
ion. Unl
i
ke SI
MD and MI
SD machi
nes,PEs i
n MI
MD machi
nes wor
k
asy
nchr
onousl
y.
I
ntheshar
edmemor
yMI
MDmodel(
ti
ght
lycoupl
edmul
ti
processorsy
stems)
,al
lthe
PEsar
econnect
edt
oasi
ngl
egl
obalmemor
yandt
heyal
lhav
eaccesst
oit
.The
communi
cat
ionbet
weenPEsi
nthi
smodelt
akespl
acet
hrought
heshar
edmemor
y,
modi
fi
cat
ionoft
hedat
ast
oredi
nthegl
obal
memor
ybyonePEi
svi
sibl
etoal
lot
herPEs.
Domi
nantr
epr
esent
ati
veshar
edmemor
yMI
MDsy
stemsar
eSi
l
iconGr
aphi
csmachi
nes
andSun/
IBM’
sSMP(
Symmet
ri
cMul
ti
-Pr
ocessi
ng)
.
3.Mul
ti
processorSy
stem
I
nter
pr
ocessor
connect
ion
net
wor
k t
ool
ar
e
UNI
TV–Vect
orPr
ocessor
s&Ar
rayPr
ocessor
s
Vect
ors
Ther
eisacl
assofcomput
ati
onalpr
obl
emst
hatar
ebey
ondt
hecapabi
l
iti
esofa
conv
ent
ionalcomput
er.Thesepr
obl
emsar
echar
act
eri
zedbyt
hef
actt
hatt
heyr
equi
re
av
astnumberofcomput
ati
onst
hatwi
l
ltakeaconv
ent
ionalcomput
erdayorev
en
weekst
ocompl
ete.I
nmanysci
enceandengi
neer
ingappl
i
cat
ions,
thepr
obl
emscanbe
f
ormul
atedi
nter
msofv
ect
orsandmat
ri
cest
hatl
endt
hemsel
vest
ovect
orpr
ocessi
ng.
Comput
ers wi
th v
ect
or pr
ocessi
ng capabi
l
iti
es ar
e i
n demand i
n speci
ali
zed
appl
i
cat
ions. The f
oll
owi
ng ar
e r
epr
esent
ati
ve appl
i
cat
ion ar
eas wher
e v
ect
or
pr
ocessi
ngi
soft
heut
mosti
mpor
tance.

Long-
rangeweat
herf
orecast
ing
Pet
rol
eum expl
orat
ions
Sei
smi
cdat
aanal
ysi
s
Medi
cal
diagnosi
s
APr
ody
nami
csandspacef
li
ghtsi
mul
ati
ons
Ar
ti
fi
cial
int
ell
i
genceandexper
tsy
stems
Mappi
ngt
hehumangenome
I
magepr
ocessi
ng
Wi
thoutsophi
sti
cat
ed comput
ers,many oft
he r
equi
red comput
ati
ons cannotbe
compl
etedwi
thi
nar
easonabl
eamountoft
ime.Toachi
evet
her
equi
redl
evelofhi
gh
per
for
mancei
tisnecessar
ytout
il
izet
hef
ast
estandmostr
eli
abl
ehar
dwar
eandappl
y
i
nnov
ati
vepr
ocedur
esf
rom v
ect
orandpar
all
elpr
ocessi
ngt
echni
ques.
Vect
orOper
ati
ons
Manysci
ent
if
icpr
obl
emsr
equi
rear
it
hmet
icoper
ati
onsonl
argear
ray
sofnumber
s.
These number
s ar
e usual
l
yfor
mul
ated as v
ect
ors and mat
ri
ces off
loat
ing-
poi
nt
number
s.Av
ect
ori
sanor
der
edsetofaone-
dimensi
onalar
rayofdat
ait
ems.Av
ect
or
Vofl
engt
hni
srepr
esent
edasar
ow v
ect
orbyV=[
V1V2V3···Vn.
].I
tmaybe
r
epr
esent
edasacol
umnv
ect
ori
fthedat
ait
emsar
eli
stedi
nacol
umn.Aconv
ent
ional
sequent
ialcomput
eri
scapabl
eofpr
ocessi
ngoper
andsoneatat
ime.Consequent
ly,
oper
ati
onsonv
ect
orsmustbebr
okendowni
ntosi
ngl
ecomput
ati
onswi
thsubscr
ipt
ed
v
ari
abl
es.Theel
ementV;ofv
ect
orV i
swr
it
tenasV(
I)andt
hei
ndexIr
efer
stoa
memor
yaddr
essorr
egi
sterwher
ethenumberi
sst
ored.Toexami
net
hedi
ff
erence
bet
weenaconv
ent
ionalscal
arpr
ocessorandav
ect
orpr
ocessor
,consi
dert
hef
oll
owi
ng
For
tranDOl
oop:
DO20I=1,
100
20 C(
I)=B(
I)+A(
I)
Thi
sisapr
ogr
am f
oraddi
ngt
wov
ect
orsAandBofl
engt
h100t
opr
oduceav
ect
orC.
Thi
sisi
mpl
ement
edi
nmachi
nel
anguagebyt
hef
oll
owi
ngsequenceofoper
ati
ons
I
nit
ial
i
zeI=0
20 ReadA(I)
ReadB(I)
St
oreC(I)=A(I)+B(I)
I
ncr
ementI=I+1
If(
I<100)got
o20
Cont
inue
Thi
sconst
it
utesapr
ogr
am l
oopt
hatr
eadsapai
rofoper
andsf
rom ar
ray
sA
andBandper
for
msaf
loat
ing-
poi
ntaddi
ti
on.Thel
oopcont
rolv
ari
abl
eist
henupdat
ed
andt
hest
epsr
epeat100t
imes.Acomput
ercapabl
eofv
ect
orpr
ocessi
ngel
i
minat
es
t
heov
erheadassoci
atedwi
tht
het
imei
ttakest
ofet
chandexecut
ethei
nst
ruct
ionsi
n
t
hepr
ogr
am l
oop.I
tal
l
owsoper
ati
onst
obespeci
fi
edwi
thasi
ngl
evect
ori
nst
ruct
ionof
t
hef
orm
C(
1:100)=A(
1:100)+B(
1:100)
Thev
ect
ori
nst
ruct
ioni
ncl
udest
hei
nit
ialaddr
essoft
heoper
ands,t
hel
engt
hoft
he
v
ect
ors,
andt
heoper
ati
ont
obeper
for
med,
all
inonecomposi
tei
nst
ruct
ion.
Mat
ri
xMul
ti
pli
cat
ion
Mat
ri
xmul
ti
pli
cat
ioni
soneoft
hemostcomput
ati
onal
l
yint
ensi
veoper
ati
onsper
for
med
i
ncomput
erswi
thv
ect
orpr
ocessor
s.Themul
ti
pli
cat
ionoft
wonxnmat
ri
cesconsi
stof
n'
innerpr
oduct
sorn'
mul
ti
ply
-addoper
ati
ons.Annxm mat
ri
xofnumber
shasnr
ows
andm col
umnsandmaybeconsi
der
edasconst
it
uti
ngasetofnr
owv
ect
orsorasetof
m col
umnv
ect
ors.Consi
der
,forexampl
e,t
hemul
ti
pli
cat
ionoft
wo3x3mat
ri
cesAand
B.

Thepr
oductmat
ri
xCisa3x3mat
ri
xwhoseel
ement
sar
erel
atedt
otheel
ement
sofA
andBbyt
hei
nnerpr
oduct
:
ci
j=cij+aikxbkj;
Forexampl
e,t
henumberi
nthef
ir
str
owandf
ir
stcol
umnofmat
ri
xCi
s
cal
cul
atedbyl
ett
ingi
=1,
j=1,
toobt
ain

I
nst
ruct
ionf
ormatf
orv
ect
orpr
ocessor
.
Thi
srequi
rest
hreemul
ti
pli
cat
ionsand(
aft
eri
nit
ial
i
zingCnt
o0)t
hreeaddi
ti
ons.The
t
otalnumberofmul
ti
pli
cat
ionsoraddi
ti
onsr
equi
redt
ocomput
ethemat
ri
xpr
oducti
s9
x3=27.I
fweconsi
dert
hel
i
nkedmul
ti
ply
-addoper
ati
onc+axbasacumul
ati
ve
oper
ati
on,t
hepr
oductoft
wonxnmat
ri
cesr
equi
resn3 mul
ti
ply
-addoper
ati
ons.The
comput
ati
onconsi
stsofn2i
nnerpr
oduct
s,wi
theachi
nnerpr
oductr
equi
ri
ngnmul
ti
ply
-
addoper
ati
ons,
assumi
ngt
hatci
sini
ti
ali
zedt
ozer
obef
orecomput
ingeachel
ementi
n
t
hepr
oductmat
ri
x.I
ngener
al,
thei
nnerpr
oductconsi
stsoft
hesum ofkpr
oductt
erms
of
t
hef
orm

I
nat
ypi
calappl
i
cat
ion kmaybeequalt
o 100 orev
en 1000.Thei
nnerpr
oduct
cal
cul
ati
ononapi
pel
i
nev
ect
orpr
ocessori
sshowni
nFi
g.9-
12.Thev
aluesofAandB
ar
eei
theri
nmemor
yori
npr
ocessorr
egi
ster
s.Thef
loat
ing-
poi
ntmul
ti
pli
erpi
pel
i
neand
t
hef
loat
ing-
poi
ntadderpi
pel
i
near
eassumedt
ohav
efoursegment
seach.Al
lsegment
r
egi
ster
sint
hemul
ti
pli
erandadderar
eini
ti
ali
zedt
o0.Ther
efor
e,t
heout
putoft
he
adderi
s0f
ort
hef
ir
stei
ghtcy
clesunt
ilbot
hpi
pesar
eful
l
.A;
andB;
pai
rsar
ebr
oughti
n
andmul
ti
pli
edatar
ateofonepai
rpercy
cle.Af
tert
hef
ir
stf
ourcy
cles,t
hepr
oduct
s
begi
ntobeaddedt
otheout
putoft
headder
.Dur
ingt
henextf
ourcy
cles0i
saddedt
o
t
hepr
oduct
sent
eri
ngt
headderpi
pel
i
ne.Att
heendoft
heei
ght
hcy
cle,t
hef
ir
stf
our
pr
oduct
sA1B1t
hroughA4B4ar
eint
hef
ouraddersegment
s,andt
henextf
our
pr
oduct
s,A5B5t
hroughA,B,ar
eint
hemul
ti
pli
ersegment
s.Att
hebegi
nni
ngoft
he
ni
nthcy
cle,t
heout
putoft
headderi
sA1B1andt
heout
putoft
hemul
ti
pli
eri
sA5B5.
Thus,t
heni
nthcy
clest
art
stheaddi
ti
onA1B1+A5B5i
ntheadderpi
pel
i
ne.Thet
ent
h
cy
clest
art
stheaddi
ti
onA2B2+A6B6,andsoon.Thi
spat
ter
nbr
eaksdownt
he
summat
ioni
ntof
oursect
ionsasf
oll
ows:
C=A1B1+A5B5+A9B9+A13B13+···
+A2B2+A6B6+A10B10+A14BI
4+...
+A3B3+A7B7+A11B11+A15B15+···
+A4B4+A8B8+A12BI
2+A16B16+...

Ty
pesofAr
rayPr
ocessor
s
Ther
ear
ebasi
cal
l
ytwot
ypesofar
raypr
ocessor
s:
- At
tachedAr
rayPr
ocessor
s
- SI
MDAr
rayPr
ocessor
s

1.
Att
achedAr
rayPr
ocessor
s
Anat
tachedar
raypr
ocessori
sapr
ocessorwhi
chi
sat
tachedt
oagener
al-
pur
pose
comput
erandi
tspur
posei
stoenhanceandi
mpr
ovet
heper
for
manceoft
hatcomput
er
i
nnumer
icalcomput
ati
onalt
asks.I
tachi
eveshi
ghper
for
mancebymeansofpar
all
el
pr
ocessi
ngwi
thmul
ti
plef
unct
ional
uni
ts.
2.SI
MDAr
rayPr
ocessor
s
SI
MDi
stheor
gani
zat
ionofasi
ngl
ecomput
ercont
aini
ngmul
ti
plepr
ocessor
soper
ati
ng
i
npar
all
el.Thepr
ocessi
nguni
tsar
emadet
ooper
ateundert
hecont
rolofacommon
cont
rol
uni
t,t
huspr
ovi
dingasi
ngl
einst
ruct
ionst
ream andmul
ti
pledat
ast
reams.
Agener
albl
ockdi
agr
am ofanar
raypr
ocessori
sshownbel
ow.I
tcont
ainsasetof
i
dent
icalpr
ocessi
ngel
ement
s(PE'
s),eachofwhi
chi
shav
ingal
ocalmemor
yM.Each
pr
ocessorel
ementi
ncl
udesanALUandr
egi
ster
s.Themast
ercont
roluni
tcont
rol
sal
l
t
he oper
ati
ons oft
he pr
ocessorel
ement
s.I
tal
so decodes t
he i
nst
ruct
ions and
det
ermi
neshowt
hei
nst
ruct
ioni
stobeexecut
ed.
Themai
nmemor
yisusedf
orst
ori
ngt
hepr
ogr
am.Thecont
roluni
tisr
esponsi
blef
or
f
etchi
ngt
hei
nst
ruct
ions.Vect
ori
nst
ruct
ionsar
esentt
oal
lPE'
ssi
mul
taneousl
yand
r
esul
tsar
eret
urnedt
othememor
y.
Thebest
-knownSI
MD ar
raypr
ocessori
stheI
LLI
AC I
V comput
erdev
elopedbyt
he
Bur
roughscor
ps.SI
MD pr
ocessor
sar
ehi
ghl
yspeci
ali
zedcomput
ers.Theyar
eonl
y
sui
tabl
efornumer
ical
probl
emst
hatcanbeexpr
essedi
nvect
orormat
ri
xfor
m andt
hey
ar
enotsui
tabl
eforot
hert
ypesofcomput
ati
ons.

You might also like