Adobe Scan May 16, 2023
Adobe Scan May 16, 2023
I
l I n tr o d u c ti o n
l\7 !'~ ; ;h, m R.., f,~rit 'n 1t> \ \rr ttp mt•r \
\~~ft•m t ' • u11pot1£"nl.i1 Mo
,\ ! ,'13:.~ t~ J'lc t.,;;,,;;1 ~
,\ \ ~tt<'-»M ,x\ rsNS ll\l ot lon - Re /a lio n to pa
sh 11 rrd ra / if;tl sys tem., _
~, --.'"tt1'1:"';~ i ,'u tr, vi ,\'\ 'nd mtJ mO tJ sy.ftom.t
•""el.
1
ih m,)HJ , .._,1·.~u .t <1,~y ncl,r0 Pr im iti ve s for dis tri bu
11ow , exec 11tl mu De slR ted
'lf .li.$,triJn,te>J t"r>-,,y>1m,rirttt,.~ n l.,s uc s an d challenges.
A
~..,.\ iY id s <f iYt•.,.rmmrirotiott : A dis tdb u tt:d pr og ra m
rw t\i't)r•k.~ - Glt1bul .t trJ" A m od el of dis tri bu ted ex
ec utions
-.,\1.,n-ls \~f r,1\)<'f;'...\'S t\)fflJmmi<" ! - Cu ts - Pm t an
d fu ture co nes of an eve nt
-1licms. L<>Rknl 11mt
~ ~".t1.'tT :im.· - J'(t' t.) r tint~· : A fra m ew or k fn r a sy ste
• l'/ t,wic-al do rk sy 11d 1ro m of log ica l clo ck s
n i2o
tio 11: NT P.
C oa ten ts
r. f Definition of Di str ibu te d Sy ste m
, .2 Re lst ion to Co m pu te r Sy
stem Components
1.v~ Mo
· tfv 8t ion
.· . . . .. .. . . ·. .. . . . .. . De
c.-18, · · · · · · · · · · · · ·
1. .f Re lation to Pa ra lle l Sy · · Ma rks 8
ste ms
;_5 M es sage -P as sin g Sy
ste ms ve rs us Shared Me mo ry
Systems
1. 0-Pr im itiv es fo r Di str ibu te
d Co mm un ica tio n
1.1 Sy nc hr on ou s ve rs us
As yn ch ro no us Execution
s
1.8 De sign iss ue s an
d Ch all en ge s
1.9 A Model of Di str ibu
te d Co mp ut at ion s : A Di
stributed Program
1. 1o A M od el of Di str
ibu te d Executio_ns
1. 11 Models of Co m m un
ica tio n Ne tw or ks
1. 12 Gtob al St at e
1.13 Pa st an d Fu tu re
Co ne s of an Ev en t
1_1 4 M od 6/s of Pr oc es s Co mm un ica tio
ns
1. 15 ClocJc Ev en ts an d Pr
oc es s State
1.16 Logical Ti m e
1. 17 Ph ys ica l Cl oc k Sy Ma -1 5 · · · · · · · · · . . . . . . ua rk s 8
nc hr on iza tio n : NT P . .
..... Y , 'VI
Two M ar ks Que-stions wi
th An sw er s l
(1 - 1)
,,,, ..,.,
,,
"f
'. i
,
hn ll\linframet• Low price /performance rAtio i1 the
meu, computtng power,
l08t
'
t ..._.. 1 A collection of mim>pl'O('•NOl'I ofter " hettr.r prtc,1/pnt,irn
effc, 11 .,,1, i l,~.
w,y
~
\ lpNd I A dlatrtbuttd ,yattm may havt mort1 total computinK power lliar,
llllllmllne. f
■~
1111•11i1 u followt:
a COlllllllrlq o1np1tcatect data
.._.-, 5. Concurrent transactions
1• 5 Introduction
'-'ghtpmenta
... ,... are shared to redu.cc cost. I) atn 8h:m:d .m dntabasc or web p·igcs are
ru •Q:'.Ve1 re"ources which arc, more signlf1cant
. to users without regard ' for the
tefYer or servers that provido tlw.sc.
, Types of resources :
.
1. Hardware n·~ourcl' •· 1fa• tll lti s,.. . , prmte,, i:-;uncrn, sc:ann,.r
1 Data : File, d:\t,lbns~, weh pngl'.
3. Service : Search l'ngin-.?
• Patterns of rcsourrc sh,mng vary widely in their scope and in how closely users
work together :
1. Search Engine : Users 1\t'l'd no contact betwc~n users.
2. Computer Supported Co-operative Working (CSCW) : Users cooperate directly
share resources. Mechanisms to coordinate user's action are determined by the
pattern of sharing and the geographic distribution.
• For effective sharing, each resource must be managed by a program that offers a
communication interface enabling the resource to be accessed and updated reliably
and consistently.
• Service : Manages a collection of related resources and presents their functionalities
to users and applications.
• Seffer is basically storage of resources and it provides services to the
authenticated clients. It is running program on a networked computer. Server
accepts requests from client and performs a service and responds to request.
Example is Apache server and IIS server.
• 'The complete interaction between server machine and client machine, from the
point when the client sends its request to when it receives the server's response is
caUei a remote invocation.
• Reeources may be encapsulated as objects and accessed by client objects. In this
caee a client object invokes a method upon a server object.
tieirtharing.
....... MOUrcet:
t. CPU: tes processor-int£'n.c;ive applications for clients.
.. Computing Server : It execu
l,. lemote object server : It executes methods on behalf of clients.
cPV capacity of desktop machine with the local
Worm prograll\ : 1t shares
J
TECHNI~ PUBLICATIONS•• An"" lhMI lot /in(1Wllld9e
& II -, Clcllt .. ,. hoJdl NCll\tly-
1cct1HCl web pages in its RA
It.,. -·· "' . .
1 Diak : N t I u 1-, ,ktl-ll1dlee ,lllp\dffi•
M,
(3 0 0 I 3 • c p3 3)4 ~ ;
:; • .. [3 .! 3) 3 t I [ "' , 3]
(AOOJ 4 • d
I '
' '
Fig. 1.1 6.6
AU : M.19-15
IIM Physical Clock Synchronization : NTP
• Clock synchroruzation is done by two me~'1ods :
1. Internal synchroruzation
2. External synchronization
external synchronization
• External synchronization refers to synchronization of process clocks C 1 \Vith an
authontative external source S) Let D>O be the synchronization bound and S be
the source of CTC. Then lS{t) - Ci(t, <D for i = 1, 2, ... , N and for all real times t.
• We say that clocks C I are accurate -Y.ithin the bound of D
TECHNJC.A.L PUBLJCJ.T,O,JS - Jin up tr.~J.!1 f u r ~ ~
I
l,oundaare
. . . m. 1ht ~
;-._.._totrlblmltm.
...,,_~Jllllll•t orJJ If tbl ~ II within I cert.1ri
_, ..
IJIC.lt1C911d•--••--
t. A Moa _ . a nqi_.t to tlw
~
_..
07
d ta dia a,PffllUDI
tlJn! IJll5Vf!l al leul every d/2r 8eCOndi
~ aJJoWed ~ a clock and the UTC. '
a. n,, . . ••• _ . a nply -se with the CUJTl!RI UTC when receives U.
Nfld
& 'DI acJH •••--- the 1i1ne delay l,elWeell tiDle serve's ,sending u.
a P r md dia mzddM's Jlll!l1:iei,rin the _,,age. Then, ii uses the measure ~
., , .. dd-
~ - - . . . the cumnt ttDle from a tune ,erver.
--------------
........ Time_.
t.ff.t
Tt AN meuured using the same
.,_ • the ,ender's clock is off from
.. cr.o+Ti)/2
1
_.. •nr plus the tune tha
afftklS aB ~ -
- - - - - ,rill be ..-vaiJable. It
. . time of
in
will be
• tblla of
- affllet
t 4f
.. · ~
• 1""' _. hi dock time to the average of lte
. .
N IIL■ rk- ■ll6ol
ow n clock and the doc k times of its
,, :
l. 1111:h cl9 Ptl acrou the Int. ma t to be accurately syn
chr oni zed to UTC despite
..;z: : . .-Y lelt tha t can ,umve leng thy IOHN of con
nectivity.
C""an t k d'esfl lo lynchronl&e fNq uen tly and offN t the effe
cts of clock drif t.
6a PatrtOs "111DltCI\ ap iNt interference; auth
enti cate tha t the dat a is from a trusted
JI Pl
• 111111 NIP II vm ue COIIMClild In a logical hierarchy,
whe re servers in level n are
.l&sdly IO thole in level n-1 . The logical
hier arch y c.in be
ltlllr ■l bNDIM UNNChable or faile
d.
•••1•-• With one another In one of thre e mo des in the order 01
M N . . IN lm tt to be aynchronized
1a¥aNe . ,11. . . delaya encountered
~ T o ~ • milbl. s.n k, t~t can Aurvtv, lffl~thv l~'.H'fl of ronncdJ\.1ly
S. ~..._ clie nts to Mynchront e "Ulftdmtly, to ofket th!' rate of drift found
lftfflOlltl"OmpUtfta
-----
•tw ._.. thn for file a«r11•, c:ould contact a local
2111•:
.... II ••• drd for UN by the mute r eervers that supply time
ta U... 111d a,, 11w higher levela of the sync:h.roni.utian aubnet,
IC ;asAe • ID be achieved,
.... .... -,.m,tric mode exc han ge~ Warirlg timing
■I JS t
I C a,I ·• ~ • q Jf I · • • · . . ~ ~Syncn ro,u)JlS
_• • • •,. . . ' ,. I ~·
'
•tlc aitA ~w:kt NIII r ..... .,,,..,. °"Oft DS\"ffi':M O!'IOllS
O P 3SMJ
• • • UI Al I -QJ s
II Ml 1S1 R ·•--S)slc...... oa ■ m•lc•lrJft
J Pmffllc.....,.-a,._,
a,RFOCA■ 1lll
,, • f}
'\f 1,1,.. l~
tw•-.. appllmllon.
'4 I I J
loallioll....,.....
. . . . . . . . . . . ti ..
. .tying .......
..... 111.,......
. . . . . . .-.i. . . . . . . .
. . . . be .,ndlranoul due to . . Wlutring
•
•·•·
•nNrret 1 ,ICHlfll' • not buttw.d for the ,_..tvln, pro, "lifi
- - • • proc111 II not tn a ••• ready to ,-,1v, It Thert!fc,r~, 11 ,tt
"'HI lb
.
aaus• a••·· I
■ I I ed GIiiy by 11'°91 proc11.,, of thtt multlc••• Aroup that ar~ rrncly
JEii • .,•
.. aurc ....... It II . . . received b~ All
,l...... ,,, . . it II not NCelvtKt t,\
- - plart
I p
................ ,,..
IMaf wd and If any°"' .-in the 1et
Rt R2 S2
lft1
,. S2
:D:lstrli:,::bu::,:led::_:S~y_:st:em::':..__ _ _ _ _ _ _ _ _ _ 8_s_
2_._B _ _ _ _ _ _M sa
_r;_o_o_,_
c.11J_tli_nu_ ar=-
,a...,s_n;_;;a1,,t,,if
4
• For each pair of processes Pi and Pi and for each pair of messages ~1 x and M,
that are delivered to both the processes, Pi is delivered l\t, before t--1} if and only
if P1 is delivered Mx before My
0 Rule: Messages received in the same order, regardless of their timestamp.
0 Implanenution : A message sent to a sequencer, assigned a sequence number,
and finally multicast to receivers. A message retrieved in incremental order at a
~ver.
c Example: Replicated database updates
• Drawback : A centralized algorithm
.........
.... ILJMd ,ylteM where.·
•ct.bibutedsy,tem.
fllllf!dlinaa:g die critical &ection
illlilllllnerufion
. , ..
me,sage
' .......
o,ti.mpc,ritiprldun
f.wO .,,. ol ffldllP' ! REQUt91
- ~A
-
O ~ dw requnt ~a~ tu all utl~1
.,..,., Ptoe1111 it allowed to ~ntn lf!f! c~
• • •, ..., 111, reque,t tnn811ge (Ull5i3lc; ;A
t11ak)andit,~;
. . CS : awll••t requnted, ur hel<l
.:- . lite Si has r«elved REPLY J\ll'~Mgl• from n Hih• Sj, tlw uutho_riz:ition
ft
~ t in this message remainfl VAiid lmtll ~l !ll'nd~ n REPLY 11u:t1!l,1gc to SJ,
11• S,4.1 shows operation of Rkart-Agrawnln nlgorllhm .
• J"'O'
, • sue 51 and S2 are making request for criticnl IIC'Ction.
- 1.
'-~enters
crt11catuctlon
nn n
\
53 '. sz 1,avos
cr,tlcnl soctlon
rl
s,nn n n Fig. 3.4.1 (d)
Review Question
n s criti
w· h
~voe
tfld' or other
a processor the
cand'd
. . exits itca1asectioi
· . . tf
"YES" vote . il has not • 1ready ca,twhich
its vote.
ates ,, it mforms tl,e voting
· district,
· can
t f 1
~E Pi Vi is.• chosen
• 1 Pi process Pi
A 1s ass
su oc1ated
. : • a votint set Vt of processes. The set Vi for the
. ch that with
. . process is in its ownv ·
2, Vi/"\ Vi
voMS ~ts
* ·{ J . The . oting ocess
set. m the overlap between any two
. re is at least one pr .
e e same size
3. ~.11 voting sets ar th
IVi I : I Vj I:
4. Eac process Pi is conta·med within . M . ·
• WheJ'\ h
aie,nbetS
a processor wants
of its district It mt o enter a cntic · voting
· al section,
.
sets. . sends a request to all
ti
· t ay
processor receives a reque
()n exit it informs its d' u:
.t enter' if it .gets a grant fr otn all members. When a
1 answers wi
th yes, if it has not already cast its vote.
ct to enable a new voting,
15
• As 1,efore each process ,naintainS a state variable which can be one of the
1- Released : Does not have access to the critical section and does not reqUlle ,t.
following:
2. wanted : J)oeS not have access to the critical section but does require it.
• S. }leld : currently
Ill addition haS access to the critical section.
each process ,naintainS a boolean variable indicating whether or not
the pfOCt!SS haS "voted". Of course voting is not a one-time action. This variable
really ;ndicateS whether some process within the voting set has access to th•
(litical section and haS yet to release it. To begin with, thes• variables are set to
· 1, Question
J. Wrift s/Wrl nolt on ~ fallaVJi"g : ~ • • vofing algorithm. ff Mi/ · :11
suzukl-Kasaml'•
. . the access
9,oadcast Algortthrn
right to the sh ared resource is passed in a
i/!I ,;Lotpral token represer'tiJ>S ~~-· whoever holds the token is allowed to
,,..tlld
~ eritieal ~
fas)iiol'sectiorL
l
the pro---~
· all . ,
,n,Ol!S 51teS•
.,..;.
.1.1....,.
means a sequence nuinbet is u..sed
P2P and Distributed
Shared Memory
Introduction - Data indexing and <J\lerlays - Chord - Content addressable networks - Tapestry.
""'1fbldetl shared mmwry: Ab1traction and advantages - Memory consistency models -Shared
,nawny Mutual Exclusion.
Contents
8
5-1 Introduction of Peer-to-Peer Computing .... . . May-16, 17, 18, Dec.-17, · ·· Marks
5.2 Data Indexing and Overlays .......... . .. .. May-16, 17, 18, 19,
................ . . Dec.-16, 18 · · · · · · · · · · · Marks 13
5.3 Chord
5.4 Content Addressable Network
5.5 Tapestry
· \Jlll..6 Dlstrib·.,-"'
uun, Shared Memory . . . . . . . . . . . . . . . Dec.•18' · · · · · · · · · · · · · · Marks 8
5. 7 DSM Architecture
5.8 Design Issue In DSM
5.Q Memory Consistency Models
5.10 Shared Memory Mutual Exclusion
Two Marlcs Questions with Answers
(5 - 1)