100% found this document useful (1 vote)
194 views

Distributed Systems Assignment 2

This document discusses distributed systems and consistency models for replicas. It addresses: 1) Replicas improve performance by allowing data to reside close to where it is used and enhance reliability by allowing sites to continue working if local failures occur. 2) Consistency is achieved through various models and is difficult to maintain across replicas as writes must be propagated to all sites. 3) Synchronization handles consistency in specific distributed environments and is important for controlling shared resources and agreeing on event ordering, which is more difficult than in single systems.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
194 views

Distributed Systems Assignment 2

This document discusses distributed systems and consistency models for replicas. It addresses: 1) Replicas improve performance by allowing data to reside close to where it is used and enhance reliability by allowing sites to continue working if local failures occur. 2) Consistency is achieved through various models and is difficult to maintain across replicas as writes must be propagated to all sites. 3) Synchronization handles consistency in specific distributed environments and is important for controlling shared resources and agreeing on event ordering, which is more difficult than in single systems.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Distributed Systems Assignment

1. Give a real world application of distributed system and discuss how


a. Replicas

Improve performance

Replicas allow data to reside close to where it is used

Enhance reliability

Replicas allow remote sites to continue working in the event of local failures. It is also possible to protect
against data corruption.This directly supports the distributed systems goal of enhanced scalability

If there are many replicas of the same thing, how do we keep all of them up-to-date? How do we keep
the replicas consistent?

It is not easy to keep all those replicas consistent Consistency can be achieved in a number of ways.

Replication is a widely-used scalability technique

Web clients and web proxies

Replicating the data and moving it closer to where it is needed helps to solve the scalability problem

A problem remains: How to efficiently synchronize all of the replicas created to solve the scalability
issue?

Dilemma: adding replicas improves scalability, but incurs the overhead of keeping the replicas up-to-
date

As we shall see, the solution often results in a relaxation of any consistency constraints

B. Consistency
 A data-store can be read from or written to by any process in a distributed system.
 A local copy of the data-store (replica) can support “fast reads”
 A write to a local replica needs to be propagated to all remote replicas
 Various consistency models help to understand the various mechanisms used to achieve and
enable this

• A “consistency model” is a Contract between a DS data-store and its processes.


• If the processes agree to the rules, the data-store will perform properly and as advertised.
• Strict Consistency, is defined as:
• Any read on a data item ‘x’ returns a value corresponding to the result of the most
recent write on ‘x’ (regardless of where the write occurred).
• Wi(x)a – a write by process ‘i’ to item ‘x’ with a value of ‘a’. That is, ‘x’ is set to ‘a’
• (Note: The process is often shown as ‘Pi’)
• Ri(x)b – a read by process ‘i’ from item ‘x’ producing the value ‘b’. That is, reading ‘x’ returns ‘b’
• Time moves from left to right in all diagrams

B. Synchronization is handled in that specific distributed environment.

• Synchronization is important if we want to

– control access to a single, shared resource

– agree on the ordering of events

• Synchronization in Distributed Systems is much more difficult than in uniprocessor systems

1. Synchronization based on “Actual Time”.

2. Synchronization based on “Relative Time”.

3. Synchronization based on Co-ordination (with Election Algorithms).

4. Distributed Mutual Exclusion.

5. Distributed Transactions.

1. Order the following events based on


a. Lamport’s Algorithm
b. Vector Timestamps
m4

2. Discuss distribution models that should be followed while implementing replicas in distributed
systems

You might also like