lec2-2

Course: CS 707, Fall 2008
School: George Mason
Rating:
 
 
 
 
 

Word Count: 1295

Document Preview

1, Processes Ch. 3 Tanenbaum Distributed Software Systems CS 707 Software Architecture Components/processes process = program in execution Often multi-threaded! How the processes are organized influences the overall application Connections between the components Systems architecture = instance of a software architecture Distributed Software Systems 2 Distributed Software Systems 1 Multi-threading...

Register Now

Unformatted Document Excerpt

Coursehero >> Virginia >> George Mason >> CS 707

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
1, Processes Ch. 3 Tanenbaum Distributed Software Systems CS 707 Software Architecture Components/processes process = program in execution Often multi-threaded! How the processes are organized influences the overall application Connections between the components Systems architecture = instance of a software architecture Distributed Software Systems 2 Distributed Software Systems 1 Multi-threading Implementation/use studied in 571 in the context of operating systems Advantages: Threads typically share the address space thread context switching is inexpensive on a single processor. A multithreaded process can be executed on single processor or on multiprocessor transparently. Cooperating threads may be a natural structuring mechanism for some applications. Thread implementations exist that allow only the involved thread to block on a system call. Issues in Client-Server Application Design Many choices arise in the design and implementation of client/server apps Application layering (two vs. three tier) Whether the client is multi-threaded Whether the server is multi-threaded Disadvantage: Controlling use of shared data left entirely to the programmer This intellectual activity is studied in CS 706 Distributed Software Systems 3 Distributed Software Systems 4 1 Application Layering Application Layering (2) The simplest organization is to have only two types of machines: A client machine containing only the programs implementing (part of) the user-interface level A server machine containing the rest, the programs implementing the processing and data level Figure 2-4. The simplified organization of an Internet search engine into three different layers. Distributed Software Systems 5 Distributed Software Systems 6 Application Layering (3) Application Layering (4) Figure 2-5. Alternative client-server organizations (a) (e). thin client Distributed Software Systems 7 Figure 2-6. An example of a server acting as client. Distributed Software Systems 8 2 Issues in Client design Goal: Provide the means for users to interact with remove servers Multithreading hide communication latency allow multiple simultaneous connections Client-Side Software for Distribution Transparency Must know or find out the location of the server known endpoint (port) vs. a lookup mechanism Blocking (synchronous) request or non-blocking (asynchronous) Replication transparency Distributed Software Systems 9 Figure 3-10. Transparent replication of a server using a client-side solution. Distributed Software Systems 10 Issues in Server Design Providing endpoint information Known endpoint Daemon listening at endpoint superserver that spawns threads Connection-oriented or connection-less servers TCP or UDP? Concurrent or iterative servers: handle multiple requests concurrently or one after the other? Stateful or stateless servers Distributed Software Systems 11 Figure 3-11. (a) Client-to-server binding using a daemon. Distributed Software Systems 12 3 Issues in Server Design Providing endpoint information Known endpoint Daemon listening at endpoint superserver that spawns threads Connection-oriented or connection-less servers TCP or UDP? Figure 3-11. (b) Client-to-server binding using a superserver. Distributed Software Systems 13 Concurrent or iterative servers: handle multiple requests concurrently or one after the other? Stateful or stateless servers Distributed Software Systems 14 Connection-oriented servers Protocol used determines level of reliability Overhead of setup and tear down of connections TCP provides reliable-data delivery verifies that data arrives at other end, retransmits segments that dont checks that data is not corrupted along the way makes sure data arrives in order eliminates duplicate packets provides flow control to make sure sender does not send data faster than receiver can consume it informs both client and server if underlying network becomes inoperable Distributed Software Systems 15 Connection-less servers UDP unreliable best effort delivery UDP relies on application to take whatever actions are necessary for reliability UDP used if application protocol designed to handle reliability and delivery errors in an application-specific manner, e.g. audio and video on the internet overhead of TCP connections too much for application multicast Distributed Software Systems 16 4 Issues in Server Design Providing endpoint information Known endpoint Daemon listening at endpoint superserver that spawns threads Stateful vs Stateless servers State Information that server maintains about the status of ongoing interactions with clients Stateful servers client state information maintained can help server in performing request faster state information needs to be preserved across (or reconstructed after) crashes Connection-oriented connection-less or servers TCP or UDP? Stateless servers information on clients not maintained and can change state without having to inform clients quicker and more reliable recovery after crashes smaller memory requirements Application protocol should have idempotent operations (operations that can be repeated multiple times without harm) Distributed Software Systems 18 Concurrent or iterative servers: handle multiple requests concurrently or one after the other? Stateful or stateless servers Distributed Software Systems 17 Issues in Server Design Providing endpoint information Known endpoint Daemon listening at endpoint superserver that spawns threads Concurrency in servers Concurrency needed if multiple clients and service is expensive Operating system support Multiple processes Threads Asynchronous I/O, e.g. using select() system call Connection-oriented or connection-less servers TCP or UDP? Concurrent or iterative servers: handle multiple requests concurrently or one after the other? Stateful or stateless servers Distributed Software Systems 19 Distributed Software Systems 20 5 Multithreaded Servers (2) Figure 3-4. Three ways to construct a server. Multithreaded Servers (1) Figure 3-3. A multithreaded server organized in a dispatcher/worker model. Distributed Software Systems 22 Distributed Software Systems 21 Server Clusters Server Clusters (2) Figure 3-12. The general organization of a three-tiered server cluster. Each tier may use specialized machines configured for the particular task. Distributed Software Systems 23 Figure 3-13. The principle of TCP handoff. Distributed Software Systems 24 6 Distributed Servers Code Migration Process migration an entire process is moved from one machine to another Code migration move part of the processing Can be done client to server or server to client Figure 3-14. Route optimization in a distributed server. Distributed Software Systems 25 Distributed Software Systems 26 Motivation for Code Migration Load Sharing in Distributed Systems Long-running processes can be migrated to idle processors Migrating Code Client-server systems Code for data entry shipped to client system If large quantities of data need to be processed, it is better to ship the data processing component to the client Dynamically configurable client software More flexibility, Easier maintenance and upgrades of client software Enterprise and Desktop Grids, e.g. SETI@home Computationally-intensive tasks shipped to idle PCs around the network Figure 3-17. The principle of dynamically configuring a client to communicate to a server. The client first fetches the necessary software, and then invokes the server (performance, flexibility). 27 Distributed Software Systems 28 Distributed Software Systems 7 Models for Code Migration A running process consists of Code segment Resource segment (references to...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

George Mason - CS - 571
Java Thread ProgrammingThreads are built in to Java and work the same way on all platforms. Underlying implementation can vary from one platform to the next but you don't need to worry about it.GMU CS 571 - Java Thread Programming - Brian Zim
George Mason - CS - 640
Interprocedural Analysis & OptimizationCS640 Lecture 12RoadmapA compiler need to perform all kinds of analysis before code transformation Controlflow analysisBasic blocks, loops, CFG (one for each procedure) Data flow analysisLocal
George Mason - CS - 707
Local Objects vs. Distributed ObjectsLocal objects are those whose methods can only be invoked by a local process, a process that runs on the same computer on which the object exists. A distributed object is one whose methods can be invoked by a rem
George Mason - CS - 707
TonightSeveral common communication mechanisms RPC RMI Sockets Next week: HTTP, CommunicationTanenbaum Ch. 4 Distributed Software Systems CS 707Middleware ProtocolsRemote Procedure Call (RPC)Figure 4-3. An adapted reference model for ne
George Mason - CS - 707
Traditional Web-Based Systems - 1Chapter 12 Distributed Web-Based SystemsFigure 12-1. The overall organization of a traditional Web site.Traditional Web-Based Systems - 2Terminology URI Uniform Resource Identifier (URL, URN) Web client (bro
George Mason - CS - 640
CS 640 HW #2 Fall 2008 Due Oct 6 at classtime1. Dataflow analysis can be used to propagate constants in a CFG. Give a dataflow algorithm for this be sure to provide details regarding the transfer functions (and how they are computed). Show how your
George Mason - CS - 640
Static Single AssignmentCS 640 Lecture 5VN Example ReviewOriginal Code ax+y bx+y a 17 cx+y With VNs a3 x1 + y2 b3 x1 + y2 a4 174 c3 x1 + y2 Rewritten a03 x01 + y02 b03 a03 a14 174 c03 a03Give each value a unique name No value is
George Mason - CS - 540
Lecture 7: Type Systems and Symbol TablesCS 540 George Mason UniversityStatic AnalysisCompilers examine code to find semantic problems. Easy: undeclared variables, tag matching Difficult: preventing execution errors Part I: Type checking Par
George Mason - CS - 540
Lecture 3: ParsingCS 540 George Mason UniversityStatic Analysis - ParsingSource languageScanner (lexical analysis)tokensParser (syntax analysis)Syntatic structureSyntatic/semantic structureSemantic Analysis (IC generator)Code Genera
George Mason - CS - 540
Lecture 5: LR ParsingCS 540 George Mason UniversityStatic Analysis - ParsingSource languageScanner (lexical analysis)tokensParser (syntax analysis)Syntatic structureSyntatic/semantic structureSemantic Analysis (IC generator)Code Gen
George Mason - CS - 540
Lecture 6: YACC and Syntax Directed TranslationCS 540 George Mason UniversityPart 1: Introduction to YACCYACC Yet Another Compiler CompilerLex spec flex lex.yy.c compiler YACC spec bison y.tab.c a.outC/C+ toolsCS 540 Spring 2009 GMU 3YACC
George Mason - CS - 540
Lecture 2: Lexical AnalysisCS 540 George Mason UniversityLexical Analysis - ScanningSource language Scanner (lexical analysis) tokens Parser (syntax analysis) Semantic Analysis (IC generator) Code GeneratorCode Optimizer Tokens described form
George Mason - CS - 540
Lecture 8: Intermediate CodeCS 540 Spring 2009Compiler ArchitectureSource languageScanner (lexical analysis)tokensParser (syntax analysis)Syntactic structureIntermediate CodeSemantic Analysis (IC generator)Code GeneratorTarget lan
George Mason - CS - 540
Lecture 4: LL ParsingCS 540 George Mason UniversityParsingSource languageScanner (lexical analysis)tokensParser (syntax analysis)Syntatic structureSyntatic/semantic structureSemantic Analysis (IC generator)Code GeneratorTarget lan
George Mason - CS - 540
CS 540 Spring 2009The Course covers: Lexical Analysis Syntax Analysis Semantic Analysis Runtime environments Code Generation Code OptimizationCS 540 Spring 2009 GMU 2Pre-requisite courses Strong programming background in C, C+ or Java CS
George Mason - CS - 540
Code GenerationCS 540 George Mason UniversityCompiler ArchitectureIntermediate Language Source language Intermediate LanguageScanner (lexical analysis)tokensParser (syntax analysis)Syntactic structureSemantic Analysis (IC generator)Co
George Mason - CS - 540
Lecture 9: Runtime EnvironmentsCS 540 George Mason UniversityRun-Time EnvironmentsStatic vs. Runtime Mapping a HL language to low-level machine environment implies generating code for allocating, maintaining and de-allocating data objects to supp
George Mason - CS - 540
ParserVal classpublic class ParserVal { public int ival; public double dval; public String sval; public Object obj; public ParserVal(int val) { ival=val; } public ParserVal(double val) { dval=val; } public ParserVal(String val) { sval=val; } public
George Mason - CS - 583
1Recurrence RelationsDr. Pearl Wang Department of Computer Sciencec 2008 P.Y. WangG EORGE M ASON U NIVERSITY2What is a Recurrence Relation? A function that is dened in terms of itself is a recurrence relation. Recurrence relations must
George Mason - CS - 583
1Linear Time SortingP.Y. Wang Department of Computer Science 4A5 George Mason University Fairfax VA 22030-4444 U.S.A.c 2008 P.Y. WangG EORGE M ASON U NIVERSITY2Lower Bound on Comparison Based Sorting All the sorting algorithms we have ex
George Mason - CS - 583
1Dynamic ProgrammingP.Y. Wang Department of Computer Science 4A5 George Mason University Fairfax VA 22030-4444 U.S.A.c 2008 P.Y. WangG EORGE M ASON U NIVERSITY2What is Dynamic Programming? Some problems can be solved using divide-and-con
George Mason - CS - 635
George Mason - CS - 635
MPI Parallel Programming1MPI Parallel Programming Part IP.Y. Wang Department of Computer Science 4A5 George Mason University Fairfax VA 22030-4444 U.S.A.c 2004 P.Y. WangG EORGE M ASON U NIVERSITYMPI Parallel Programming2ReferencesThe
George Mason - CS - 635
Intro - 21Processor Organization and Data RoutingArchitectural alternatives for communications subsystemsHigh bandwidth bussimplest (n < 50 today)Multistage networks Static Networks Interconnection NetworksCrossbar networkmost complex (n
George Mason - CS - 635
Matrix Algorithms1Some Parallel Matrix AlgorithmsP.Y. Wang Department of Computer Science 4A5 George Mason University Fairfax VA 22030-4444 U.S.A.c 2004 P.Y. WangG EORGE M ASON U NIVERSITYMatrix Algorithms2Outline Data Partitioning M
George Mason - CS - 635
Data Parallel Programming and the M AS PAR1Data Parallel Programming and the M AS PARP.Y. Wang Department of Computer Science 4A5 George Mason University Fairfax VA 22030-4444 U.S.A.c 2004 P.Y. WangG EORGE M ASON U NIVERSITYData Parallel
George Mason - CS - 583
CS 583 Data Structures and Algorithm Analysis Practice Homework 31] The following problems in the textbook may be useful exercises for studying binary search trees and red-black trees: 1. Page 260, # 12.2-4 2. Page 264, # 12.3-3, 3. Page 276, all e
George Mason - CS - 635
Parallel Sorting1Parallel SortingP.Y. Wang Department of Computer Science 4A5 George Mason University Fairfax VA 22030-4444 U.S.A.c 2004 P.Y. WangG EORGE M ASON U NIVERSITYParallel Sorting2Outline Important Issues (Serial and Paralle
George Mason - CS - 635
Control Parallel Programming1MIMD/Control-Parallel Programming IssuesP.Y. Wang Department of Computer Science 4A5 George Mason University Fairfax VA 22030-4444 U.S.A.c 2004 P.Y. WangG EORGE M ASON U NIVERSITYControl Parallel Programming
George Mason - CS - 367
CS 367Bits and BytesTopics Why bits? Representing information as bits Binary/Hexadecimal Byte representations numbers characters and strings InstructionsBit-level manipulations Boolean algebra Expressing in CCS 367 F07Why Dont Com
George Mason - CS - 699
Peer-to-Peer Information RetrievalPeer-to-Peer Information Retrieval Using Self-Organizing Semantic Overlay NetworksDistributed Hash Table (DHT)CAN, Chord, Pastry, Tapestry, etc. Scalable, fault tolerant, self-organizing Only support exact key mat
George Mason - CS - 699
The Entropia Machine for Desktop GridsBrad Calder, Andrew Chien, Ju Wang, Don Yang Oct 28,2004 Presented by: Dongyu LiuGrid Introduction Grid computing, which is defined ascoordinated resource sharing and problem solving in large, multi-institut
George Mason - CS - 699
Distributed Hash Tables (DHTs) Tapestry & PastryCS 699/IT 818 Sanjeev Setia1AcknowledgementsSome of the followings slides are borrowed or adapted from talks by Robert Morris (MIT) and Ben Zhao (UC, Santa Barbara)21DHTs Distributed Hash
George Mason - CS - 699
Acknowledgements Peer to Peer File Storage SystemsCS 699Some of the followings slides are borrowed from a talk by Robert Morris (MIT)12P2P File Systems File Sharing is one of the most popular P2PTarget Usesnode node Internet node node nod
George Mason - CS - 699
SplitStream: High-Bandwidth Multicast in Cooperative Environments Muhammad Abdulla10/14/20041OutlineBasic ConceptsMulticasting The SplitStream approachStructured Overlay NetworkPastry ScribeSplitStream Design Experimental Results10/14/2
George Mason - CS - 699
Acknowledgements GIA: Making Gnutella-like P2P Systems ScalableYatin Chawathe, Sylvia Ratnasamy, Lee Breslau, Scott Shenker, and Nick Lanham SIGCOMM 2003Most of the followings slides are borrowed from the talk by Yatin Chawathe (Intel)12The P
George Mason - CS - 699
Publius A Robust, Tamper Evident, Censorship Resistant WWW Based Publishing SystemBy Lorrie Cranor Avi Rubin Marc Waldman AT&T Labs New York UniversityProc. 9th USENIX Security Symposium, 2000 Presented by Anyi Liu Dec. 2, 2004AcknowledgmentsSo
George Mason - CS - 699
Incentives for P2P SystemsDaniel Garrison CS 699 George Mason University November 4, 2004Incentives for P2P SystemsIncentives Build Robustness in BitTorrentBram CohenWorkshop on Economics of Peer-to-Peer Systems, 2003Incentives-Compatible Pee
George Mason - CS - 699
Scribe: A large-scale and decentralized application-level multicast infrastructurePaper by: Miguel Castro, Peter Druschel, Anne-Marie Kermarrec, Antony Rowstron, IEEE JSAC,2002. Presented by: Sankardas RoyAcknowledgement : Wang Ting and Wei Ran, u
George Mason - CS - 699
The Impact of DHT Routing Geometry on Resilience and ProximityPresented by Noorullah MoghulKrishna Gummadi, Ramakrishna Gummadi, Sylvia Ratnasamy, Steve Gribble, Scott Shenker, Ion StoicaAcknowledgementThe slides were borrowed from Krishna Gumm
George Mason - CS - 707
Replication and Consistency in distributed systems (contd)Distributed Software SystemsA basic architectural model for the management of replicated dataRequests and replies C Clients C FE Front ends FE RM RMService RM Replica managers1System
George Mason - CS - 700
Computing Confidence Intervals for Sample DataTopics Use of Statistics Sources of errors Accuracy, precision, resolution A mathematical model of errors Confidence intervals For means For variances For proportions How many measurements are
George Mason - CS - 700
ANOVA- Analyisis of VarianceCS 7001Comparing alternatives Comparing two alternativesuse confidence intervals Comparing more than two alternatives ANOVA Analysis of Variance21Comparing More Than Two Alternatives Nave approach Comp
George Mason - CS - 700
Hypothesis TestingCS 7001Hypothesis Testing! Purpose: make inferences about a populationparameter by analyzing differences between observed sample statistics and the results one expects to obtain if some underlying assumption is true.! Null
George Mason - CS - 475
GEORGE MASON UNIVERSITY Computer Science Department CS 475 Concurrent and Distributed Software Systems Spring 2003 Assignment 2 Multithreaded Programming DUE DATE March 10Process Synchronization The goal of this exercise to give you some experien
George Mason - CS - 475
Peer to Peer ComputingComputer Networking: A Top Down Approach Featuring the Internet, 2nd edition.Jim Kurose, Keith Ross Addison-Wesley, July 2002.These slides are based on the slides made available by the authors of1Peer-peer computing and
George Mason - CS - 475
Introduction to Web Services Concurrent & Distributed Software Systems1Motivation Todays Web Designed for human-application interactions Browser front-endDoes not support application-application interaction on the web Web services Enable
George Mason - CS - 475
GEORGE MASON UNIVERSITY Computer Science Department Concurrent & Distributed Software Systems - CS 475 Spring 2003 Assignment 3 Network Programming using Sockets DUE DATE April 7Write a HTTP 1.0 client and server The client and server must interac
George Mason - CS - 475
Concurrent ProgrammingProf. Sanjeev Setia Concurrent & Distributed Software Systems CS 475CS 475 - Spring 20031Hardware ArchitecturesUniprocessors Shared-memory multiprocessors Distributed-memory multicomputers Distributed systemsCS 475 -
George Mason - CS - 475
RPC & RMIConcurrent & Distributed SoftwareRMI1Motivationr Sockets API send & recv calls I/O r Remote Procedure Calls (RPC) m Goal: to provide a procedural interface for distributed (i.e., remote) services m To make distributed nature of ser
George Mason - CS - 475
Concurrent & Distributed Software SystemsCS 475 Spring 2003 Prof. Sanjeev SetiaAbout this ClassDistributed systems are ubiquitous Focus: designing and writing moderatesized concurrent & distributed applications Prerequisites:CS 471 (Operating Sy
George Mason - CS - 475
RMI: Design & ImplementationConcurrent & Distributed SoftwareRMI1Middleware layersApplications, services RMI and RPC request-reply protocol marshalling and external data representation UDP and TCP Middleware layersRMI21Design Issues f
George Mason - CS - 475
Client-Server ApplicationsProf. Sanjeev Setia Distributed Software Systems CS 707Distributed Software Systems1Client Server SystemsDistributed Software Systems21Client/Server ApplicationDistributed Software Systems3Overviewz Co
George Mason - CS - 475
Creating and using threadspthread_t thread; int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start)(void *),void *arg); pthread_t pthread_self(void); int pthread_exit(void *value_ptr); int pthread_detach(pthread_t thread);
George Mason - CS - 475
TCP, UDP revisitedConcurrent & Distributed Software SystemsNetwork Programming with socketsz Need to understand how TCP and UDP work in order to design good application-level protocolsycritical for designing protocols that will be scalablexHT
George Mason - CS - 475
GEORGE MASON UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE CS 475 Concurrent & Distributed Software Systems Spring 2003 Assignment 1: DUE Feb 10Experiment 1. Thread and Process Creation Study the programs thr_create.c and fork.c. Compile and execute t
George Mason - CS - 475
Applications and application-layer protocolsApplication: communicating, distributed processes m running in network hosts in user space m exchange messages to implement app m e.g., email, file transfer, the Web Application-layer protocols m one piece
George Mason - CS - 475
GEORGE MASON UNIVERSITY Computer Science Department Concurrent & Distributed Software Systems Spring 2003 Assignment 4 A Calendar Tool for Work Groups DEMO DATE: May 5 1 IntroductionThe goal of this assignment is to introduce you to the use of CORBA
George Mason - CS - 475
Networks: OverviewNetwork typesRange LAN 1-2 kms WAN worldwide MAN 2-50 kms Wireless LAN 0.15-1.5 km Wireless WAN worldwide Internet worldwideBandwidth (Mbps) Latency (ms) 10-1000 0.010-600 1-150 2-11 0.010-2 0.010-2 1-10 100-500 10 5-20 100-50
George Mason - CS - 475
Improving Web PerformanceComputer Networking: A Top Down Approach Featuring the Internet, 2nd edition.Jim Kurose, Keith Ross Addison-Wesley, July 2002.These slides are based on the slides made available by the authors of1Improving Web Perfor
George Mason - CS - 475
BackgroundConcurrent access to shared data may result in data inconsistency. Maintaining data consistency requires mechanisms to ensure the orderly execution of cooperating processes. Bounded Buffer problem (also called producer consumer problem)1