Notes - MIECT
Computação Distribuída
Notes - MIECT
Computação Distribuída
  • Computação Distribuída
  • Introduction / Architecture
    • Distributed Systems
    • Architecture
    • Middleware Organizations
    • Processes
    • Threads
    • Virtualization
    • Clients
    • Servers
    • Migration
  • Communications
    • OSI Model
    • Middleware Layer
    • Types of Communication
    • Remote Call Procedure (RPC)
    • Sockets
    • Application-level Multicasting
  • Naming
    • Names
    • Addresses
    • Identifiers
    • Naming Systems
      • Flat Naming
      • Structured Naming
    • Internet Domain Name System (DNS)
    • Attribute-based naming - LDAP
  • Coordination
    • Clocks
      • Synchronizing without UTC
    • Reference Broadcast Synchronization – RBS
    • Happened-Before Relation
      • Logical Clocks
      • Vector Clocks
    • Mutual Exclusion Algorithms
    • Election Algorithms
    • Distributed Events Correspondance
  • Consistency & Replication
    • Replication
    • Performance and Scalability
    • Client-centric models
    • Replicates
    • Unicasting vs. Multicasting
    • Continuous Consistency
    • Protocols
  • Flaw Tolerance
    • Dependability
    • Terminology
    • Confidence vs. Security
    • Halting failures
    • Redundancy to mask failures
    • Consensus
      • Realistic
      • Consensus in arbitrary failures
      • Achieving failure tolerance
      • Distributed consensus
    • Failure Detection
    • Reliable RPCs
    • Distributed commit protocols
  • Python asyncio & Friends
    • Async
    • Sync vs. Async
    • Tools
  • Flask
    • Introduction
    • Python Requests
  • Containers
    • VM's vs Containers
    • OS Support
    • Building a container
    • Tools
    • Portability
    • Docker
      • Container
  • Map Reduce
    • Map Recude
    • Hadoop
    • Software Architecture
    • Task Scheduling
    • Comparison With Traditional Models
  • Cloud Computing
    • Cloud Computing
    • IaaS – Infrastructure as a Service
    • PaaS – Platform as a Service
    • SaaS – Software as a Service
    • Business Models
Powered by GitBook
On this page
  1. Coordination
  2. Happened-Before Relation

Logical Clocks

PreviousHappened-Before RelationNextVector Clocks

Last updated 2 years ago

How do we keep a global vision of the system's behavior through the relations happened-before?

We associate a timestamp C(e) to each event e, thus satisfying the following properties:

  • If a and b are two events of the same process, and a -> b, then we demand that C(a) < C(b).

  • If a corresponds to the moment at which message m was sent, and b to the moment at which it was received, then C(a) < C(b).

If there isn't a global clock, how do we do the timestamp?

  • The consistency is kept through a set of logical clocks, 1 per process.

Lamport

Each Pi process keeps a counter, Ci, and adjusts this counter.

  • At every new event that occurs in Pi, Ci is incremented by 1.

  • Every time a message m is sent by the Pi process, the message receives a timestamp ts(m)=Ci.

  • Every time a message m is received by a Pj process, Pj adjusts its local counter Cj to max(Cj, ts(m)) and executes the first step before it passes the message m to the application.

Updates that lead to inconsistencies