1 / 163

Distributed Systems: General Services

This chapter provides an introduction to distributed systems and covers various general services such as time services, name services, distributed file systems, and peer-to-peer systems.

helengalvan
Download Presentation

Distributed Systems: General Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Distributed Systems: General Services Distributed systems: general services

  2. Overview of chapters • Introduction • Co-ordination models and languages • General services • Ch 11 Time Services, 11.1-11.3 • Ch 9 Name Services • Ch 8 Distributed File Systems • Ch 10 Peer-to-peer Systems • Distributed algorithms • Shared data Distributed systems: general services

  3. This chapter: overview • Introduction • Time services • Name services • Distributed file systems • Peer-to-peer systems Distributed systems: general services

  4. Introduction • Objectives • Study existing subsystems • Services offered • Architecture • Limitations • Learn about non-functional requirements • Techniques used • Results • Limitations Distributed systems: general services

  5. This chapter: overview • Introduction • Time services • Name services • Distributed file systems • Peer-to-peer systems Distributed systems: general services

  6. Time services: Overview • What & Why • Clock synchronization • Logical clocks (see chapter on algorithms) Distributed systems: general services

  7. Time services • Definition of time • International Atomic Time (TAI)A second is defined as 9.192.631.770 periods of transition between two hyperfine levels of the ground state of Caesium-133 • Astronomical time Based on the rotation of the earth on its axis and its rotation about the sun. But due to the tidal friction the earth’s rotation is getting longer • Co-ordinated Universal Time (UTC)International standard based Atomic time, but a leap second is occasionally inserted or deleted to keep up with Astronomical time Distributed systems: general services

  8. Time services (cont.) • Why is time important? • Accounting (e.g. logins, files,…) • Performance measurement • Resource management • some algorithms depend on it: • Transactions using timestamps • Authentication (e.g. Kerberos) • Example Make Distributed systems: general services

  9. Time services (cont.) • An example: Unix tool “make” • large program: • multiple source files: graphics.c • multiple object files: graphics.o • change of one file  recompilation of all files • use of make to handle changes: • change of graphics.c at 3h45 • make examines creation time of graphics.o • e.g. 3h43: recompiles graphics.c to create an up-to-date graphics.o Distributed systems: general services

  10. Graphics.o created Clock B 3h.. 47 48 49 50 time Clock A 3h.. 41 42 43 44 Graphics.c modified Equal times Time services (cont.) • Make in a distributed environment: • source file on system A • object file on system B Make graphics.o  no effect!! Distributed systems: general services

  11. Time services (cont.) • Hardware clocks • each computer has a physical clock • H(t): value of hardware clock/counter • different clocks  different values • e.g. crystal-based clocks drift due to • different shapes, temperatures, … • Typical drift rates: • 1sec/sec 1 sec in 11.6 days • High precision quartz clocks: 0.1-0.01 sec/sec • Software clocks • C(t) =  H(t) +  • Ex. nanosecs elapsed since reference time Distributed systems: general services

  12. Time services (cont.) • Changing local time • Hardware: influence H(t) • Software: change  and/or  • Forward: • Set clock forward • some clock ticks appear to have been missed • Backward: • Set backward? unacceptable • Let clock run slower for a short period of time Distributed systems: general services

  13. Time services (cont.) • Properties • External synchronization to UTC (S) | S(t) - C(t) | < D • Internal synchronization | Ci(t) – Cj(t)| < D • Correctness Drift rate <  • Monotonicity t’ > t  C(t’) > C(t) Distributed systems: general services

  14. Time services: Overview • What & Why • Synchronising Physical clocks • Synchronising with UTC • Christian’s algorithm • The Berkeley algorithm • Network Time Protocol • Logical clocks (see chapter on algorithms) Distributed systems: general services

  15. Time servicessynchronising with UTC • Broadcast by Radio-stations • WWV (USA) (accuracy 0.1 - 10 msec.) • Broadcast by satellites • Geos (0.1 msec.) • GPS (1 msec) • Receivers to workstations Distributed systems: general services

  16. P Ts Time servicesChristian’s algorithm • assumption: time server process Ts on a computer with UTC receiver • process P: request/reply with time server T-request reply (t) Distributed systems: general services

  17. Time servicesChristian’s algorithm • how to set clock at P? • time t inserted in Ts • time for P: t + Ttrans • Ttrans = min + x • min = minimum transmission time • x? depends on • network delay • process scheduling Distributed systems: general services

  18. Time servicesChristian’s algorithm • In a synchronous system • Upper bound on delay: max • P sets time to t + (max – min) / 2 • Accuracy: (max – min) / 2 • In an asynchronous system? Distributed systems: general services

  19. Time servicesChristian’s algorithm • practical approach • P measures round-trip time: Tround • P sets time to t + Tround/2 • accuracy? • time at Ts when message arrives at P is in range: [t + min, t + Tround - min] • accuracy = ((Tround/2) - min) • problems: • single point of failure • impostor time server Distributed systems: general services

  20. Time servicesThe Berkeley algorithm • Used on computers running Berkeley Unix • active master elected among computers whose clocks have to be synchronised • no central time server • upon failure of master: re-election Distributed systems: general services

  21. Time servicesThe Berkeley algorithm • algorithm of master: • periodically polls the clock value of other computers • estimates its local clock time (based on round-trip delays) • averages the obtained values • returns the amount by which each individual’s slave clock needs adjustment • fault-tolerant average (strange values excluded) may be used Distributed systems: general services

  22. Time services Network Time Protocol • Standard for the Internet • Design aims and features: • Accurate synchronization despite variable message delays • Statistical techniques to filter timing data from different servers • Reliable service that can survive losses of connectivity • Redundant servers • hierarchy of servers in synchronised subnets Distributed systems: general services

  23. Time servicesNetwork Time Protocol Stratum1 have UTC receiver 1 Level = stratum 2 2 3 3 3 synchronisation Distributed systems: general services

  24. Time servicesNetwork Time Protocol • Three working modes for NTP servers • Multicast mode • used on high speed LAN • slave sets clock assuming small delay • Procedure-call mode • similar to Christian’s algorithm • Symmetric Mode • used by master servers and higher levels • association between servers Distributed systems: general services

  25. T i-2 T i-1 Server B m m’ time Server A T i-3 T i Time servicesNetwork Time Protocol • Procedure-call and Symmetric mode • each message bears timestamps of recent message events Distributed systems: general services

  26. d i = a - b o i = (a + b) / 2 o i - d i / 2  o  o i + d i / 2 estimates Time servicesNetwork Time Protocol • Compute approximations of offset and delay T i-2 T i-1 Server B m m’ o true offset Transmission times t t’ Server A T i-3 T i d delay total transmission time T i-2 = T i-3 + t + o T i = T i-1 + t’ - o a = T i-2 - T i-3= t + o b = T i-1 - T i= o – t’ Distributed systems: general services

  27. Time servicesNetwork Time Protocol • Procedure-call and Symmetric mode • data filtering applied to successive pairs • NTP has complex peer-selection algorithm; favoured are peers with : • a lower stratum number • a lower synchronisation dispersion • Accuracy: • 10 msec on Internet • 1 msec on LAN Distributed systems: general services

  28. This chapter: overview • Introduction • Time services • Name services • Distributed file systems • Peer-to-peer systems Distributed systems: general services

  29. Name services • Overview • Introduction • Basic service • Case study: Domain name system • Directory services Distributed systems: general services

  30. Name servicesIntroduction • Types of name: • users • files, devices • service names (e.g. RPC) • port, process, group identifiers • Attributes associated with names • Email address, login name, password • disk, block number • network address of server • ... Distributed systems: general services

  31. Name servicesIntroduction • Goal: • binding between name and attributes • History • originally: • quite simple problem • scope: a single LAN • naïve solution: all names + attributes in a single file • now: • interconnected networks • different administrative domains in a single name space Distributed systems: general services

  32. Name servicesIntroduction • naming service separate from other services: • unification • general naming scheme for different objects • e.g. local + remote files in same scheme • e.g. files + devices+ pipes in same scheme • e.g. URL • integration • scope of sharing difficult to predict • merge different administrative domains • requires extensible name space Distributed systems: general services

  33. Name servicesIntroduction • General requirements: • scalable • long lifetime • high availability • fault isolation • tolerance of mistrust Distributed systems: general services

  34. Name services • Overview • Introduction • Basic service • Domain name system • Directory services Distributed systems: general services

  35. Name servicesBasic service • Operations: identifier lookup (name, context) register (name, context, identifier) delete (name, context) • From a single server to multiple servers: • hierarchical names • efficiency • availability Distributed systems: general services

  36. Name servicesBasic service • Hierarchical name space • introduction of directories or subdomains • /users/pv/edu/distri/services.ppt • cs.kuleuven.ac.be • easier administration • delegation of authority • less name conflicts: unique per directory • unit of distribution: server per directory + single root server Distributed systems: general services

  37. Name servicesBasic service • Hierarchical name space • navigation • process of locating naming data from more than one server • iterative or recursive • result of lookup: • attributes • references to another name server Distributed systems: general services

  38. Lookup(“/users/pv/edu/…”,…) Ref to server-users Name servicesBasic service P root users src sys pv ann Distributed systems: general services

  39. root Lookup(“pv/edu/…”,…) Ref to server-pv users src sys pv ann Name servicesBasic service P Distributed systems: general services

  40. Name servicesBasic service • Efficiency  caching • hierarchy introduces multiple servers more communication overhead more processing capacity • caching at client side: • <name, attributes> are cached • fewer request  lookup performance higher • inconsistency? • Data is rarely changed • limit on validity Distributed systems: general services

  41. Name servicesBasic service • Availability  replication • at least two failure independent servers • primary server: accepts updates • secondary server(s): • get copy of data of primary • period check for updates at primary • level of consistency? Distributed systems: general services

  42. Name services • Overview • Introduction • Basic service • Case study: Domain name system • Directory services Distributed systems: general services

  43. Name servicesDomain name system • DNS = Internet name service • originally: an ftp-able file • not scalable • centralised administration • a general name service for computers and domains • partitioning • delegation • replication and caching Distributed systems: general services

  44. Name servicesDomain name system • Domain name • hierarchy nix.cs.kuleuven.ac.be country (België) univ. (academic) K.U.Leuven dept. computer science name of computersystem Distributed systems: general services

  45. Name servicesDomain name system • 3 kinds of Top Level Domains (TLD) • 2-letter country codes (ISO 3166) • generic names (similar organisations) • com commercial organisations • org non-profit organisations (bv. vzw) • int international organisations (nato, EU, …) • net network providers • USA oriented names • edu universities • gov American government • mil American army • new generic names • biz, info, name, aero, museum, ... Distributed systems: general services

  46. Name servicesDomain name system • For each TLD: • administrator (assign names within domain) • “be”: DNS BE vzw (previous: dept. computer science) • Each organisation with a name : • responsible for new (sub)names • e.g. cs.kuleuven.ac.be • Hierarchical naming + delegation  workable structure Distributed systems: general services

  47. Name servicesDomain name system • Name servers • root name server + • server per (group of) subdomains+ replication  high availability+ caching  acceptable performance • time-to-live to limit inconsistencies Distributed systems: general services

  48. Systems/subdomains type IP-adresof cs.kuleuven.ac.be nix A 134.58.42.36 idefix A 134.58.41.7 droopy A 134.58.41.10 stevin A 134.58.41.16 ... Name servicesDomain name system Name server cs.kuleuven.ac.be A = Address Distributed systems: general services

  49. Name servicesDomain name system Name server kuleuven.ac.be Machines/subdomeinen type IP-adresvan kuleuven.ac.be cs NS 134.58.39.1 esat NS … www A … ... NS = NameServer Distributed systems: general services

  50. www. cs.vu.nl 130.37.24.11 Root-NS Lokale NS (cs.kuleuven.ac.be) NS (nl) NS (vu.nl) 130.37.24.11 NS (cs.vu.nl) Name servicesDomain name system Example : www.cs.vu.nl Distributed systems: general services

More Related