Professional Documents
Culture Documents
Cloud Computing and Distributed Systems
Cloud Computing and Distributed Systems
- The set of processors at a distance at most k from the processor in the ring, to the left or right.
- The processor with the largest id in its 2k-neighbourhood becomes the winner.
5. How many processors continue to compete in the next phase after winning a
phase?
- Only processors that are winners in the current phase continue to compete in the next.
- If it receives a reply from both its neighbors, indicating it has the largest id in its 1-
neighbourhood.
- A phase k-1 winner sends <probe> messages with its identifier to its 2k-neighbourhood.
- If it receives replies from both directions in its 2k-neighbourhood after sending <probe>
messages.
- The processor with the maximal identifier, whose probes are never swallowed, becomes the
leader.
12. What is the time complexity of the O(n log n) Leader Election Algorithm?
13. What triggers the sending of a reply in the leader election algorithm?
14. When does an initiator proceed to the next phase in the leader election
algorithm?
15. How many messages can a processor initiate in phase k of the leader
election algorithm?
17. How many phase k-1 winners occur when packed densely in the leader
election algorithm?
18. How many phases are there in the leader election algorithm?
19. What is the maximum number of phase k-1 winners in the leader election
algorithm?
20. Can the message complexity be reduced further in the leader election
algorithm?
21. What is the lower bound for message complexity in an asynchronous leader
election algorithm?
22. What types of algorithms are LCR and HS in the context of leader election?
- Synchronous networks.
26. How many processes in total begin elections when the process with the
lowest id detects a failure?
27. What is the best-case completion time when the second-highest id detects
leader failure?
28. What is the big O notation for the number of election messages in leader
election?
- O(N^2)
29. In which system model is liveness not guaranteed due to timeouts built into
the protocol?
30. What is used to calculate the worst-case one-way latency in leader election?
31. What approach uses consensus to solve election in Chubby & Zookeeper
systems?
- Paxos
33. What is an essential part of Google's stack that relies on Chubby for locking?
34. How is a master server elected at all times in Google Chubby's system?
- Potential leader gets votes from other servers, majority becomes new leader
35. What is the centralized service for maintaining configuration information that
uses Zab variant of Paxos for leader election?
- Zookeeper
36. In Zookeeper, what is used to elect the highest-id server as the Master
leader?
- Each server creates a new sequence number for itself, elects highest-id
38. What is the second option implemented in Zookeeper for handling failures in
leader election?
- Java & C
51. How does the Fetching Service use Zookeeper to elect masters?
- ZooKeeper uses a central store of key-value pairs for coordinating distributed systems.
- All servers maintain a copy of the state in memory with a leader elected at startup.
57. How does ZooKeeper ensure strict order access and synchronization?
- By having a shared hierarchal namespace like a standard file system with strictly ordered
access for synchronization.
58. What is the significance of the number stamped with each update in
ZooKeeper?
- The number reflects the order of transactions and is used to implement higher-level
abstractions.
59. How does ZooKeeper handle data access for reads and writes?
61. Explain the data format required for storing data in ZooKeeper.
62. What may be violated in Rings Leader Election according to the proof sketch?
- Safety or liveness
63. In Rings with Identifiers, what are differences between indices and ids?
- Indices are for analysis; ids are unique integers available to processors.
65. Describe the LCR algorithm steps for Leader Election in Rings.
66. What determines message complexity in the analysis of the O(n^2) algorithm
in rings?
67. In the worst arrangement of ids (decreasing order), how many messages are
sent?
- O(n^2) messages
68. Explain the idea behind reducing messages in the O(n log n) algorithm.
69. What is the algorithm that uses O(n log n) messages for Leader Election in
Rings?
71. What are some classical leader election protocols mentioned in the notes?
72. In what systems are classical leader election protocols commonly used?
78. How would email processors avoid reading the same emails using
Zookeeper?
81. What are the bounds for message complexity in the discussed systems?
82. Who presented different algorithms for leader election in a ring topology?
83. What are the two types of rings considered for leader election algorithms?
84. What algorithms were discussed for the leader election problem?
87. Define the System Model for leader election as described in the notes.
- N processes, each with a unique id, messages eventually delivered, failures possible.
88. What safety and liveness properties must an election algorithm guarantee?
90. What must the result of an election not depend on as per the notes?
- Katta divides the work of indexing using shards assigned by a master server.
- ZooKeeper is used in Katta to track slave servers' status, handle master failover, and manage
shard assignments to slaves.
- YMB is a distributed publish-subscribe system that utilizes ZooKeeper for managing topics
and system operation.
95. How are topics managed in the Yahoo! Message Broker?
- Each topic has a child znode with primary, backup server details, and subscriber information.
- ZooKeeper is used in YMB to manage topic distribution, handle machine failures, and control
system operation.
- ZooKeeper can achieve throughput values of hundreds of thousands of operations per second.
- ZooKeeper uses fast reads with watches, along with local replicas for serving operations.
- Processors decide to be a leader or non-leader, with only one processor as the leader.
- Processors in all ring sizes are modeled with the same state machine.
- No algorithm exists due to all processors behaving identically without unique identifiers.
107. What triggers the initiation of an Election message in the Ring Election
Protocol?
110. When does a process become the new coordinator in the Ring Election
Protocol?
- If the received id:attr matches its own, indicating the greatest attribute.
111. What action does a process take upon receiving an 'Elected' message in
the Ring Election Protocol?
- It sets its variable elected, forwarding the message unless it is the new coordinator.
112. What is the goal of the leader election in the Ring Election Protocol?
- To elect the process with the highest id as the leader.
- To ensure consistency and avoid chaos with each data center having its own Leader.
114. What happens if an ensemble over two data centers loses network
connectivity without majority requirement?
- Each data center would have its own Leader leading to inconsistency and chaos.
- It creates sessions with timeout periods and manages them using heartbeats.
117. What role does Zookeeper play in coordinating servers and clients?
- It acts as a central agency where servers create ephemeral nodes and clients query for
available servers.
118. How does Zookeeper help clients keep track of available servers when
some servers go down?
- Clients query Zookeeper for the most recent list of servers, ensuring efficient coordination.
- The Bully Algorithm is a leader election algorithm where processes elect a coordinator based
on process IDs.
- A process initiates an election by sending an Election message if it does not have the highest
ID.
123. What happens if a process receives no answer within a timeout in the Bully
Algorithm?
- If a process receives no answer within a timeout, it becomes the leader and sends
Coordinator message.
- A process replies with an OK message and may start its own leader election protocol.
- Timeouts are set based on worst-case time to complete an election, such as 5 message
transmission times.
128. In the worst-case scenario, how many messages are required for the
election process?
- 2N messages.
130. How does each process handle multiple initiators in the leader election
process?
- Each process remembers the highest ID initiator and ignores lower ones.
131. What happens if a failure occurs during the leader election process?
132. What is the first option to fix failures in the leader election process?
- Have the predecessor or successor of the leader detect and restart the election.
133. What is the second option for fixing failures in the leader election process?