MC714: Sistemas Distribu´ ıdos
- Prof. Lucas Wanner
MC714: Sistemas Distribu dos Prof. Lucas Wanner Instituto de - - PowerPoint PPT Presentation
MC714: Sistemas Distribu dos Prof. Lucas Wanner Instituto de Computac ao, Unicamp Aula 8: Nomeac ao Revis ao: Exerc cios Descreva o processo de conex ao entre cliente e servidor com sockets TCP/IP . 1
1
2
3
4
5
6
7
8
2 / 33
8
9
10 Uma union em C permite que um campo de uma estrutura guarde uma de v´
11 O que ´
3 / 33
1
2
3
4
5
6
4 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 5 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 6 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 7 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 8 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 9 / 33
10 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 11 / 33
Host's present location Client's location
current location
to current location Host's home location
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 12 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 13 / 33
A leaf domain, contained in S Directory node dir(S) of domain S A subdomain S
(S is contained in T) Top-level domain T The root directory node dir(T)
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 14 / 33
Domain D2 Domain D1 M Field with no data Location record with only one field, containing an address Field for domain dom(N) with pointer to N Location record for E at node M N
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 15 / 33
Domain D M Node has no record for E, so that request is forwarded to parent Look-up request Node knows about E, so request is forwarded to child
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 16 / 33
DomainD M Nodehasno recordforE, sorequestis forwarded toparent Insert request Nodeknows aboutE,sorequest isnolongerforwarded (a) M Nodecreatesrecord andstorespointer Nodecreates recordand storesaddress (b)
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 17 / 33
elke .twmrc mbox steen home keys "/home/steen/mbox" "/keys" "/home/steen/keys" Data stored in n1 Directory node Leaf node n2: "elke" n3: "max" n4: "steen" max keys n1 n2 n5 n0 n3 n4
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 18 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 19 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 20 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 21 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 22 / 33
.twmrc "/home/steen/keys" "/keys" n1 n2 n5 n0 n3 n6 mbox "/keys" Data stored in n6 n4 elke steen home keys Data stored in n1 Directory node Leaf node n2: "elke" n3: "max" n4: "steen" max keys
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 23 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 24 / 33
net jp us nl sun eng yale eng ai linda robot acm jack jill ieee keio cs cs pc24 co nec csl
vu cs ftp www ac com edu gov mil pub globe index.txt Mana- gerial layer Adminis- trational layer Global layer Zone
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 25 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 26 / 33
1
2
3
Client's name resolver Root name server Name server nl node Name server vu node Name server cs node
ftp cs vu nl Nodes are managed by the same server
#<nl,vu,cs,ftp> <nl,vu,cs,ftp>
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 27 / 33
1
2
3
Client's name resolver Root name server Name server nl node Name server vu node Name server cs node
#<nl,vu,cs,ftp>
<nl,vu,cs,ftp>
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 28 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 29 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 30 / 33
Name server nl node Name server vu node Name server cs node Client Long-distance communication Recursive name resolution Iterative name resolution I1 I2 I3 R1 R2 R3
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 31 / 33
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 32 / 33
C = NL O = Vrije Universiteit OU = Comp. Sc. Host_Name = star Host_Name = zephyr CN = Main server N
Attribute Value Attribute Value Country NL Country NL Locality Amsterdam Locality Amsterdam Organization Vrije Universiteit Organization Vrije Universiteit OrganizationalUnit
OrganizationalUnit
CommonName Main server CommonName Main server Host Name star Host Name zephyr Host Address 192.31.231.42 Host Address 137.37.20.10
Source: Maarten van Steen, Distributed Systems: Principles and Paradigms 33 / 33