Distributed Systems Exam Questions
and Answers
1. What is a distributed system?
A distributed system is a collection of independent computers that appear to the user as a
single system. These systems are connected over a network and collaborate to achieve a
common goal, often involving resource sharing, fault tolerance, and scalability.
2. What are the key characteristics of a distributed system?
Key characteristics of a distributed system include:
- Concurrency: Multiple processes run simultaneously.
- Scalability: The system can grow to handle more users or tasks.
- Fault Tolerance: The system continues to operate despite failures.
- Transparency: The system hides complexity from users.
- Openness: The system is built using standard protocols.
- Resource Sharing: Resources like data and hardware are shared.
- Heterogeneity: The system consists of different hardware, software, and protocols.
- Synchronization: Coordination of processes to ensure consistency.
3. What is the FLP Impossibility Theorem?
The FLP Impossibility Theorem states that in an asynchronous distributed system with
process crashes, it is impossible to guarantee consensus (agreement) among processes. This
result highlights the difficulty of achieving reliable communication in systems that involve
failures and network delays.
4. Explain the CAP Theorem.
The CAP Theorem states that in a distributed system, you can achieve at most two of the
following three properties:
- Consistency: All nodes have the same data at any given time.
- Availability: Every request gets a response, even if some nodes are down.
- Partition Tolerance: The system works even when network partitions occur.
A system can only choose two out of these three properties to optimize.
5. What are the differences between full servers and stateless servers?
Full (stateful) servers remember client interactions, maintaining session data (e.g., login
state), while stateless servers do not store client data between requests, making them
simpler and easier to scale, but requiring more data to be sent with each request.
6. What is Amdahl's Law?
Amdahl's Law describes the potential speedup of a system when only part of it can be
parallelized. It states that the speedup is limited by the portion of the system that cannot be
parallelized. The formula is:
Speedup = 1 / ((1 - P) + P/N)
Where P is the parallelizable portion, and N is the number of processors.
7. What is Remote Procedure Call (RPC)?
A Remote Procedure Call (RPC) allows a program to execute a procedure on a remote server
as if it were a local function. The calling program sends a request to the remote system,
which processes the request and returns the result.
8. What is mutual exclusion in distributed systems?
Mutual exclusion ensures that only one process can access a shared resource at a time to
avoid conflicts. In distributed systems, this is achieved through algorithms like Lamport’s
algorithm, Ricart-Agrawala, or token-based methods.
9. What is the difference between a client-server model and a peer-to-
peer model?
In the client-server model, clients request services from a central server. In the peer-to-peer
model, all nodes are equal and can act as both clients and servers, sharing resources directly
with each other.
10. Explain the concept of fault tolerance in distributed systems.
Fault tolerance is the ability of a distributed system to continue functioning even when one
or more of its components fail. It is achieved through redundancy, error detection, and
recovery mechanisms, such as replication and consensus protocols.