PDC 50 Marks Detailed Notes Final
PDC 50 Marks Detailed Notes Final
Synchronous Execution:
- All processes proceed step-by-step in lockstep using a global clock.
- Events are tightly coordinated.
- Easy to reason about and simulate.
- Example: Time-division multiplexing in hardware.
Asynchronous Execution:
- No global clock; processes execute at independent speeds.
- Communication delays and execution speeds can vary.
- Realistic model for distributed systems (e.g., Internet, cloud).
- More complex to analyze.
Summary: Synchronous = predictable but unrealistic. Asynchronous = realistic but harder to manage.
Parallel and Distributed Computing (PDC) - 50 Marks Syllabus Notes
Purpose:
- To model and reason about distributed executions and communication.
Models:
1. **Processes (nodes):** Perform computation.
2. **Events:** Local actions within a process.
3. **Channels (edges):** Represent message-passing links.
Key Concepts:
- **Happened-before () relation:** Defines event ordering.
- **Partial ordering of events:** Not all events can be totally ordered.
- **Communication model:** Reliable/unreliable, synchronous/asynchronous.
Causality:
- Events in distributed systems may affect each other.
- If A causes B, then A must be observed before B.
Logical Clocks:
1. **Lamport Clock:**
- Scalar values.
- Ensures that if A B, then LC(A) < LC(B).
- Doesnt capture concurrency.
2. **Vector Clock:**
- Vector of timestamps.
- Captures causality and concurrency.
- If VC(A) < VC(B), then A happened before B.
Common Algorithms:
1. **Spanning Tree Construction:**
- Builds minimal structure for message routing.
- Example: Breadth-First Search Tree.
Applications:
- Routing protocols, multicast trees, network topology.
Distributed graph algorithms are designed to work using only local information.
Parallel and Distributed Computing (PDC) - 50 Marks Syllabus Notes
Group Communication:
- Multiple receivers in a group.
- Requires consistency and reliability.
Essential for building reliable, consistent distributed systems (e.g., databases, collaborative tools).
Parallel and Distributed Computing (PDC) - 50 Marks Syllabus Notes
Election Algorithms:
1. **Bully Algorithm:** Highest-ID process becomes coordinator.
2. **Ring Algorithm:** Uses a logical ring for leader selection.
Barrier Synchronization:
- Ensures all processes reach a certain point before continuing.
Timeout-Based Coordination:
- Detect failures using timeouts.
Quorum-Based Access:
- Read/write allowed only if a quorum (majority) agrees.
Middleware Support:
- Tools like ZooKeeper help with coordination, leader election, etc.
Replication:
- Multiple copies of data to improve reliability and performance.
Consistency Models:
1. **Strong:** Latest write is always seen.
2. **Sequential:** Operations appear in the same order to all.
3. **Causal:** Related updates seen in order.
4. **Eventual:** All replicas eventually become consistent.
Replication Techniques:
- **Primary-Backup:** One node handles all writes.
- **Multi-Master:** Many nodes accept updates; conflicts handled separately.
- **Quorum:** Requires overlap between read/write operations.
CAP Theorem:
- Can't simultaneously guarantee Consistency, Availability, Partition tolerance.
Goal:
- Capture a consistent state of all processes and channels.
Applications:
- Deadlock detection, checkpointing, consistent recovery.
Definition:
- A system that recovers to a legal state from any arbitrary condition.
Properties:
1. **Convergence:** Eventually reaches correct state.
2. **Closure:** Remains correct unless more faults occur.
Examples:
- Token ring stabilization, clock synchronization.
Goal:
- Ensure system continues working correctly despite failures.
Types of Failures:
1. Process failure (crash, omission, Byzantine).
2. Communication failure (loss, delay, duplication).
Mechanisms:
- **Acknowledgments and Retransmissions.**
- **Replication and Checkpointing.**
- **Consensus Protocols** (Paxos, Raft).
- **Failure Detectors.**