Distributed System (BSc CSIT, CSC462): the questions likely to come
25 analyzed questions from 7 past papers (2074-2081), grouped by syllabus unit — each with its probability, how often it's been asked, and where to study the answer.
What are election algorithms in distributed systems? Explain the Bully algorithm and the Ring algorithm with suitable examples.
Election Algorithms
An election algorithm chooses a single process to act as coordinator (e.g., the central lock manager, sequencer or master). Any process may start an election; when it finishes every non-crashed process must agree on the new coordinator, usually the one with the highest process id (or priority). Elections are needed after the current coordinator crashes.
1. Bully Algorithm (Garcia-Molina)
Assumes each process knows the ids of all others and can message them; uses timeouts to detect crashes.
When a process P notices the coordinator has failed (or it just recovered):
- P sends an ELECTION message to all processes with higher ids.
- If no higher process answers within the timeout, P wins and sends a COORDINATOR message to all lower processes announcing itself.
- If a higher process answers with OK, P drops out; the higher process now holds its own election.
- Eventually the highest-id live process becomes coordinator and announces it.
Example: processes 1..7, with 7 the old coordinator. 7 crashes; 4 notices and sends ELECTION to 5,6,7. 5 and 6 reply OK and hold their own elections. 6 sends ELECTION to 7 (no reply) and finds itself highest, so 6 announces itself coordinator to all. The highest survivor 'bullies' the rest — hence the name.
- Worst-case messages: .
2. Ring Algorithm
Processes form a logical ring; each knows its successor. No token is used.
- A process that detects coordinator failure builds an ELECTION message containing its own id and sends it to its successor (skipping dead nodes).
- Each process appends its id and forwards the message around the ring.
- When the message returns to the initiator (it sees its own id in the list), the highest id in the list is the new coordinator.
- The initiator circulates a COORDINATOR message naming the winner so all processes update.
Example: ring 1→2→3→4→5→6→7→1, coordinator 7 crashes. Process 2 starts an election with {2}; it becomes {2,3,4,5,6} as it travels (7 skipped) and returns to 2. Max = 6, so 6 is the new coordinator, announced via a second pass.
- Messages: about ( for the election list + for the announcement).
Comparison
| Bully | Ring | |
|---|---|---|
| Topology knowledge | all process ids | successor only |
| Messages (worst) | ||
| Result | highest-id live process | highest id in ring list |
Both guarantee that all live processes agree on the same coordinator after the election completes.
Synchronization
What are election algorithms in distributed systems? Explain the Bully algorithm and the Ring algorithm with suitable examples.
What is distributed mutual exclusion? Explain the centralized, token-ring and Ricart-Agrawala (distributed) algorithms, comparing them in terms of message complexity and fault tolerance.
Explain clock synchronization in distributed systems. Discuss Lamport's logical clocks and vector clocks with examples, and describe how the happened-before relation orders events.
Explain Lamport's logical clock with an example.
Differentiate between centralized and distributed mutual exclusion algorithms.
Explain distributed deadlock detection. What is a wait-for graph?
Explain the Bully algorithm for electing a coordinator.
Explain Cristian's algorithm for physical clock synchronization.
What is a vector clock? How does it improve over Lamport's logical clock?
Sit a probable paper
A full mock exam built from the most likely questions, mirroring the real paper's structure. Every slot is a real past question.
Most Probable Paper
Mirrors the real structure · 60 marks · based on 7 past papers
- 1.[10 marks]
What are election algorithms in distributed systems? Explain the Bully algorithm and the Ring algorithm with suitable examples.
This question has recurred in 3 of 7 years; so far only in internal assessments, not the board; and its topic (Synchronization) appears in 100% of years.
- 2.[10 marks]
What is distributed mutual exclusion? Explain the centralized, token-ring and Ricart-Agrawala (distributed) algorithms, comparing them in terms of message complexity and fault tolerance.
This question has recurred in 3 of 7 years; so far only in internal assessments, not the board; and its topic (Synchronization) appears in 100% of years.
- 3.[10 marks]
Explain clock synchronization in distributed systems. Discuss Lamport's logical clocks and vector clocks with examples, and describe how the happened-before relation orders events.
This question has recurred in 3 of 7 years; so far only in internal assessments, not the board; and its topic (Synchronization) appears in 100% of years.
- 1.[5 marks]
Explain Lamport's logical clock with an example.
This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Synchronization) appears in 100% of years.
- 2.[5 marks]
Differentiate between centralized and distributed mutual exclusion algorithms.
This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Synchronization) appears in 100% of years.
- 3.[5 marks]
Explain distributed deadlock detection. What is a wait-for graph?
This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Synchronization) appears in 100% of years.
- 4.[5 marks]
Explain the Bully algorithm for electing a coordinator.
This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Synchronization) appears in 100% of years.
- 5.[5 marks]
Explain Cristian's algorithm for physical clock synchronization.
This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Synchronization) appears in 100% of years.
- 6.[5 marks]
What is a distributed system? Explain the goals and characteristics of a distributed system.
This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Introduction) appears in 100% of years.
- 7.[5 marks]
What are the different kinds of transparency in a distributed system?
This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Introduction) appears in 100% of years.
- 8.[5 marks]
What is a Remote Procedure Call (RPC)? Explain its working with a diagram.
This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Communication) appears in 86% of years.
- 9.[5 marks]
What is middleware? Explain its role in a distributed system.
This question has recurred in 4 of 7 years; so far only in internal assessments, not the board; and its topic (Architectures) appears in 100% of years.
Behind the numbers
The raw evidence the predictions are computed from: marks per unit per year, syllabus weights, trends, and coverage.
Show the heatmap, topic table and coverage analysis
The receipt: marks per unit, per year
Each row is a syllabus unit, each column an exam year, each cell the marks that unit earned that year. Click any cell to see the actual questions behind it.
| # | Syllabus unit | Probability | Appeared | Avg marks | Syllabus weight | Exam vs syllabus | Trend | Questions |
|---|---|---|---|---|---|---|---|---|
| 1 | U6Synchronization | Very likely100% | 29.3 | 13%6 lecture hrs | Over-examinedexam 39% · syllabus 13% | Steady | 9 recurring9 total | |
| 2 | U7Consistency and Replication | Likely71% | 21 | 11%5 lecture hrs | Over-examinedexam 20% · syllabus 11% | Steady | 5 recurring5 total | |
| 3 | U1Introduction | Very likely100% | 7.9 | 13%6 lecture hrs | Balancedexam 10% · syllabus 13% | Steady | 3 recurring3 total | |
| 4 | U4Communication | Very likely86% | 8.3 | 16%7 lecture hrs | Under-examinedexam 10% · syllabus 16% | Steady | 2 recurring2 total | |
| 5 | U8Fault Tolerance | Very likely86% | 7.5 | 9%4 lecture hrs | Balancedexam 9% · syllabus 9% | Rising | 2 recurring2 total | |
| 6 | U2Architectures | Very likely100% | 5 | 13%6 lecture hrs | Under-examinedexam 7% · syllabus 13% | Steady | 2 recurring2 total | |
| 7 | U3Processes | Possible43% | 5 | 13%6 lecture hrs | Under-examinedexam 3% · syllabus 13% | Steady | 1 recurring1 total | |
| 8 | U5Naming | Possible43% | 5 | 11%5 lecture hrs | Under-examinedexam 3% · syllabus 11% | Steady | 1 recurring1 total |
Study smart, not hard
Drag the slider: studying the top 5 units in priority order covers ~88% of all observed marks.
- ~80% line
Lecture time vs exam marks
Where the exam pays more than the curriculum spends: ● lectures vs ● exam marks, as a share of the whole course. A long teal-leading bar = high-yield unit.