What is the purpose of Election Algorithms in distributed systems?
To elect a new coordinator when the current one fails.
How does the Bully Algorithm work?
The highest ID process bullies others to become the coordinator.
What is a key assumption used by the Bully Algorithm?
Every process knows the ID of every other process.
The Bully Algorithm consists of these steps: 1. Process P notices the coordinator is dead. 2. P sends an ELECTION message to processes with IDs higher than _______. 3. If no one responds, P wins and sends a _______ message. 4. If a higher process responds, it takes over the election and P _______.
The Bully Algorithm consists of these steps: 1. Process P notices the coordinator is dead. 2. P sends an ELECTION message to processes with IDs higher than its own. 3. If no one responds, P wins and sends a COORDINATOR message. 4. If a higher process responds, it takes over the election and P waits.
The Ring Algorithm is another election method where processes are arranged in a _______ and messages are passed around to elect a coordinator.
The Ring Algorithm is another election method where processes are arranged in a logical ring and messages are passed around to elect a coordinator.
Compare the Bully Algorithm and the Ring Algorithm.
What is the concept of the Ring Algorithm?
Processes are arranged in a logical ring and election messages are passed around the ring.
What initiates the election in the Ring Algorithm?
A process detects failure, creates an ELECTION message, and sends it to its neighbor.
How does each process contribute in the ring algorithm?
Each process adds its own ID to the message and passes it on.
What happens when the election message returns to the initiator?
The list of IDs is circulated, and the process with the highest ID becomes the coordinator.
What is the topology of the Ring Algorithm?
Tree
Logical Ring
Star
Fully Connected
What is the topology of the Ring Algorithm?
Tree
Logical Ring
Star
Fully Connected
How does the traffic of the Ring Algorithm compare to the Bully Algorithm?
Exponential (O(2^N) messages)
Linear (O(N) messages)
Constant (O(1) messages)
High (O(N^2) messages)
How does the traffic of the Ring Algorithm compare to the Bully Algorithm?
Exponential (O(2^N) messages)
Linear (O(N) messages)
Constant (O(1) messages)
High (O(N^2) messages)
Which algorithm has faster convergence?
Both
Neither
Bully Algorithm
Ring Algorithm
Which algorithm has faster convergence?
Both
Neither
Bully Algorithm
Ring Algorithm
What is one drawback of the Ring Algorithm?
It requires ring maintenance.
Explain clock synchronization in distributed systems.
It ensures all processes have a consistent view of time across the network.
What are Lamport's Logical Clocks used for?
They are used to order events in a distributed system without synchronized clocks.
What is the Berkeley Algorithm in the context of clock synchronization?
It averages time from several clocks to synchronize processes in a distributed system.
The Ring Algorithm processes are arranged in a logical _______. Election messages are passed around the _______.
The Ring Algorithm processes are arranged in a logical ring. Election messages are passed around the ring.
In the Ring Algorithm, the process with the highest ID becomes the _______.
In the Ring Algorithm, the process with the highest ID becomes the coordinator.
The traffic in the Ring Algorithm is _______ compared to the Bully Algorithm's high traffic.
The traffic in the Ring Algorithm is linear compared to the Bully Algorithm's high traffic.
The Berkeley Algorithm helps to average time from clocks to synchronize systematically through clock synchronization.
The Berkeley Algorithm helps to average time from clocks to synchronize systematically through clock synchronization.
Lamport's Logical Clocks provide a way to order events in distributed systems without relying on _______.
Lamport's Logical Clocks provide a way to order events in distributed systems without relying on synchronized clocks.
In the Bully Algorithm, election messages can lead to high traffic of O(N^2), while the Ring algorithm has linear traffic of O(N).
In the Bully Algorithm, election messages can lead to high traffic of O(N^2), while the Ring algorithm has linear traffic of O(N).
What is the primary need for synchronization in a distributed system?
To order events, such as banking transactions, due to the lack of a global clock.
What does Lamport's Logical Clocks algorithm prioritize over absolute time?
The order of events, specifically the happens-before relationship.
What is maintained by each process in Lamport's Logical Clocks?
A counter C that is incremented before every event.
What happens when a process sends a message in Lamport's Logical Clocks?
It attaches its counter C to the message.
How does the receiver update its clock in Lamport's Logical Clocks?
By setting C_receiver to max(C_receiver, C_message) + 1.
What type of algorithm is the Berkeley Algorithm?
An Active Time Server algorithm for physical clock synchronization.
What is the first step in the Berkeley Algorithm?
The Time Daemon (Master) polls all Slaves for their time.
How does the Master calculate the new time in the Berkeley Algorithm?
By averaging the time reported by slaves, ignoring extreme outliers.
What does the Master tell slaves to adjust in the Berkeley Algorithm?
By how much to speed up or slow down their clocks.
What does the Master never do in the Berkeley Algorithm?
It never sets the time back abruptly.
In a distributed system, synchronization is essential for ordering events like _______.
In a distributed system, synchronization is essential for ordering events like banking transactions.
Lamport's Logical Clocks focus on the _______ rather than absolute time.
Lamport's Logical Clocks focus on the happens-before relationship rather than absolute time.
Each process in Lamport's Logical Clocks maintains a counter C and increments it _______ every event.
Each process in Lamport's Logical Clocks maintains a counter C and increments it before every event.
In Lamport's Logical Clocks, a process attaches its counter C to messages when _______ them.
In Lamport's Logical Clocks, a process attaches its counter C to messages when sending them.
The receiver updates its clock to _______ in Lamport's Logical Clocks.
The receiver updates its clock to max(C_receiver, C_message) + 1 in Lamport's Logical Clocks.
The Berkeley Algorithm is an _______ algorithm for syncing physical clocks.
The Berkeley Algorithm is an Active Time Server algorithm for syncing physical clocks.
The first step of the Berkeley Algorithm is that the Master polls all _______ for their time.
The first step of the Berkeley Algorithm is that the Master polls all Slaves for their time.
The Master calculates the average time by ignoring _______ in the Berkeley Algorithm.
The Master calculates the average time by ignoring extreme outliers in the Berkeley Algorithm.
The Master directs slaves to adjust their clocks to _______ or _______ in the Berkeley Algorithm.
The Master directs slaves to adjust their clocks to speed up or slow down in the Berkeley Algorithm.
What does RPC stand for?
Remote Procedure Call
What is the role of the Client Stub in RPC?
It acts as a proxy, packing parameters into a message.
What does the Server Stub do in RPC?
It unpacks parameters from the message and calls the actual server procedure.
Describe the first step in the RPC process.
The client calls the Client Stub (local call).
What happens during marshalling in RPC?
The Client Stub packs parameters into a message.
What is the final step in the RPC sequence?
The Server OS passes the message to the Server Stub.
RPC allows a program to call a procedure on a _______ machine as if it were a _______ function call.
RPC allows a program to call a procedure on a remote machine as if it were a local function call.
The sequence in RPC starts with the client calling the _______, which later leads to _______ handling the request.
The sequence in RPC starts with the client calling the Client Stub, which later leads to Server Stub handling the request.
Which of the following is NOT a responsibility of the Client Stub?
Packing parameters into a message
Receiving messages from the server
Calling the server procedure
Unpacking parameters
Which of the following is NOT a responsibility of the Client Stub?
Packing parameters into a message
Receiving messages from the server
Calling the server procedure
Unpacking parameters
What does the Server Stub handle in the RPC process?
Packing parameters into a message
Unpacking parameters and calling the server procedure
Computing average time
Sending messages to the client
What does the Server Stub handle in the RPC process?
Packing parameters into a message
Unpacking parameters and calling the server procedure
Computing average time
Sending messages to the client
Which diagram represents the Time Daemon in a distributed system?

What is the purpose of Election Algorithms in distributed systems?
To elect a new coordinator when the current one fails.
What is a key assumption used by the Bully Algorithm?
Every process knows the ID of every other process.
The Bully Algorithm consists of these steps: 1. Process P notices the coordinator is dead. 2. P sends an ELECTION message to processes with IDs higher than its own. 3. If no one responds, P wins and sends a COORDINATOR message. 4. If a higher process responds, it takes over the election and P waits.
The Ring Algorithm is another election method where processes are arranged in a logical ring and messages are passed around to elect a coordinator.
Compare the Bully Algorithm and the Ring Algorithm.
What is the concept of the Ring Algorithm?
Processes are arranged in a logical ring and election messages are passed around the ring.
What initiates the election in the Ring Algorithm?
A process detects failure, creates an ELECTION message, and sends it to its neighbor.
How does each process contribute in the ring algorithm?
Each process adds its own ID to the message and passes it on.
What happens when the election message returns to the initiator?
The list of IDs is circulated, and the process with the highest ID becomes the coordinator.
How does the traffic of the Ring Algorithm compare to the Bully Algorithm?
Exponential (O(2^N) messages)
High (O(N^2) messages)
Linear (O(N) messages)
Constant (O(1) messages)
Explain clock synchronization in distributed systems.
It ensures all processes have a consistent view of time across the network.
What are Lamport's Logical Clocks used for?
They are used to order events in a distributed system without synchronized clocks.
What is the Berkeley Algorithm in the context of clock synchronization?
It averages time from several clocks to synchronize processes in a distributed system.
The Ring Algorithm processes are arranged in a logical ring. Election messages are passed around the ring.
The Berkeley Algorithm helps to average time from clocks to synchronize systematically through clock synchronization.
Lamport's Logical Clocks provide a way to order events in distributed systems without relying on synchronized clocks.
In the Bully Algorithm, election messages can lead to high traffic of O(N^2), while the Ring algorithm has linear traffic of O(N).
What is the primary need for synchronization in a distributed system?
To order events, such as banking transactions, due to the lack of a global clock.
What does Lamport's Logical Clocks algorithm prioritize over absolute time?
The order of events, specifically the happens-before relationship.
What is maintained by each process in Lamport's Logical Clocks?
A counter C that is incremented before every event.
What happens when a process sends a message in Lamport's Logical Clocks?
It attaches its counter C to the message.
How does the receiver update its clock in Lamport's Logical Clocks?
By setting C_receiver to max(C_receiver, C_message) + 1.
What type of algorithm is the Berkeley Algorithm?
An Active Time Server algorithm for physical clock synchronization.
What is the first step in the Berkeley Algorithm?
The Time Daemon (Master) polls all Slaves for their time.
How does the Master calculate the new time in the Berkeley Algorithm?
By averaging the time reported by slaves, ignoring extreme outliers.
What does the Master tell slaves to adjust in the Berkeley Algorithm?
By how much to speed up or slow down their clocks.
In a distributed system, synchronization is essential for ordering events like banking transactions.
Each process in Lamport's Logical Clocks maintains a counter C and increments it before every event.
The Master directs slaves to adjust their clocks to speed up or slow down in the Berkeley Algorithm.
What does the Server Stub do in RPC?
It unpacks parameters from the message and calls the actual server procedure.
The sequence in RPC starts with the client calling the Client Stub, which later leads to Server Stub handling the request.
Which of the following is NOT a responsibility of the Client Stub?
Calling the server procedure
Unpacking parameters
Receiving messages from the server
Packing parameters into a message
What does the Server Stub handle in the RPC process?
Unpacking parameters and calling the server procedure
Sending messages to the client
Packing parameters into a message
Computing average time
Election algorithms are necessary for selecting a coordinator in distributed systems when the current one fails.

| Feature | Bully Algorithm | Ring Algorithm |
|---|---|---|
| Topology | Fully Connected (assumed) | Logical Ring |
| Traffic | High (O(N²) worst case) | Linear (O(N)) |
| Speed | Faster convergence | Slower (sequential) |
| Complexity | Simple logic | Requires maintenance |
Distributed systems lack a global clock, requiring synchronization to order events like transactions.

Are you sure you want to delete 0 flashcard(s)? This cannot be undone.
Select tags to remove from 0 selected flashcard(s):
Loading tags...