ICT 6544 Distributed Systems Lecture 7

Similar documents
Chapter 6 Synchronization

CSE 5306 Distributed Systems. Synchronization

SYNCHRONIZATION. DISTRIBUTED SYSTEMS Principles and Paradigms. Second Edition. Chapter 6 ANDREW S. TANENBAUM MAARTEN VAN STEEN

CSE 5306 Distributed Systems

Clock Synchronization. Synchronization. Clock Synchronization Algorithms. Physical Clock Synchronization. Tanenbaum Chapter 6 plus additional papers

Time in Distributed Systems

Advanced Topics in Distributed Systems. Dr. Ayman A. Abdel-Hamid. Computer Science Department Virginia Tech

Last Class: Naming. DNS Implementation

Last Class: Naming. Today: Classical Problems in Distributed Systems. Naming. Time ordering and clock synchronization (today)

Lecture 4 Naming. Prof. Wilson Rivera. University of Puerto Rico at Mayaguez Electrical and Computer Engineering Department

New Topic: Naming. Approaches

Synchronization. Clock Synchronization

Synchronization Part 1. REK s adaptation of Claypool s adaptation of Tanenbaum s Distributed Systems Chapter 5

Naming. Naming. Naming versus Locating Entities. Flat Name-to-Address in a LAN

DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN. Chapter 5 Naming

Distributed Coordination 1/39

Naming in Distributed Systems

Naming. Chapter 4. Naming (1) Name resolution allows a process to access a named entity. A naming system is necessary.

Synchronization. Chapter 5

CSE 5306 Distributed Systems

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

Multi-threaded programming in Java

Parallelism. Master 1 International. Andrea G. B. Tettamanzi. Université de Nice Sophia Antipolis Département Informatique

殷亚凤. Synchronization. Distributed Systems [6]

CSE 124: LAMPORT AND VECTOR CLOCKS. George Porter October 30, 2017

Lecture 11: February 29

TIME ATTRIBUTION 11/4/2018. George Porter Nov 6 and 8, 2018

Verteilte Systeme (Distributed Systems)

CS 403/534 Distributed Systems Midterm April 29, 2004

Time Synchronization and Logical Clocks

Distributed Systems COMP 212. Lecture 17 Othon Michail

Synchronisation in. Distributed Systems. Co-operation and Co-ordination in. Distributed Systems. Kinds of Synchronisation. Clock Synchronization

Today: Naming. Example: File Names

Chapter 6 Synchronization (1)

New Topic: Naming. Differences in naming in distributed and non-distributed systems. How to name mobile entities?

Computing Parable. New Topic: Naming

Systèmes Distribués. Master MIAGE 1. Andrea G. B. Tettamanzi. Université de Nice Sophia Antipolis Département Informatique

Clock and Time. THOAI NAM Faculty of Information Technology HCMC University of Technology

Clock-Synchronisation

Distributed Synchronization. EECS 591 Farnam Jahanian University of Michigan

Time. COS 418: Distributed Systems Lecture 3. Wyatt Lloyd

Naming. Naming entities

wait with priority An enhanced version of the wait operation accepts an optional priority argument:

Chapter 5 Naming (2)

Frequently asked questions from the previous class survey

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

CSE 5306 Distributed Systems. Naming

Synchronization. Distributed Systems IT332

Proseminar Distributed Systems Summer Semester Paxos algorithm. Stefan Resmerita

Distributed Naming. EECS 591 Farnam Jahanian University of Michigan. Reading List

Advanced Operating Systems

Time Synchronization and Logical Clocks

DISTRIBUTED MUTEX. EE324 Lecture 11

Coordination 2. Today. How can processes agree on an action or a value? l Group communication l Basic, reliable and l ordered multicast

SEGR 550 Distributed Computing. Final Exam, Fall 2011

Process groups and message ordering

UNIX File System. UNIX File System. The UNIX file system has a hierarchical tree structure with the top in root.

Clock and ordering. Yang Wang

DISTRIBUTED SYSTEMS [COMP9243] Lecture 9a: Naming WHAT IS NAMING? Name: Entity: Slide 3. Slide 1. Address: Identifier:

OUTLINE. Introduction Clock synchronization Logical clocks Global state Mutual exclusion Election algorithms Deadlocks in distributed systems

IT 341: Introduction to System Administration. Notes for Project #8: Backing Up Files with rsync

Distributed Systems Exam 1 Review. Paul Krzyzanowski. Rutgers University. Fall 2016

Consistency and Replication. Some slides are from Prof. Jalal Y. Kawash at Univ. of Calgary

Last Class: Clock Synchronization. Today: More Canonical Problems

Lecture 10: Clocks and Time

殷亚凤. Naming. Distributed Systems [5]

2. Time and Global States Page 1. University of Freiburg, Germany Department of Computer Science. Distributed Systems

ACS 5.x: LDAP Server Configuration Example

Last Class: RPCs and RMI. Today: Communication Issues

Introduction to LAN Introduction to TDC 363 Lecture 05 Course Outline What is NOS?

Mobile Devices: Server and Management Lesson 07 Mobile File Systems and CODA

Distributed Systems. Lec 9: Distributed File Systems NFS, AFS. Slide acks: Dave Andersen

2017 Paul Krzyzanowski 1

CS3600 SYSTEMS AND NETWORKS

PART B UNIT II COMMUNICATION IN DISTRIBUTED SYSTEM PART A

CS454/654 Midterm Exam Fall 2004

416 practice questions (PQs)

Chapter 11: File-System Interface

QUESTION: 1 An RSA SecurID tokencode is unique for each successful authentication because

Lecture 12: Time Distributed Systems

CSE 486/586 Distributed Systems

CMPSCI 677 Operating Systems Spring Lecture 14: March 9

Failures, Elections, and Raft

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED MUTUAL EXCLUSION] Frequently asked questions from the previous class survey

Distributed Systems - I

Introduction. Chapter 1

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

Distributed Systems COMP 212. Revision 2 Othon Michail

CSE 124 January 27, Winter 2017, UCSD Prof. George Porter

INTRODUCTION TO WIRELESS SENSOR NETWORKS. CHAPTER 7: TIME SYNCHRONIZATION Anna Förster

Distributed Systems. 05. Clock Synchronization. Paul Krzyzanowski. Rutgers University. Fall 2017

Chapter 10: File System. Operating System Concepts 9 th Edition

CptS 464/564 Lecture 18

Naming in Distributed Systems

DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK. UNIT I PART A (2 marks)

CSE 380 Computer Operating Systems

Session 16 Windows 7 Professional DNS & Active Directory

Lecture 7: Logical Time

Consistency & Replication

Configuring Cisco TelePresence Manager

Transcription:

ICT 6544 Distributed Systems Lecture 7 Hossen Asiful Mustafa

Structured Naming

Name Spaces (1) Figure 5-9. A general naming graph with a single root node.

Name Spaces (2) Figure 5-10. The general organization of the UNIX file system implementation on a logical disk of contiguous disk blocks.

Linking and Mounting (1) Figure 5-11. The concept of a symbolic link explained in a naming graph.

Linking and Mounting (2) Information required to mount a foreign name space in a distributed system The name of an access protocol. The name of the server. The name of the mounting point in the foreign name space.

Linking and Mounting (3) Figure 5-12. Mounting remote name spaces through a specific access protocol.

Name Space Distribution Figure 5-13. An example partitioning of the DNS name space, including Internet-accessible files, into three layers.

Implementation of Name Resolution (1) Figure 5-15. The principle of iterative name resolution.

Implementation of Name Resolution (2) Figure 5-16. The principle of recursive name resolution.

Example: The Domain Name System Figure 5-18. The comparison between recursive and iterative name resolution with respect to communication costs.

The DNS Name Space Figure 5-19. The most important types of resource records forming the contents of nodes in the DNS name space.

DNS Implementation (1) Figure 5-20. An excerpt from the DNS database for the zone cs.vu.nl.

DNS Implementation (2) Figure 5-20. An excerpt from the DNS database for the zone cs.vu.nl.

Attribute-based Naming

Hierarchical Implementations: LDAP (1) Figure 5-22. A simple example of an LDAP directory entry using LDAP naming conventions.

Hierarchical Implementations: LDAP (2) Figure 5-23. (a) Part of a directory information tree.

Hierarchical Implementations: LDAP (3) Figure 5-23. (b) Two directory entries having Host_Name as RDN.

Chapter 6 Synchronization

What is Synchronization? Does all the watches have the same time? Does the clocks in all the computers have the same time? Keeping the time in different devices exactly the same is called synchronization

Clock Synchronization Figure 6-1. When each machine has its own clock, an event that occurred after another event may nevertheless be assigned an earlier time.

Clock Synchronization Algorithms Figure 6-5. The relation between clock time and UTC when clocks tick at different rates.

Network Time Protocol Figure 6-6. Getting the current time from a time server. Θ = T3 + ((T2-T1) + (T4-T3))/2 T4 = ((T2-T1) + (T3-T4))/2

The Berkeley Algorithm (1) Figure 6-7. (a) The time daemon asks all the other machines for their clock values.

The Berkeley Algorithm (2) Figure 6-7. (b) The machines answer.

The Berkeley Algorithm (3) Figure 6-7. (c) The time daemon tells everyone how to adjust their clock.

Clock Synchronization in Wireless Networks Reference Broadcast Synchronization (RBS) Aims at internally synchronizing the clocks Does not provide UTC time to nodes Only synchronizes the receiver Sender broadcasts a reference message to the receivers for adjusting their clocks

LOGICAL CLOCKS

Lamport s Logical Clocks (1) The "happens-before" relation can be observed directly in two situations: If a and b are events in the same process, and a occurs before b, then a b is true. If a is the event of a message being sent by one process, and b is the event of the message being received by another process, then a b

Lamport s Logical Clocks (2) Figure 6-9. (a) Three processes, each with its own clock. The clocks run at different rates.

Lamport s Logical Clocks (3) Figure 6-9. (b) Lamport s algorithm corrects the clocks.

Lamport s Logical Clocks (4) Figure 6-10. The positioning of Lamport s logical clocks in distributed systems.

Lamport s Logical Clocks (5) Updating counter C i for process P i 1. Before executing an event P i executes C i C i + 1. 2. When process P i sends a message m to P j, it sets m s timestamp ts (m) equal to C i after having executed the previous step. 3. Upon the receipt of a message m, process P j adjusts its own local counter as C j max{c j, ts (m)}, after which it then executes the first step and delivers the message to the application.

Example: Totally Ordered Multicasting Figure 6-11. Updating a replicated database and leaving it in an inconsistent state.

Vector Clocks (1) Figure 6-12. Concurrent message transmission using logical clocks.

Vector Clocks (2) Vector clocks are constructed by letting each process P i maintain a vector VC i with the following two properties: 1. VC i [ i ] is the number of events that have occurred so far at P i. In other words, VC i [ i ] is the local logical clock at process P i. 2. If VC i [ j ] = k then P i knows that k events have occurred at P j. It is thus P i s knowledge of the local time at P j.

Vector Clocks (3) Steps carried out to accomplish property 2 of previous slide: 1. Before executing an event P i executes VC i [ i ] VC i [i ] + 1. 2. When process P i sends a message m to P j, it sets m s (vector) timestamp ts (m) equal to VC i after having executed the previous step. 3. Upon the receipt of a message m, process P j adjusts its own vector by setting VC j [k ] max{vc j [k ], ts (m)[k ]} for each k, after which it executes the first step and delivers the message to the application.