610 likes | 1.23k Views
Distributed Systems CS 654 Lecture 3 September 11 th , 2006 Basic Categories Uniprocessor Operating Systems 1.11 Microkernel design What does a monolithic design look like? What does a SMP OS look like? Multicomputer Operating Systems 1.14 Is the middle layer in kernel mode?
E N D
Distributed Systems CS 654Lecture 3September 11th, 2006
Uniprocessor Operating Systems 1.11 • Microkernel design • What does a monolithic design look like? • What does a SMP OS look like?
Multicomputer Operating Systems 1.14 • Is the middle layer in kernel mode?
Communications • Fundamentally, how is communication done on SMP vs. a cluster (multicomputer)? • From the programming point of view, what are the two fundamental ways to communicate? • Is it possible to communicate using the network within an SMP? • Is it possible to provide a shared memory model on cluster?
DSM • What is virtual memory? • Where are the page frames stored when paged (swapped) out?
Distributed Shared Memory Systems (1) • Pages of address space distributed among four machines • Situation after CPU 1 references page 10 • Situation if page 10 is read only and replication is used • What kinds of bad things can happen? • Using to communicate would be bad.
Distributed Shared Memory Systems (2) 1.18 • False sharing of a page between two independent processes.
Examples of DOS? • DSM can be considered a failure. • MPI is the norm.
Network Operating System (1) • General structure of a network operating system. • Generally, services are not in the kernel. • Services are remote login, file access, etc.
Network Operating System (2) 1-20 • Two clients and a server in a network operating system.
Network Operating System (3) 1.21 • Different clients may mount the servers in different places. • Examples of NOS?
Middleware • What is middleware? • What is its function? • Where is it located? • Why does it exist?
Positioning Middleware • General structure of a distributed system as middleware.
Figure 2.1Software and hardware service layers in distributed systems Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
Middleware and Openness • In an open middleware-based distributed system, the protocols used by each middleware layer should be the same, as well as the interfaces they offer to applications. • Why should they be open? Why should they not be open? 1.23
Typical Middleware Services • Communication • Naming • Persistence • Distributed transactions • Security
Middleware Models • Distributed files • Examples? • Remote procedure call • Examples? • Distributed objects • Examples? • Distributed documents • Examples? • Others? • Message-oriented middleware (MOM) • Service oriented architecture (SOA) • Document-oriented
DOS vs. NOS vs. Middleware Discussion • What is good/bad about DOS? • Transparency • Other issues have reduced success. • Problems are often socio-technological. • What is good/bad about NOS? • Simple. • Decoupled, easy to add/remove. • Lack of transparency. • What is good/bad about middleware? • Easy to make multiplatform. • Easy to start something new. • But this can also be bad.
Example • A user wants to access a file on a cluster. How should we design this? • Issues? • Transparency • Fault tolerance • Possibilities: • SAN • Shared? • GFS • NFS • Middleware? • What should we do differently if it is on a WAN?
Example • A process is started on a cluster via the fork system call. How should we design this? • Issues • Load balancing • Transparency, networking • Possibilities • Do nothing. • User picks machine, uses ssh. • System call. • Disadvantages? • Library function. • Transparency?
Discussion • Have NOS been successful? • Have DOS been successful? Why or why not? • An abstraction that is too leaky? • Has middleware been successful?
“Leaky” Abstractions • What is an abstraction? • What is encapsulation? • How well does this work in practice? • High-level languages • TCP/IP, reliable byte sequence • Packet size? • Ignore packet loss? • Reliability?
intranet % % ISP % % backbone satellite link desktop computer: server: network link: Figure 1.1A typical portion of the Internet Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
Figure 1.2A typical intranet Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
Figure 1.3Portable and handheld devices in a distributed system Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
What are typical latencies and bandwidths? • WAN? • Millisecs • Anywhere from Mbps to Gbps • LAN? • Microsecs • Anywhere from Mbps to Gbps • Mobile? • Microsecs to days • Anywhere from Mbps to Kbps
http://www.google.comlsearch?q=kindberg www.google.com Browsers Web servers Internet www.cdk3.net http://www.cdk3.net/ www.w3c.org http://www.w3c.org/Protocols/Activity.html File system of Protocols www.w3c.org Activity.html Figure 1.4Web servers and web browsers Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
Computers Date Web servers 188 0 1979, Dec. 1989, July 130,000 0 1999, July 56,218,000 5,560,866 2003, Jan. 171,638,297 35,424,956 Figure 1.5Computers in the Internet Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
Figure 1.6Computers vs. Web servers in the Internet Date Computers Web servers Percentage 1,776,000 130 0.008 1993, July 1995, July 6,642,000 23,500 0.4 1997, July 19,540,000 1,203,096 6 1999, July 56,218,000 6,598,697 12 2001, July 125,888,197 31,299,592 25 42,298,371 Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
Why Did the Web Succeed? • Timing • Need a critical mass of • Internet • Users with PCs • Technology • Provided enough functionality, without providing too much • What would have been the wrong design? • How good is HTTP? • Connections are expensive to set-up/tear-down. • No pipelining • No chunking
Client-Server • What is a client? • What is a server? • What would be the alternative? • Can something be both client and server?
Figure 2.2Clients invoke individual servers Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
Clients and Servers • General interaction between a client and a server.
An Example Client and Server (1) • The header.h file used by the client and server.
An Example Client and Server (2) • A sample server.
An Example Client and Server (3) 1-27 b • A client using the server to copy a file.
Layering • Why layer? • Flexible • You can add functionality without changing underlaying layers. • Reuse • Many applications can use Java jars, for example. • Helps you solve the problem. • Too hard to hold everything in your head at once.
Buying an airline ticket • How would you design the system? • A terminal on one end, write a single program on the other end. • A single program at the agent end. All things are broadcast to everyone.
3-Tier Architectures • Interface • (Business) logic • Database
Processing Level • The general organization of an Internet search engine into three different layers 1-28
Multitiered Architectures (2) • An example of a server acting as a client. 1-30
Peer-to-Peer • How does it differ from previous? • Can all apps be done as P2P?
Figure 2.3A distributed application based on peer processes Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 © Pearson Education 2005
Modern Architectures • An example of horizontal distribution of a Web service. 1-31