0% found this document useful (0 votes)
4 views

DistributedComputing(University) PartA

Uploaded by

subashri8711
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

DistributedComputing(University) PartA

Uploaded by

subashri8711
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

1.

Differences Between Synchronous and


Asynchronous Communication
• Synchronous Communication:
o Definition: Sender and receiver are
synchronized, and both must be ready for
the communication to happen.
o Buffering Strategy: Minimal buffering is
required as the message is transmitted
immediately.
o Examples: Real-time video calls, phone
calls.
o Advantages: Simple and fast when both
parties are available.
o Disadvantages: Requires both parties to be
active at the same time.
• Asynchronous Communication:
o Definition: Sender and receiver do not need
to be synchronized; the message can be
sent or received at different times.
o Buffering Strategy: Requires buffering to
store messages until the receiver retrieves
them.
o Examples: Emails, message queues.
o Advantages: Flexible as it does not require
simultaneous availability.
o Disadvantages: Delayed communication
and potential overhead for managing
buffers.
2. Role of Shared Memory Systems
Shared memory systems enable multiple processes
to communicate and share data.
• Roles:
1. Inter-process Communication (IPC):
Provides a mechanism for processes to
share data directly without using message-
passing.
2. Performance Improvement: Reduces
overhead caused by data transfer through
communication protocols.
3. Data Consistency: Ensures that all
processes have access to a consistent view
of shared data.
4. Synchronization: Facilitates process
synchronization using shared variables or
locks.

3. Scalar Time and Vector Time


• Scalar Time:
o Represents time using a single integer.
o Follows Lamport's logical clock, where
events are timestamped based on causality
(order of execution).
o Simple but does not capture concurrent
events accurately.
• Vector Time:
o Represents time using a vector of integers,
with each element corresponding to a
process.
o Captures the causality of events across
distributed processes, distinguishing
concurrent events.
o Provides a more detailed view of event
ordering compared to scalar time.

4. Relationship Between Two Independent Events


If events e1e_1e1 and e2e_2e2 occur independently
in different processes, the relationship between
them is concurrent.
• Explanation:
o Neither event causally influences the other.
o In terms of vector clocks, e1↛e2e_1
\nrightarrow e_2e1↛e2 and e2↛e1e_2
\nrightarrow e_1e2↛e1.

5. Deadlock Detection in Distributed Systems


• Methods:
1. Wait-For Graph (WFG): Models the system
as a graph where processes are nodes and
edges represent resource dependencies.
Cycles indicate deadlocks.
2. Probe Algorithm: Detects deadlocks by
sending probes across processes and
analyzing their responses.
3. Edge Chasing: Traces dependency chains
to identify cycles.
• Common Factor:
All methods rely on identifying cycles in
resource allocation or dependency graphs.

6. Benefits of the Chandy-Misra-Haas Algorithm


This algorithm is used for deadlock detection in
distributed systems under different models:
• AND Model:
o Requires all requested resources to be
available simultaneously for progress.
o Algorithm detects deadlocks by sending
probes and analyzing dependency chains
for cycles.
o Benefit: Efficient for systems with tightly
coupled dependencies.
• OR Model:
o Allows processes to proceed if any one of
the requested resources becomes
available.
o Benefit: Handles flexible resource
allocation while detecting deadlocks
accurately.

7. Checkpoint in Recovery Systems


• Definition: A checkpoint is a saved state of a
process or system at a specific point in time.
• Purpose: Used to restore the system to a
consistent state after a failure.
• Benefits:
1. Reduces recovery time by avoiding re-
execution from the beginning.
2. Minimizes data loss by saving intermediate
states.

8. Issues in Failure Recovery and Early Failure


Detection
• Issues:
1. Consistency: Ensuring data integrity across
processes during recovery.
2. Overhead: Increased storage and
processing costs for maintaining
checkpoints.
3. Fault Identification: Detecting the exact
point and cause of failure.
• Early Detection:
1. Heartbeat Mechanism: Periodic signals to
indicate active processes.
2. Timeouts: Identifying failed processes
based on unresponsiveness.
3. Error Logs: Analyzing logs for anomalies or
trends indicative of failure.

9. Virtualization and Its Importance in Large


Organizations
• Definition: Virtualization is the creation of
virtual versions of resources (e.g., servers,
storage, networks) using software.
• Importance:
1. Resource Utilization: Maximizes hardware
efficiency by running multiple virtual
systems on a single physical resource.
2. Cost Efficiency: Reduces hardware and
maintenance costs.
3. Scalability: Enables quick provisioning of
resources.
4. Disaster Recovery: Simplifies backup and
recovery by encapsulating entire systems.
10. Relation of Compute and Storage Services in
Cloud Environments
• Compute Services: Provide the processing
power required to execute applications (e.g.,
virtual machines, containers).
• Storage Services: Store data persistently,
offering options like block storage, file storage,
or object storage.
Relation:
• Compute services rely on storage for accessing
and managing application data.
• Storage is provisioned to meet the needs of
compute workloads.
• Together, they form the backbone of scalable
cloud architectures, supporting data-intensive
applications and workloads.

ARREAR:
1. Distinction Between Message Passing Systems
and Shared Memory Systems
Message
Shared Memory
Aspect Passing
Systems
Systems

Definition Processes Processes share


communicate a common
Message
Shared Memory
Aspect Passing
Systems
Systems
by exchanging memory space
messages over for
a network. communication
.
Explicit
Implicit
synchronizatio
Synchronizatio synchronization
n required
n using locks or
using
semaphores.
send/receive.
Messages sent Shared memory
Communicatio over as the
n Medium communication communication
channels. medium.
Higher due to Lower as
data transfer processes
Overhead
over the access memory
network. directly.
Message
Shared Memory
Aspect Passing
Systems
Systems
Limited to
Easier to scale
systems where
Scalability over distributed
shared memory
systems.
is accessible.
MPI (Message
Multithreading
Passing
Examples within a single
Interface),
system.
sockets.

2. Motivations for Distributed Systems


• Resource Sharing: Enable multiple systems
to share resources like files, printers, or
computational power.
• Scalability: Add systems to handle increasing
workloads.
• Reliability: Increase fault tolerance by
replicating data and functionality.
• Cost Efficiency: Utilize cost-effective
commodity hardware instead of expensive
centralized systems.
• Geographical Distribution: Support users and
resources spread across different locations.
• Performance: Divide tasks among systems to
reduce processing time.

3. Global State and Consistent Global State


• Global State:
o Represents the combined state of all
processes and communication channels
in a distributed system at a specific point
in time.
• Consistent Global State:
o A snapshot of the system where the
states of processes and channels are
mutually consistent.
o No message received in the snapshot is
sent after the snapshot's recorded state.
4. Limitations of Logical Clocks
• Logical clocks (e.g., Lamport clocks) have
these limitations:
1. Cannot Detect Concurrency: Cannot
differentiate between causally unrelated
concurrent events.
2. No Total Ordering: Do not establish a total
ordering of events across processes.
3. Assumes Reliable Communication: Fails
in unreliable communication systems
where messages may be lost.

5. Advantages and Limitations of Token-Based


Algorithms for Mutual Exclusion
• Advantages:
1. Efficiency: Single message per critical
section entry, reducing communication
overhead.
2. Fairness: Ensures that all processes
eventually access the critical section.
3. No Starvation: Processes will not be
indefinitely delayed.
• Limitations:
1. Token Loss: If the token is lost, it must be
regenerated, which adds complexity.
2. Single Point of Failure: Failure of the
process holding the token can disrupt the
system.
3. Complex Recovery: Restoring the system
to a valid state after failures is
challenging.

6. False Deadlock
• Definition: A false deadlock occurs when a
system incorrectly detects a deadlock that
does not actually exist.
• When It Occurs:
o In distributed systems due to delays or
inconsistencies in message delivery.
o Misinterpretation of intermediate states
as cyclic dependencies.
7. Issues in Failure Recovery
• Challenges:
1. State Consistency: Ensuring a consistent
state across all processes during
recovery.
2. Data Loss: Preventing loss of critical data
during failure.
3. System Overhead: Managing checkpoints
and recovery mechanisms increases
overhead.
4. Fault Identification: Accurately
identifying the point and nature of failure.
5. Concurrency: Handling concurrent
failures or dependent processes.

8. Advantages and Disadvantages of


Asynchronous Checkpointing
• Advantages:
1. Flexibility: Processes can save their state
independently without coordination.
2. Reduced Overhead: No need for
synchronization between processes
during checkpointing.
3. Scalability: Suitable for large-scale
systems.
• Disadvantages:
1. Complex Recovery: Restoring
consistency during recovery requires
complex rollback mechanisms.
2. Cascading Rollbacks: A failure in one
process may require multiple processes
to rollback.
3. Inconsistent Snapshots: Risk of capturing
inconsistent global states.

9. Virtualization in Cloud Computing


• Definition: Virtualization is the creation of
virtual resources (e.g., servers, networks,
storage) that abstract physical hardware.
• Purpose:
1. Allows multiple virtual machines (VMs) to
run on a single physical machine.
2. Facilitates resource allocation,
scalability, and isolation.

10. Characteristics of Cloud Computing


1. On-Demand Self-Service: Users can provision
resources automatically without human
intervention.
2. Broad Network Access: Accessible over the
internet via standard devices.
3. Resource Pooling: Multiple users share
pooled computing resources dynamically.
4. Scalability and Elasticity: Resources can
scale up or down based on demand.
5. Measured Service: Pay-as-you-go model,
where usage is monitored and billed.
6. Multi-Tenancy: Resources are shared among
multiple users with logical isolation.
7. Resilience: Fault tolerance with data
replication and backup.

You might also like