61a lecture 31
play

61A Lecture 31 November 14th 2011 Monday, November 14, 2011 - PowerPoint PPT Presentation

61A Lecture 31 November 14th 2011 Monday, November 14, 2011 Parallel and Distributed Computing Coordinating groups of computers Monday, November 14, 2011 So far functions data structures objects abstraction interpretation evaluation 3


  1. 61A Lecture 31 November 14th 2011 Monday, November 14, 2011

  2. Parallel and Distributed Computing Coordinating groups of computers Monday, November 14, 2011

  3. So far functions data structures objects abstraction interpretation evaluation 3 Monday, November 14, 2011

  4. So far functions data structures objects One program One machine abstraction One computer interpretation evaluation 4 Monday, November 14, 2011

  5. Parallel and Distributed Computing Distributed Computing Groups of computers communicating and exchanging data with a shared goal. • Communication networks • Data storage • Large scale computing Parallel Computing One computer with many processes collaborating to execute the same program faster. • Speeding up computation 5 Monday, November 14, 2011

  6. Lecture plan Today Distributed computing Wednesday Parallel computing: problems Friday Parallel computing: solutions 6 Monday, November 14, 2011

  7. Distributed Computer Systems Interconnected groups of independent computers that collaborate to get work done. 7 Monday, November 14, 2011

  8. Characteristics of distributed systems 1. Independent computers 2. (Often) In different locations 3. Connected by a network 4. Communicate by passing messages to each other 5. A shared computational goal. 8 Monday, November 14, 2011

  9. Examples of distributed systems Information sharing & communication Telephone networks, cellular networks The world wide web Skype, IM, Xbox/PlayStation and other online multiplayer systems Large scale computation “Cloud computing” - Amazon and Microsoft MapReduce - later in this course 9 Monday, November 14, 2011

  10. Topics in Distributed Systems • Architectures • Client-server • Peer-to-peer • Message passing • Design principles • Modularity • Interfaces 10 Monday, November 14, 2011

  11. Architecture Computers in a distributed system can have different roles depending on the goal of the system. The network of computers can be structured in different ways. Client-server Peer-to-peer 11 Monday, November 14, 2011

  12. Client-Server Architecture client Good for dispensing a client service client request request 2 roles request Clients: make requests from server client Server: listens for response response server requests and responds request to them. request client Many clients request Only 1 server. request request client client client 12 Monday, November 14, 2011

  13. Example: world wide web The New York Times www.nytimes.com request response client client client 13 Monday, November 14, 2011

  14. Example: world wide web Server’s job Client’s job Listen for requests Send correct request to server based on user input Calculate front page Display received web page • ads • fonts & colors • personalized content • images Send web page back to • interactivity correct browser Send further requests 14 Monday, November 14, 2011

  15. Division of labor Server One source Many consumers Provide information or service Use service, or make it usable to humans Client 15 Monday, November 14, 2011

  16. Single point of failure client client client request Server is a single request point of failure. request System stops working client if server goes down. response response server If client goes down, request request only that client is client affected. request request request client client 16 client Monday, November 14, 2011

  17. Disadvantage: performance degrades under load The more clients that want to use a server, the worse the server performs • Connection speed becomes slow -- limited bandwidth • Server becomes slow to respond -- limited processing power Cannot shrink and grow with changing demand 17 Monday, November 14, 2011

  18. Peer to peer architecture Division of labor among all computers All computers send and receive data All computer contribute resources • Disk space • Memory • Processing power Applications • Data storage • Communication • Large-scale computation 18 Monday, November 14, 2011

  19. The importance of an organized network structure B A 19 Monday, November 14, 2011

  20. The importance of an organized network structure B The shortest path for A to send a A message to B. 20 Monday, November 14, 2011

  21. The importance of an organized network structure B A roundabout path Inefficient. A 21 Monday, November 14, 2011

  22. The importance of an organized network structure B Everyone sends A’s message to their neighbors, until B is reached. A Huge load on network. Inefficient use of resources 22 Monday, November 14, 2011

  23. Supernodes: keep track of network structure Computers with a special function No longer “pure” peer-to- peer Knows locations of other supernodes Knows which computers are “under” it Keeps track of newcomers and computers that leave 23 Monday, November 14, 2011

  24. Example: Skype B Peers: all computers running skype Not a pure peer-to-peer network Supernodes coordinate users and manage sign-ins and sign-outs. A 24 Monday, November 14, 2011

  25. Disadvantages Complex network structure Inefficiency in communication • Can take up a lot of traffic trying to route messages. Advantages No single point of failure Can grow and shrink with demand 25 Monday, November 14, 2011

  26. Messages A B 1101000110 Used to coordinate behavior Send or receive data Request that a function be executed Signal that a particular event has occurred 26 Monday, November 14, 2011

  27. Message Structure A B 1101000110 SENDER RECIPIENT ... CONTENT ... 27 Monday, November 14, 2011

  28. Message Structure A B 1101000110 So recipient knows where to SENDER send response So message can be RECIPIENT routed properly. Data, remote procedure call, ... CONTENT ... signal, encoded video, text, etc. 28 Monday, November 14, 2011

  29. Within a program A B (string, ..., ...) Dispatch procedure Sender and recipient implicit Data sent using underlying data structures. ???? A B 1101000110 Over a network, there are no “underlying data structures”! 29 Monday, November 14, 2011

  30. Message protocol A B 1101000110 A set of rules for encoding and decoding messages. All computers in the system must obey the protocol when sending and receiving messages. Example The first 3 bytes are the sender The next 3 bytes are the recipient After that is the content, which is video, encoded according to... etc. etc. 30 Monday, November 14, 2011

  31. Example: messages on the world wide web 31 Monday, November 14, 2011

  32. Example: messages on the world wide web Protocol name Server Requested page Your IP address en.wikipedia.org GET wiki/UC_Berkeley HTTP 1.1 32 Monday, November 14, 2011

  33. Modularity The components of a system should be black boxes with respect to each other. The black boxes are required to hold up interfaces. Dispatch procedures General Systems Interface = Interface = List of messages that can be List of inputs that can be taken in taken in Responses that should be Outputs that should be given given to each message in response to inputs. 33 Monday, November 14, 2011

  34. Advantages of modularity Easy to understand => Easy to change and expand If something goes wrong, only defective component needs to be replaced Easy to debug • Compare real outputs to the supposed interface • Defective component is the one that doesn’t hold up the interface any longer. 34 Monday, November 14, 2011

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend