Introduction Chapter 1 Introduction 1 Examples of Distributed

Introduction Chapter 1 Introduction 1

Examples of Distributed Systems q DNS q WWW q Cray T 3 E q Condor/RES o Hierarchical distributed database o Origin servers and web caches o Distributed database o 2048 tightly coupled homogeneous processors o Distributed/parallel computing o Loosely coupled heterogeneous workstations o Parallel/distributed computing Chapter 1 Introduction 2

Other Distributed Systems q Email q Electronic banking q Airline reservation system q Peer-to-peer networks q Etc. , etc. Chapter 1 Introduction 3

Computer Revolution q Processing power o 50 years ago, $100 M for 1 instr/sec o Today, $1 K for 107 instructions/sec q Price/perform. improvement of 1012 o If cars had followed same path as computers… o “…a Rolls Royce would now cost 1 dollar and get a billion miles per gallon” o And it would “explode once a year, killing everyone inside” Chapter 1 Introduction 4

Computer Revolution q High speed networks o 30 years ago, networks were unknown o Today, Gigabit networks and the Internet q Before networks, centralized systems q Today, distributed systems o Computers in many locations work as one Chapter 1 Introduction 5

What is a Distributed System? q According to your textbook o “A collection of independent computers that appears to its users as a single coherent system” q Two parts to definition o Hardware machines are autonomous o Software machines appear as one system • Implies that communication hidden from user • Implies that organization hidden from user Chapter 1 Introduction 6

What is a Distributed System? q According to dict. die. net o A collection of (probably heterogeneous) automata whose distribution is transparent to the user so that the system appears as one local machine o This is in contrast to a network, where the user is aware that there are several machines, and their location, storage replication, load balancing and functionality is not transparent q Crucial point is transparency Chapter 1 Introduction 7

How to Implement a Dist. System? q. A distributed system is a collection of independent computers… q …that acts like a single system q How to accomplish this? q Middleware o Make distributed system as transparent as possible Chapter 1 Introduction 8

Role of Middleware Distributed system as middleware q Middleware extends over multiple machines q Chapter 1 Introduction 9

Goals q For a distributed system to be worthwhile authors believe it should o o Easily connect users to resources Hide fact that resources are distributed Be open Be scalable q First 2 of these about transparency q Transparent, open, scalable Chapter 1 Introduction 10

Transparency Description Access Hide different data representations, how resources accessed Location Hide where a resource is located Migration Hide that a resource may move to another location Relocation Hide that a resource may be moved while in use Replication Hide that a resource is replicated Concurrency Hide that a resource may be shared by several users Failure Hide failure and recovery of a resource Persistence Hide whether a (software) resource is in memory or on disk Transparent system “acts” like one computer q Various aspects of transparency listed above q Chapter 1 Introduction 11

Degree of Transparency q Cannot hide physical limitations o Time it takes to send packet q May be a tradeoff between transparency and performance o What to do if Web request times out? o Keeping replicated data current Chapter 1 Introduction 12

Openness q Open == standards-based q Provides o Interoperability o Portability q Ideally, flexible, i. e. , extensible q But many useful systems follow the “American standard” o Do whatever you want Chapter 1 Introduction 13

Scalability q Concept Example Centralized services A single server for all users Centralized data A single on-line telephone book Centralized algorithms Doing routing based on complete information Scalability issues/limitations Chapter 1 Introduction 14

Scalability q Authors believe centralized is bad o Centralized server is source of congestion, single point of failure o Centralized data leads to congestion, lots of traffic o Centralized algorithm must collect all info and process it (e. g. , routing algs) q Google? Napster? Chapter 1 Introduction 15

Scalability q Decentralized algorithms o No machine has complete system state o Decisions based on local info o Failure of one machine does not kill entire algorithm o No assumption of global clock q Examples? Chapter 1 Introduction 16

Geographic Scalability q Big difference between LAN and WAN q LANs have synchronous communication o Client can “block” until server responds q On LAN, global time may be possible (to within a few milliseconds) q WAN unreliable, point-to-point q WAN has different admin domains o A security nightmare Chapter 1 Introduction 17

Scaling Techniques q Scaling problems due to limited capacity of networks and servers q Three possible solutions o Hide latencies do something useful while waiting (asynchronous comm. ) o Distribution DNS, for example o Replication allows for load balancing q Replication Chapter 1 Introduction creates consistency issues 18

Scaling Techniques Server or client check form as it’s filled out? q Having client do more, as in (b), may reduce latency (but may cause security problems) q Chapter 1 Introduction 19

Scaling Techniques DNS name space divided into zones q Goto server in Z 1 to find server Z 2 and so on q Like a binary search for correct server q Chapter 1 Introduction 20

Hardware Issues q For our purposes, 2 kinds of machines q Multiprocessor o Different processors share same memory q Multicomputer o Each processor has it’s own memory q Each of these could use either bus or switched architecture Chapter 1 Introduction 21

Hardware Issues multiprocessor Chapter 1 Introduction multicomputer 22

Multiprocessors A bus-based multiprocessor q Cache coherence is an issue q Chapter 1 Introduction 23

Multiprocessors a) b) A crossbar switch Omega switching network Chapter 1 Introduction 24

Homogeneous Multicomputer Grid Chapter 1 Introduction Hypercube 25

Software Concepts System Description Main Goal DOS Tightly-coupled operating system for multiprocessors and homogeneous multicomputers Hide and manage hardware resources NOS Loosely-coupled operating system for heterogeneous multicomputers (LAN and WAN) Offer local services to remote clients Middleware Additional layer atop of NOS implementing general-purpose services Provide distribution transparency q q q DOS Distributed Operating Systems NOS Network Operating Systems Middleware self-explanatory Chapter 1 Introduction 26

Uniprocessor OSs q Separate apps from OS code via microkernel Chapter 1 Introduction 27

Multiprocessor OSs monitor Counter { private: int count = 0; public: int value() { return count; } void incr () { count = count + 1; } void decr() { count = count – 1; } } q Hoe to protect count from concurrent access? Chapter 1 Introduction 28

Multiprocessor OSs monitor Counter { void decr() { private: if (count ==0) { int count = 0; blocked_procs = blocked_procs + 1; int blocked_procs = 0; wait (unblocked); condition unblocked; blocked_procs = blocked_procs – 1; } public: else int value () { return count; } count = count – 1; void incr () { } if (blocked_procs == 0) } count = count + 1; else signal (unblocked); } q Protect count from concurrent access o Using blocking Chapter 1 Introduction 29

Multicomputer OSs q Multicomputer OS Chapter 1 Introduction 30

Multicomputer OSs q ? ? ? Chapter 1 Introduction 31

Multicomputer OSs Synchronization point Send buffer Reliable comm. guaranteed? Block sender until buffer not full Yes Not necessary Block sender until message sent No Not necessary Block sender until message received No Necessary Block sender until message delivered No Necessary q Huh? Chapter 1 Introduction 32

Programming Issues q Programming multicomputers much harder than multiprocessors q Why? o Message passing o Buffering, blocking, reliable comm. , etc. q One option is to emulate shared memory on multicomputer o Large “virtual” address space Chapter 1 Introduction 33

Distributed Shared Memory a) b) c) Pages of address space distributed among 4 machines After CPU 1 references pg 10 If page 10 read only and replication used Chapter 1 Introduction 34

Distributed Shared Memory q False sharing of page between two processes o Two independent processors share same page Chapter 1 Introduction 35

Network OS q Network OS o Each processor has its own OS Chapter 1 Introduction 36

Network OS Clients and server in a network OS q Global shared file system q Chapter 1 Introduction 37

Distributed System q Distributed OS not a distributed system by our definition q Network OS not a distributed system by our definition q What we need is middleware… Chapter 1 Introduction 38

Positioning Middleware q A distributed system as middleware o Individual node managed by local OS o Middleware hides heterogeneity of underlying systems Chapter 1 Introduction 39

Middleware and Openness q q Open middleware-based system Middleware layer should o Use the same protocols o Provide same interfaces to apps Chapter 1 Introduction 40

Comparison of Systems Item Distributed OS Network OS Middlewarebased OS Multiproc. Multicomp. Degree of transparency Very High Low High Same OS on all nodes Yes No No Number of copies of OS 1 N N N Basis for communication Shared memory Messages Files Model specific Resource management Global, central Global, distributed Per node Scalability No Moderately Yes Varies Openness Closed Open q Middleware rocks! Chapter 1 Introduction 41

Middleware Services q Main goal is access transparency o Hides low level message passing q Naming o Like yellow pages or URL q Persistence o For example, a distributed file system q Distributed transactions o Read and writes are atomic q Security Chapter 1 Introduction 42

Client Server Model q Read this section Chapter 1 Introduction 43

Clients and Servers q Interaction Chapter 1 Introduction between client and server 44

Example Client and Server q header. h o Used by client o And by server Chapter 1 Introduction 45

Example Client and Server q A sample server Chapter 1 Introduction 46

Example Client and Server q Client using server to copy a file Chapter 1 Introduction 47

Processing Level q Internet search engine as 3 layers Chapter 1 Introduction 48

Multitiered Architectures q Alternative Chapter 1 Introduction client-server organizations 49

Multitiered Architectures q. A server acting as client Chapter 1 Introduction 50

Modern Architectures q Horizontal distribution of Web service Chapter 1 Introduction 51

Summary q Distributed system o Autonomous computers that operate together as a single coherent system q Potential advantages o Can integrate homogeneous systems o Scales well, if properly designed q Potential disadvantages o Complexity o Degraded performance o Poorer security Chapter 1 Introduction 52

Summary q Different types of dist systems q Distributed OS o For tightly coupled system o Can’t integrate different systems q Network OS o For heterogeneous system o No single system view Chapter 1 Introduction 53

Summary q Middleware o o systems based on Remote procedure calls Distributed objects, files, documents Vertical organization Horizontal organization Chapter 1 Introduction 54
- Slides: 54