KK34302 & KK34803: Parallel Programming and Distributed Systems
Group Assignment (100 MARKS = 30% FROM YOUR COURSEWORK)
Sem 1: 2024/2025
Due Date: Friday 24 January 2025 at 5 PM.
Answer ALL questions.
Instructions:
• Work collaboratively to address the following technical questions.
• Use diagrams, charts, or formal notations to support your answers where applicable.
• Submit a professional report documenting your analysis and solutions.
• The rubric at the end outlines the grading criteria for all questions.
Question 1 (10 Marks)
Performance Analysis of Parallel Systems
An application runs on a distributed memory system with the following parameters:
• Input size N=106,
• Number of processors P=8,
• Latency = 10−4 seconds,
• Bandwidth = 103 bytes/second,
• CCR = 100.
1. Calculate the speedup and efficiency of the application. (5 marks)
2. Analyze the trade-offs between increasing N and P. (5 marks)
Question 2 (10 Marks)
Design Optimization in Distributed Architectures
A distributed system has a two-tier architecture with clients handling user interactions and a
server handling data processing. The current average response time is 1.5 seconds.
1. Propose a hybrid architecture to reduce the response time to under 1 second. Provide a
detailed diagram of your architecture. (6 marks)
2. Justify the changes with respect to middleware enhancements and fault tolerance. (4
marks)
Question 3 (10 Marks)
Fault Tolerance Strategy
A distributed file system replicates data across three nodes. Each node has a failure probability F
= 0.1.
1. Calculate the probability that data remains available under this setup. (5 marks)
2. Propose improvements to the replication mechanism to enhance availability, including
quorum-based protocols. (5 marks)
Question 4 (10 Marks)
Synchronization Challenges
In a shared memory system, four threads perform operations on a shared variable X:
• Thread 1 increments X.
• Thread 2 decrements X.
• Thread 3 reads X.
• Thread 4 writes a new value to X.
1. Identify potential race conditions and their impact. (5 marks)
2. Design a synchronization mechanism using mutexes or other locks to resolve the issues.
(5 marks)
Question 5 (10 Marks)
Middleware Efficiency in Message Passing
A distributed system uses middleware for synchronous message passing. The current throughput
is 500 messages per second.
1. Analyze the impact on throughput and latency when switching to an asynchronous
communication model. (5 marks)
2. Evaluate the trade-offs in terms of overhead and reliability. (5 marks)
Question 6 (10 Marks)
Memory Consistency Models
A shared-memory system runs a program where multiple threads update shared variables.
1. Compare a strong consistency model with a relaxed consistency model for this scenario.
(5 marks)
2. Evaluate the performance and implementation complexity of both models using a sample
workload. (5 marks)
Question 7 (10 Marks)
Distributed System Scalability
A peer-to-peer distributed system with hierarchical architecture has 100 nodes. The bisection
bandwidth is currently 500 Mbps.
1. Calculate the effect on bisection bandwidth when the number of nodes doubles. (5 marks)
2. Propose optimizations to maintain scalability as the number of nodes increases. (5 marks)
Question 8 (10 Marks)
Deadlock Avoidance
Consider a distributed system where processes P1, P2, and P3 require resources R1, R2, and R3.
1. Design a protocol to prevent deadlock using resource allocation graphs. (6 marks)
2. Illustrate the protocol with a state transition diagram. (4 marks)
Question 9 (10 Marks)
Cache Coherence in Shared Memory Systems
A shared-memory system uses a write-back cache coherence protocol. A workload involves
frequent writes to shared variables.
1. Calculate the number of cache invalidations for a given set of operations. (5 marks)
2. Suggest optimizations to reduce cache invalidations and their impact on performance. (5
marks)
Question 10 (10 Marks)
Resource Allocation in Distributed Systems
A cloud-based distributed system receives resource requests with varying priorities:
• Low priority: 40% of requests,
• Medium priority: 35% of requests,
• High priority: 25% of requests.
1. Design a resource allocation strategy to maximize resource utilization while minimizing
latency. (6 marks)
2. Perform a cost-benefit analysis for your proposed strategy. (4 marks)
Rubric
Question Criteria Marks and Description
Speedup and Efficiency 5: Accurate and well-presented. Minor errors: 4-3. Partial:
1
Calculations 2-1. Incorrect: 0.
5: Detailed and logical. Limited insight: 4-3. Basic
1 Trade-off Analysis
explanation: 2-1. Incorrect: 0.
Hybrid Architecture 6: Clear diagram and practical design. Minor flaws: 5-4.
2
Proposal Basic design: 3-2. Incorrect: 0.
4: Strong argument with examples. Minor gaps: 3-2.
2 Justification of Changes
Weak justification: 1. Incorrect: 0.
Data Availability 5: Correct calculation and explanation. Minor errors: 4-3.
3
Calculation Attempted but incorrect: 2-1. Missing: 0.
Replication Mechanism 5: Innovative and feasible solutions. Limited suggestions:
3
Improvements 4-3. Basic/unclear improvements: 2-1. Missing: 0.
5: Clear identification with impact analysis. Limited
Identification of Race
4 identification: 4-3. Attempted but incomplete: 2-1.
Conditions
Missing: 0.
Synchronization 5: Well-designed with performance considerations. Minor
4
Mechanism Design issues: 4-3. Basic mechanism: 2-1. Missing: 0.
Communication Model 5: Comprehensive metric-based analysis. Limited insight:
5
Impact Analysis 4-3. Basic attempt: 2-1. Incorrect: 0.
Overhead and Reliability 5: Well-argued with trade-offs. Minor flaws: 4-3. Partial
5
Evaluation explanation: 2-1. Missing: 0.
Comparison of 5: In-depth and specific. Limited depth: 4-3. Basic
6
Consistency Models overview: 2-1. Missing: 0.
Performance and 5: Logical and supported with examples. Limited
6
Complexity Analysis analysis: 4-3. Basic insight: 2-1. Missing: 0.
Bisection Bandwidth 5: Correct calculation with reasoning. Minor issues: 4-3.
7
Calculation Attempted but incorrect: 2-1. Missing: 0.
Scalability Optimization 5: Feasible and innovative solution. Limited feasibility: 4-
7
Proposal 3. Basic/unclear proposal: 2-1. Missing: 0.
Question Criteria Marks and Description
Deadlock Avoidance 6: Detailed and practical with diagrams. Minor gaps: 5-4.
8
Protocol Design Basic but incomplete: 3-2. Incorrect: 0.
4: Accurate and clear. Minor flaws: 3-2. Partial attempt:
8 State Transition Diagram
1. Missing: 0.
Cache Invalidation 5: Correct analysis with reasoning. Minor issues: 4-3.
9
Analysis Attempted but incorrect: 2-1. Missing: 0.
5: Well-supported with performance insights. Limited
9 Optimization Suggestions
suggestions: 4-3. Basic ideas: 2-1. Missing: 0.
Resource Allocation 6: Logical and efficient strategy. Minor gaps: 5-4. Basic
10
Strategy Design but incomplete: 3-2. Missing: 0.
4: Comprehensive and well-justified. Limited
10 Cost-Benefit Analysis
justification: 3-2. Partial analysis: 1. Missing: 0.