Areeba Tahir
BS Artificial Intelligence (6th Semester)
COMSATS University Islamabad, Lahore Campus
Parallel and Distributed Computing (PDC)
Instructor: Akhzar Nazir
This project demonstrates Sequential, Parallel, and Distributed image processing using Python.
It showcases how parallelism and distributed computing can significantly reduce the total processing time for common image preprocessing tasks like resizing and watermarking.
| Approach | Workers / Nodes | Time (s) | Speedup |
|---|---|---|---|
| Sequential | 1 | 1.92 | 1.00Γ |
| Parallel | 2 workers | 1.05 | 1.56Γ |
| Parallel | 4 workers | 0.48 | 3.99Γ |
| Distributed Sim | 2 nodes | 1.40 | 1.37Γ |
β
4 Parallel Workers gave the lowest execution time (β 0.48 seconds)
and the highest speedup (β 3.99Γ) over sequential processing.
Beyond 4 workers, performance gain reduced due to CPU overhead and task management cost.
Parallelism greatly improved performance by utilizing multiple CPU cores simultaneously.
However, several bottlenecks limited perfect scalability:
- Disk I/O Overhead: Reading/writing image files still occurs sequentially.
- Python GIL: Affects thread-based parallelism (though multiprocessing bypasses it).
- Load Imbalance: Some processes may have slightly more work than others.
- Communication Cost: Distributed nodes require synchronization and data transfer.
Despite these bottlenecks, parallel and distributed approaches clearly provided measurable performance gains over sequential execution.
| Metric | Sequential | Parallel (4 Workers) | Distributed (2 Nodes) |
|---|---|---|---|
| Execution Time (s) | 1.92 | 0.48 | 1.40 |
| Speedup | 1.00Γ | 3.99Γ | 1.37Γ |
| Best Config | β | β 4 Workers | β |