Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Operating Systems CSE 410, Spring 2004 Distributed Operating Systems Stephen Wagner Michigan State University Distributed Systems • Operating Systems were designed with a single computer in mind – Purpose of operating system was to make efficient use of processor – Provide users with access to shared I/O devices • Increasingly I/O devices are shared among many machines • Trend has been to distribute the OS across many machines • Definition of distributed OS is fuzzy Evolution of Distributed Systems • Stand-alone machine • Networked machines and FTP • Remote Procedure Call (RPC) • Distributed File Systems • Process Migration Client/Server • Basic model for modern distributed systems • Server: – Controls a set of I/O devices or some data source • Client: – Sends requests to the server for information • Network is a critical component Client/Server LAN or WAN or Internet server workstation (client) Figure 13.1 Generic Client/Server Environment Client/Server Client Workstation Presentation services Application logic (client portion) Server request Application logic (server portion) response Communications software protocol interaction Communications software Client operating system Server operating system Hardware platform Hardware platform Figure 13.2 Generic Client/Server Architecture Classes of Client/Server Applications • Host based processing – client is essentially a dumb terminal – all work is done on the server, including presentation • Server-based processing – client is only responsible for presentation – all real work is done on server – most common model Classes of Client/Server Applications Client Server Presentation logic Application logic Database logic DBMS (a) Host-based processing Presentation logic Application logic Database logic DBMS (b) Server-based processing Presentation logic Application logic Application logic Database logic Classes of Client/Server Applications • Cooperative processing – client and server share the work • Client-based processing – client does most of the work – server is just a passive data source Database logic DBMS (b) Server-based processing Classes of Client/Server Applications Presentation logic Application logic Application logic Database logic DBMS (c) Cooperative processing Presentation logic Application logic Database logic Database logic DBMS (d) Client-based processing Figure 13.5 Classes of Client/Server Applications Client/Server: Three Tier Architecture • Traditional Client/Server involves two tiers • Three Tier systems include a middle tier between clients and servers • The middle tier provides a common gateway between clients and a number of servers – support old servers – provide security Client/Server: Three Tier Architecture Client Middle-tier server (application server} Back-end servers (data servers) Figure 13.6 Three-tier Client/Server Architecture Client/Server and Caches • Caches are used to improve performance – used at all levels • Recently used items will be stored in the caches • Both the clients and servers will have caches • Reduces network traffic Client/Server and Caches Network File Traffic Client Cache Server Traffic Server Cache Disk Traffic Server Disk Server Traffic Client Cache Disk Traffic Client Disk Figure 13.7 Distributed File Cacheing in Sprite File Traffic Cache Consistency • If data is only being read, there is no problem • If data is updated, different caches may have conflicting data • Challenging problem – limiting concurrent access solves the problem, but limits performance Middleware • There is a lot of diversity in the client/server model • Standardized protocols are known as middleware – exist “between” client and server – simplify the development of client/server applications – many middleware packages with a wide range of complexity Middleware • Three Common Middleware Packages – Message Passing – Remote Procedure Calls – Object request broker Distributed Message Passing Application Application-specific messages Message-Oriented Middleware (with message queue) Network Transport Server Transport Network Message-Oriented Middleware (with message queue) Application Client (a) Message-Oriented Middleware Client Sending Server process Application-specific procedure invocations and returns Network Transport RPC stub program Application Transport Network Application Receiving process RPC stub program (b) Remote Procedure Calls Server Message-passing Transport Network Remote object requester module Object request broker Application ProcessId Message Transport Object requests and responses Network Object requests and responses Network Transport Client Message-passing module Object Server Figure 13.12 Basic Message-Passing Primitives (c) Object request broker Reliability • Message Reliability – Is message delivery guaranteed? – How reliable is the network? • The simple solution is to require applications to provide reliability – applications send acknowledgment messages • A more sophisticated middle-ware package will provide guaranteed message delivery Blocking vs. Nonblocking • In a blocking system, send and receive block the process that calls them – simplifies application logic – a blocking send does not return until the message has been delivered in a reliable service – limits concurrency • In a nonblocking system, a process does not have to wait for send and receive to complete – more flexible – susceptible to timing errors, making application logic and debugging harder Remote Procedure Calls • A more sophisticated middleware package • Makes client server applications look like a normal procedure call • Client application does not need to actually know if a function is handled by a remote procedure call or not • Usually are synchronous, but can be asynchronous Application Message-Oriented Middleware (with message queue) Network Transport Transport Network Message-Oriented Middleware (with message queue) Application Remote Procedure Calls Application-specific messages (a) Message-Oriented Middleware Client Server Application-specific procedure invocations and returns Network Transport RPC stub program Application Transport Network Application RPC stub program (b) Remote Procedure Calls Client Server Transport Network Remote object requester Network Transport Object request broker Application Transport Object requests and responses Network Object requests and responses Object Server Remote Procedure Calls Client application Local response Remote server application Local response Local procedure calls Local application or operating system Local response Local stub RPC mechanism Local procedure call Local stub Remote procedure call Remote procedure call Figure 13.13 Remote Procedure Call Mechanism RPC mechanism Clusters • In the client/server model applications are not really distributed – Most of the work is typically done on one machine • A workstation cluster is a set of workstations (called nodes) that are all able to work on a problem together • Advantages of clusters – – – – highly scalable incremental scalability (able to add machines easily) high availability cost Clusters • There is a wide range of cluster architectures – The individual work stations can be very independent or closely coupled • Single-system image architecture – Single entry point: user logs onto the cluster, not an individual computer – Single file hierarchy: user sees a single file hierarchy – Single virtual networking: any node can access any other node, independent of how nodes are physically connected – Single process space: a process on any node can create or communicate with any other process on a remote node Beowulf • A cluster technology for PC’s running Linux • Uses mass market commodity components, making it inexpensive • The PC’s are connected by a dedicated, private network • Each node can operate as an autonomous Linux system • Cluster can also have a single-system image Process Migration • In an advanced distributed OS’s, a process should be able to migrate from one process to another – Load balancing – Fairness – Failure management • True process migration is rare