Sistemas Distribuídos Sincronização de Processos Alex Borges Vieira Objetivos • Apresentar ao aluno os principais conceitos de sistemas distribuídos e suas aplicações. • Discutir problemas e técnicas relacionados à implementação de sistemas distribuídos. • Capacitar o aluno a implementar sistemas distribuídos simples utilizando arquitetura cliente servidor e P2P. • Apresentar aos alunos tendências e desafios na área de sistemas distribuídos. AVALIAÇÃO DE APRENDIZAGEM - CRONOGRAMA Avaliação Data Valor Tipo de Conteúdo Programático Avaliaçã o TVC1 TVC2 TVC3 09/05 04/07 11/07 100 100 100 Prova Prova Trabalho em grupo Unidades de 1 a 5 Unidades de 6 a 10 Trabalho de caractere multidisciplinar envolvendo todas as unidades da disciplina (1 a 12). Cálculo da Nota Média: (4 * Primeira Nota + 4 * Segunda Nota + 2 * Terceira Nota)/10. Aprovado se média maior/igual a 60. Observações a) PROVAS INDIVIDUAIS E SEM CONSULTA b) Grupos compostos por 3 a 4 pessoas. Cronograma para o Mês 1 Apresentação da disciplina -objetivos e critérios de aprovação Introdução aos Sistemas Distribuídos -definição, Metas e Tipos 14/03/11 2 16/03/11 3 Arquiteturas de Sistemas Distribuídos (Estilos Arquitetônicos, Arquiteturas de Sistemas, Arquiteturas versus Middleware, Autogerenciamento) 21/03/11 4 Processos em Sistemas Distribuídos (Threads, Virtualização, Clientes) 23/03/11 5 28/03/11 Processos em Sistemas Distribuídos (Servidores, Migração de Código) BIBLIOGRAFIA Bibliografia Básica COULOURIS, G.; DOLLIMORE, J.; KINDBERG, T. Distributed systems concepts and design. Third Edition, Addison-Wesley, 2001. LYNCH, N. A. Distributed algorithms. Morgan Kauffmann, 1996. Bibliografia Complementar CHOW, R.; JOHSON, T. Distributed operating systems & algorithms. AddisonWesley, 1998. GALLI, D. Distributed operating systems. Prentice-Hall. 2000. HENNING, M.; VINOSKI, S. Advanced CORBA Programming with C++. Addison-Wesley, 1998. MULLENDER, S. (ed.). Distributed systems . Addison-Wesley, 1995. TANENBAUM, A.S. Distributed operating systems. Prentice-Hall, 1995. Idioma???? • Inglês! – Livros mais novos – Livros mais baratos – Artigos de verdade Characterization of Distributed Systems From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley 2001 Distributed Systems • WTH is this? Distributed Systems • WTH is this? Networking and Parallel Computing • Computer networking – Hardware that connects computers – Software that sends/receives messages from one computer to another, which might be on different networks (end to end delivery) – Goal is to transmit messages reliably and efficiently • Parallel Computing – Multiple homogeneous processors in “one” computer – Shared or distributed memory – Goal is to execute a program faster by division of labor Distributed Computing • Networked computers that could be far apart – rely on computer networking • Communicate and coordinate by sending messages • Goal is to share (access/provide) distributed resources • Issues: – Concurrent execution of processes – No global clock for coordination – More components, more independent failures Examples of Distributed Systems • Global Internet • Organizational Intranets--behind router/firewall • Mobile Computing -- computers move • Ubiquitous Computing -- computers embedded everywhere • Issues: – discovery of resources in different host environments – dynamic reconfiguration Coulouris, Dollimore and Kindberg Distributed Systems: – limited connectivity A typical portion of the Internet intranet % ISP % % % backbone satellite link desktop computer: server: network link: A typical intranet email server Desktop c om pute rs print and other servers Loc al area network Web s erver email server File server print other s ervers the res t of the Internet router/firewal l Portable and handheld devices in a distributed system Internet Hos t i ntranet WAP gateway Wireless LAN Mobile phone Printer Laptop Camera Hos t s ite Home intranet Web servers and web browsers www.google.com http://www.google.comlsearch?q=kindberg Browsers Web servers www.cdk3.net Internet http://www.cdk3.net/ www.w3c.org File system of www.w3c.org http://www.w3c.org/Protocols/Activity.html Protocols Activity.html Computers in the Internet Date 1979, Dec. 1989, July 1999, July Web servers Computers 188 0 130,000 56,218,000 0 5,560,866 Computers vs. Web servers in the Internet Date Computers Web servers Percentage 1993, July 1995, July 1997, July 1999, July 1,776,000 130 0.008 6,642,000 19,540,000 56,218,000 23,500 1,203,096 6,598,697 0.4 6 12 Computers vs. Web servers in the Internet Date Computers Web servers Percentage 1993, July 1995, July 1997, July 1999, July 1,776,000 130 0.008 6,642,000 19,540,000 56,218,000 23,500 1,203,096 6,598,697 0.4 6 12 What happened with the Internet in 2009? • How many websites were added? • How many emails were sent? • How many Internet users were there? Email • • • • 90 trillion – The number of emails sent on the Internet in 2009. 247 billion – Average number of email messages per day. 1.4 billion – The number of email users worldwide. 100 million – New email users since the year before. • • • • 81% – The percentage of emails that were spam. 92% – Peak spam levels late in the year. 24% – Increase in spam since last year. 200 billion – The number of spam emails per day – assuming 81% are spam Websites • 234 million – The number of websites as of December 2009. • 47 million – Added websites in 2009. Websites • 234 million – The number of websites as of December 2009. • 47 million – Added websites in 2009. Date Computers Web servers Percentage 1993, July 1995, July 1997, July 1999, July 1,776,000 130 0.008 6,642,000 19,540,000 56,218,000 23,500 1,203,096 6,598,697 0.4 6 12 Domain Names • 81.8 million – .COM domain names at the end of 2009. • 12.3 million – .NET domain names at the end of 2009. • 7.8 million – .ORG domain names at the end of 2009. • 76.3 million – The number of country code top-level domains (e.g. .CN, .UK, .DE, etc.). • 187 million – The number of domain names across all toplevel domains (October 2009). • 8% – The increase in domain names since the year before. Internet Users • 1.73 billion – Internet users worldwide (September 2009). – 18% – Increase in Internet users since the previous year. • • • • • • • 738,257,230 418,029,796 252,908,000 179,031,479 67,371,700 57,425,046 20,970,490 Internet users in Asia. Internet users in Europe. Internet users in North America. Internet users in Latin America/Caribbean. Internet users in Africa. Internet users in the Middle East. Internet users in Oceania / Australia. Social Net. • 126 million – The number of blogs on the Internet – as tracked by BlogPulse • • • • 84% – Percent of social network sites with more women than men. 27.3 million – Number of tweets on Twitter per day 57% – Percentage of Twitter’s user base located in the USA 4.25 million – People following @aplusk – Ashton Kutcher, Twitter’s most followed user • 350 million – People on Facebook. • 50% – Percentage of Facebook users that log in every day. • 500,000 – The number of active Facebook applications. Images • 4 billion – Photos hosted by Flickr (October 2009). • 2.5 billion – Photos uploaded each month to Facebook. • 30 billion – At the current rate, the number of photos uploaded to Facebook per year. Videos • • • • 1 billion – videos YouTube serves in one day. 12.2 billion – Videos viewed per month on YouTube in the US 924 million – Videos viewed per month on Hulu in the US 182 – The number of online videos the average Internet user watches in a month (USA). • 82% – Percentage of Internet users that view videos online (USA). • 39.4% – YouTube online video market share (USA). • 81.9% – Percentage of embedded videos on blogs that are YouTube. Malicious... • 148,000 – New zombie computers created per day – used in botnets for sending spam, etc. • 2.6 million – Amount of malicious code threats at the start of 2009 – viruses, trojans, etc. • 921,143 – The number of new malicious code signatures added by Symantec in Q4 2009. Challenges and Issues (1) • Heterogeneity – networks, hardware, os, languages... – middleware—corba – mobile code, virtual machines • Openness – extended and re-implemented in various ways – standard published interfaces – RFC, request for comments • Security – confidentiality – integrity – availability Challenges and Issues (2) • Scalability – effective with significant increase in resources – cost – performance • Failure handling – – – – – detecting masking—hide, less severe (retransmit) tolerating--ignore, timeout recovery--logs, rollback Redundancy • Concurrency Transparencies •Access transparency: enables local and remote resources to be accessed using identical operations. •Location transparency: enables resources to be accessed without knowledge of their location. •Concurrency transparency: enables several processes to operate concurrently using shared resources without interference between them. Transparencies •Replication transparency: enables multiple instances of resources to be used to increase reliability and performance without knowledge of the replicas by users or application programmers. •Failure transparency: enables the concealment of faults, allowing users and application programs to complete their tasks despite the failure of hardware or software components. •Mobility transparency: allows the movement of resources and clients within a system without affecting the operation of users or programs. Transparencies •Performance transparency: allows the system to be reconfigured to improve performance as loads vary. •Scaling transparency: allows the system and applications to expand in scale without change to the system structure or the application algorithms.