CS7210 Flashcards
What is a distributed system?
A collection of computing units that interact by exchanging messages via an interconnection network and appear to external users as a single coherent computing facility
What is the CAP theorem?
A distributed system can be two of:
- Consistent
- Available
- Partitioned
What are some difficulties in client-server systems?
- Discovery and bundling
- Identifying the interface and parameter types
- Agreeing on the data representation
- Explicit data management
- Unpredictable delays
- Unknown cause of failures
- Must be explicitly handled
What are the goals of an RPC system?
Hide complexity of distributed programming, and make it look more similar to local node programming.
When we can look at two timestamps from a logical clock, and the timestamp of one event is greater than another event, if we can assume that the event with a greater timestamp happened later, we say that logical clock has ____ ____ ____
Strong clock consistency
What type of value do Lamport clocks for their timestamp?
A scalar value
Are Lamport clocks strongly consistent?
No, it is only consistent
In the context of logical clocks, what is the difference between consistency and strong consistency?
Consistent: Difference in the order of two events implies difference in timestamps, but not vice versa
Strongly Consistent: Difference in timestamps implies the order of two events
How does a vector clock work?
Each process maintains its own view of time at other nodes.
It keeps a vector (array) of values, which represent Lamport clocks for each node.
When a vector clock receives a message, what does it do with the passed in vector value?
For each value in the vector, it updates its own with the maximum of the value in its own or the message vector. Then, after triggering an event, it increments its own value in its own vector.
Suppose vector clock 0 has clock values [2,1,1] and receives a message with clock values [2,2,0]. What will its vector values be after processing the message?
[3,2,1]
Are vector clocks consistent?
Yes
Are vector clocks strongly consistent?
Yes
Does a Lamport clock require more space as more nodes are added?
No
Does a vector clock require more space as more nodes are added?
Yes, each node has its own element in the vector (array)
If a scalar clock represents a node’s belief about the current time, and a vector clock represents a node’s belief about each node’s belief about the current time, what does a matrix clock represent?
A node’s belief, about each node’s belief, about each node’s belief about the current time.
What benefit does a matrix clock provide over a vector clock?
It allows for garbage collection. If every node knows that every node has passed a time t , then every node knows about everything that has happened prior to t
What is the Global State of a distributed system comprised of?
- Processes and Channels
- Process state defined by most recent event
- Channel state defined by inflight messages
Each event in a distributed system changes the state of at least one of the entities, therefore changing the ____ of the distributed system.
State
In the context of distributed system state, what is a “run”?
A sequence of events. It can be actual, or observed.
In the context of state in a distributed system, what is a cut?
The state of the system at a point in time.
In the context of state in a distributed system, is a cut at the same point in time for all nodes?
No, it might be curved like this:
In the context of state in a distributed system, what is a consistent cut?
A snapshot that corresponds to some possible point in the execution which could have been represented by a consistent ordering of the events.
In the context of state in a distributed system, what is a prerecording event?
Events that occurred before a cut
In the context of state in a distributed system, what is a postrecording event?
Events that happen after a cut
Why is it difficult to capture state in a distributed system?
- Instant recording is impossible
- We can’t assume a global clock
- Networks have delays
- They’re not deterministic
How does the Chandy and Lamport snapshot algorithm to capture distributed system state work?
Does the Chandy and Lamport algorithm promise to give a consistent state?
Yes