IS 651: Distributed Systems Midterm

Slides:



Advertisements
Similar presentations
Distributed Systems Major Design Issues Presented by: Christopher Hector CS8320 – Advanced Operating Systems Spring 2007 – Section 2.6 Presentation Dr.
Advertisements

Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
Time and synchronization (“There’s never enough time…”)
Reliability on Web Services Presented by Pat Chan 17/10/2005.
1 CS1001 Lecture Overview Java Programming Java Programming Midterm Review Midterm Review.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Review For Midterm.
CS603 Process Synchronization February 11, Synchronization: Basics Problem: Shared Resources –Generally data –But could be others Approaches: –Model.
SynchronizationCS-4513, D-Term Synchronization in Distributed Systems CS-4513 D-Term 2007 (Slides include materials from Operating System Concepts,
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Synchronization in Distributed Systems CS-4513 D-term Synchronization in Distributed Systems CS-4513 Distributed Computing Systems (Slides include.
Distributed Systems Fall 2009 Course introduction.
Distributed Systems CS Programming Models- Part I Lecture 13, Oct 13, 2014 Mohammad Hammoud 1.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Distributed Systems (15-440) Mohammad Hammoud December 4 th, 2013.
Distributed Mutex EE324 Lecture 11.
Dionicio D. Gante, Genevev G. Reyes & Vanylive T. Galima DDistributed Operating Systems.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
Ch 10 Shared memory via message passing Problems –Explicit user action needed –Address spaces are distinct –Small Granularity of Transfer Distributed Shared.
Computer Science Lecture 13, page 1 CS677: Distributed OS Last Class: Canonical Problems Distributed synchronization and mutual exclusion Distributed Transactions.
Shuman Guo CSc 8320 Advanced Operating Systems
D u k e S y s t e m s Asynchronous Replicated State Machines (Causal Multicast and All That) Jeff Chase Duke University.
Physical clock synchronization Question 1. Why is physical clock synchronization important? Question 2. With the price of atomic clocks or GPS coming down,
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Event Ordering. CS 5204 – Operating Systems2 Time and Ordering The two critical differences between centralized and distributed systems are: absence of.
Lecture 12-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2012 Indranil Gupta (Indy) October 4, 2012 Lecture 12 Mutual Exclusion.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
Exercises for Chapter 11: COORDINATION AND AGREEMENT
CS/CE/TE 6378 Advanced Operating Systems
Distributed Shared Memory
CSE 486/586 Distributed Systems Mid-Semester Overview
Alternative system models
Distributed Computing
Distributed Systems CS
Principles of Computer Security
Distributed Mutex EE324 Lecture 11.
Replication Middleware for Cloud Based Storage Service
Outline Distributed Mutual Exclusion Distributed Deadlock Detection
Time and Clock.
Distributed Systems CS
IS 651: Distributed Systems Time and Synchronization Mutual Exclusion
Distributed Systems CS
Outline Midterm results summary Distributed file systems – continued
Time and Clock.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Architectures of distributed systems Fundamental Models
Architectures of distributed systems Fundamental Models
CSE 486/586 Distributed Systems Mutual Exclusion
Distributed Systems CS
IS 651: Distributed Systems Final Exam
Distributed Systems CS
Lecture 10: Coordination and Agreement
Distributed Systems CS
Distributed Systems CS
Physical clock synchronization
Architectures of distributed systems
An Introduction to Internetworking
Logical time (Lamport)
Architectures of distributed systems Fundamental Models
Distributed Systems CS
Lecture 11: Coordination and Agreement
Logical time (Lamport)
Distributed Systems (15-440)
Last Class: Naming Name distribution: use hierarchies DNS
IS 4506 Configuring the FTP Service
Final Exam Review CptS 464/564 April 24, 2019.
CSE 486/586 Distributed Systems Mid-Semester Overview
Distributed Systems and Algorithms
IS 651: Distributed Systems HW3
Presentation transcript:

IS 651: Distributed Systems Midterm Sisi Duan Assistant Professor Information Systems sduan@umbc.edu

HW3 Q1. Why E1->E10 and E8||E9? Definition (->): We define e->e’ if… Logical ordering: e->e’ if e->e’ for any process I Messages: send (m) -> receive (m) for any message m Transitivity: e->e’‘ if e->e’ and e’->e’’

HW3 Q3.B. Sequential consistency does not admit a scalable implementation because it requires a total ordering of all operations in the system.  Q3.E. Sequential consistency is sufficient to guarantee that an airline never overbooks its seats when multiple clients reserve seats on the same airplane.

HW3 Q3.C. Obeying all causal orderings is sufficient to guarantee convergence of state maintained by multiple replicas.  Q3.D. Causal consistency is sufficient to guarantee that an airline never overbooks its seats when multiple clients reserve seats on the same airplane.  Q3.A. Sequential consistency guarantees causal ordering.  In shared memory scenario, I think it’s true. But this is not always true.

Causal order vs Total order in the broadcast scenario [Lamport, Comm. ACM 1978] [Lamport, Distrib. Comput. 1986] Causal order If the broadcast of message m1 "happens before" or "causally precedes" the broadcast of message m2, then no correct process delivers m2 before it delivers m1. m1 “Chase charges 10%!” m2 “That is outrageous!”

Causal order vs Total order in the broadcast scenario ✓ Causal order Chase: “Charge 10%” Outrageous! $100 $90 Chase: “Charge 10%” Outrageous! $100 $90 $100

Causal order vs Total order in the broadcast scenario ✘ Causal order Chase: “Charge 10%” Outrageous! $100 $100 $90 Chase: “Charge 10%” Outrageous! $100 $90 $90 $100

Causal order vs Total order in the broadcast scenario ✓ ✘ Causal order Total order Chase: “Charge 10%” Client 1: “Deposit $100” Outrageous! $100 $90 $190 Client 1: “Deposit $100” Chase: “Charge 10%” Outrageous! $100 $200 $180 $100

Causal order vs Total order in the broadcast scenario ✘ ✓ Causal order Total order Chase: “Charge 10%” Outrageous! $100 $100 $90 Chase: “Charge 10%” Outrageous! $100 $100 $90 $100

Causal order vs Total order in the broadcast scenario ✓ ✓ Causal order Total order Chase: “Charge 10%” Client 1: “Deposit $100” Outrageous! $100 $90 $190 Chase: “Charge 10%” Client 1: “Deposit $100” Outrageous! $100 $90 $190 $100

Midterm 25% of the score Oct 17, in-class, 2.5 hours Covers slides 1(intro)-6(consistency) Closed-book One A4 page cheat sheet (front and back) – You prepare it. Turn in the cheat sheet (with your name) at the end of the exam

Midterm Multiple choices Short answers/diagrams Similar with class exercises Short answers/diagrams Similar with homework No programming questions. But I may ask concepts. Advice Explanation can help you get partial credit even your answer is not correct. Be brief, but not too simple.

What we have discussed so far Distributed systems overview Web technologies Distributed communication Time and synchronization Mutual exclusion Distributed File systems Consistency

What we have discussed so far Distributed systems overview Web technologies Distributed communication Time and synchronization Mutual exclusion Distributed File systems Consistency

Distributed Systems Overview What is a distributed system? Who? What? How? What are the architecture and design philosophy? Scalability Reliability Performance Openness

Distributed Systems Overview Distributed systems goals Raise the level of abstraction, provide location transparency, scalability, availability, modularity Distributed systems challenges Interfaces, scalability, consistency, fault tolerance, security

Distributed Systems Overview Network layers P2P Onion Routing

Distributed Systems Overview

What we have discussed so far Distributed systems overview Web technologies Distributed communication Time and synchronization Mutual exclusion Distributed File systems Consistency

Web Technology Client-Server Model

Web Technology: 3-tier architecture What is good/bad about this architecture? + Modularity, better reliability/scalability - poor latency

Web Technology Real Architecture Why so many layers? De-coupling Performance Scalability Security …

Web Service Usually more complicated Coordination is challenging Services from multiple providers Coordination is challenging

Web Service Load balancing Content-aware distribution Always distribute the same request for the same document to the same server

What we have discussed so far Distributed systems overview Web technologies Distributed communication Time and synchronization Mutual exclusion Distributed File systems Consistency

Distributed Communication Sockets Remote Procedure Call Distributed Shared Memory

Distributed Communication TCP vs UDP

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.bind((hostname, port)) sock.listen(1) conn,addr = sock.accept() server_addr=(hostname,portnum) sock.connect(server_addr) sock.sendall(msg) buf = conn.recv(8092) sock.close()

Distributed Communication Socket interface

Distributed Communication Remote Procedure Call (RPC)

Distributed Communication RPC XML/RPC SOAP RPC-style Document-style Both use XML Advantages? Disadvantages?

What we have discussed so far Distributed systems overview Web technologies Distributed communication Time and synchronization Mutual exclusion Distributed File systems Consistency

Time and Synchronization Why? Synchronizing real clocks Cristian’s algorithm The Berkeley Algorithm Network Time Protocol (NTP) Logical clocks Lamport logical clocks Vector clocks

Time and Synchronization Synchronizing real clocks Christian’s algorithm Berkerley algorithm NTP Never perfect

Time and Synchronization Lamport clock L(e1) = 1 (pitcher throws ball to home) L(e2) = 2 (ball arrives at home) L(e3) = 3 (batter hits ball to pitcher) L(e4) = 4 (batter runs to first base) L(e5) = 1 (runner runs to home) L(e6) = 4 (ball arrives at pitcher) L(e7) = 5 (pitcher throws ball to first base) L(e8) = 5 (runner arrives at home) L(e9) = 6 (ball arrives at first base) L(e10) = 7 (batter arrives at first base)

Time and Synchronization Vector Clock

What we have discussed so far Distributed systems overview Web technologies Distributed communication Time and synchronization Mutual exclusion Distributed File systems Consistency

Mutual Exclusion What’s mutual exclusion? Why? Goals? While true: Perform local operations Acquire() Execute critical section Release()

Mutual Exclusion Centralized Solution Ring based Solution While true: Perform local operations Acquire() Execute critical section Release() Mutual Exclusion Centralized Solution Ring based Solution Shared priority queue Majority voting

What we have discussed so far Distributed systems overview Web technologies Distributed communication Time and synchronization Mutual exclusion Distributed File systems Consistency

GFS Architecture Client retrieves metadata from master Read/Write data flows between client and chunkserver Minimizing the master’s involvement in read/write operations alleviates the single-master bottleneck

Distributed File Systems

What we have discussed so far Distributed systems overview Web technologies Distributed communication Time and synchronization Mutual exclusion Distributed File systems Consistency

Consistency Shared memory Consistency model Rules ”contract” between memory system and programmer

Consistency Models Strict consistency Sequential consistency Causal consistency Eventual consistency