0% found this document useful (0 votes)
4 views3 pages

Expanded Distributed Systems Answers

Notes Expanded_Distributed_Systems_Answers

Uploaded by

e1062240022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Expanded Distributed Systems Answers

Notes Expanded_Distributed_Systems_Answers

Uploaded by

e1062240022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

5-MARK QUESTIONS (SHORT ANSWERS)

Q1. Explain tightly coupled and loosely coupled systems.


Tightly coupled systems, also known as parallel systems, are characterized by multiple
processors sharing a common memory and a single operating system. These processors
are interconnected with a high-speed communication bus. In such systems, processes run
under the same control, and communication among them is very fast since it is via shared
memory. Advantages of tightly coupled systems include faster communication, easier data
sharing, and better performance for computational tasks. However, they are less
fault-tolerant because failure of one processor or the shared memory can crash the
system. Loosely coupled systems, often called distributed systems, consist of multiple
independent computers connected by a network. Each system has its own local memory
and runs its own OS. These systems communicate via message passing. Loosely coupled
systems are more scalable and fault-tolerant. If one node fails, others can continue
functioning. They are widely used in real-world distributed applications such as cloud
computing, web services, and enterprise systems.

Q2. Explain Lamport's Logical Clock concept.


In distributed systems, there is no global clock, making it difficult to determine the order of
events. Leslie Lamport introduced the concept of logical clocks and the "happened-before"
relation to provide a partial ordering of events. The 'happened-before' (→) relation defines
that: - If event A occurs before event B in the same process, then A → B. - If event A is the
sending of a message and event B is its receipt, then A → B. - The relation is transitive.
Lamport proposed maintaining a logical clock at each process. The rules are: 1. Each
process increments its clock before each event. 2. A message includes the sender’s clock
value. 3. The receiving process sets its clock to max(local, received) + 1. These logical
clocks can help determine a consistent order of events across processes. However,
Lamport clocks do not provide total ordering unless tie-breaking is added.

Q3. Explain shared data and message passing approaches of IPC.


Inter-process communication (IPC) is the mechanism that allows processes to
communicate and synchronize. 1. Shared Data Approach: - Processes share a common
memory region. - Communication happens by writing and reading shared variables. -
Synchronization is critical, using semaphores, locks, or monitors to avoid race conditions
and ensure data consistency. - This approach is efficient but not suitable for distributed
systems where memory is not shared. 2. Message Passing Approach: - Processes
communicate by sending and receiving messages. - No shared memory is required,
making it ideal for distributed environments. - Communication can be synchronous or
asynchronous. - Message passing provides better isolation and is easier to debug, but
may incur performance overhead due to serialization and transmission delays. Each
method has its advantages and limitations and is chosen based on system architecture
and application requirements.

Q4. Explain Happened-before relation of Event Ordering.


The 'happened-before' relation (denoted as →) is a fundamental concept introduced by
Lamport to describe the partial ordering of events in distributed systems. It is used to
understand causality among events when no global clock exists. Definition: - If two events
A and B occur in the same process, and A occurs before B, then A → B. - If A is the
sending of a message and B is the receipt of that message, then A → B. - If A → B and B
→ C, then A → C (transitive closure). This relation helps identify which events could have
influenced others. It forms the basis of logical clocks, causal ordering, and consistency
protocols in distributed systems. Events that are not related by → are considered
concurrent, meaning there is no causal relationship between them.

Q5. Explain the workstation server model and its advantages.


The workstation-server model is a distributed computing architecture where multiple user
workstations (clients) access resources or services from dedicated servers. The servers
provide services such as file storage, printing, database management, and authentication.
In this model: - Clients send requests over the network. - Servers process the requests
and return responses. - The client-server interaction may be synchronous or
asynchronous. Advantages: - **Resource Sharing**: Centralized servers allow multiple
clients to share resources like files and printers. - **Scalability**: Servers can be upgraded
or added to meet growing demand. - **Fault Isolation**: Server failure doesn't crash the
entire system. - **Security & Maintenance**: Easier to implement centralized security and
perform updates. This model is widely used in enterprise environments and forms the
basis for web applications and cloud computing platforms.
10-MARK QUESTIONS (LONG ANSWERS)

Q1. Explain CAP theorem and trade-offs between consistency, availability


and partition-tolerance.
The CAP theorem, proposed by Eric Brewer, states that it is impossible for a distributed
system to simultaneously provide all three of the following guarantees: 1. **Consistency
(C)**: All nodes see the same data at the same time. 2. **Availability (A)**: Every request
receives a (non-error) response—even if some nodes are down. 3. **Partition Tolerance
(P)**: The system continues to operate despite arbitrary partitioning due to network
failures. In the presence of a network partition (which is inevitable in large distributed
systems), the system must choose between consistency and availability. **Trade-offs**: -
**CP Systems** (Consistency + Partition Tolerance): Ensure data correctness, but may
become unavailable during partitions. Example: HBase. - **AP Systems** (Availability +
Partition Tolerance): Serve requests even during network failures, but risk data
inconsistency. Example: CouchDB. - **CA Systems** (Consistency + Availability): Only
feasible when there's no partition—practically impossible in distributed environments.
**Conclusion**: Designers must choose the appropriate model based on the application.
Financial systems may prioritize consistency (CP), while social media apps may prefer
availability (AP).

You might also like