Laboratory materials, lecture notes, and homework assignments for a comprehensive study of parallel and concurrent computing paradigms using Python.
This course provides a rigorous introduction to parallel and concurrent programming, progressing from foundational Python constructs to advanced distributed systems. Students build a mental model for parallelism through hands-on exploration of threading, multiprocessing, asynchronous I/O, synchronization primitives, and containerized deployment. The curriculum bridges theory and practice: each concept is illustrated with executable examples, real-world analogies, and progressively complex assignments culminating in a Monte Carlo π estimation project and the classic Dining Philosophers problem.
| Course Code | CENG 5024 |
| Course Title | Parallel Programming |
| Instructor | Assoc. Prof. Dr. Bora Canbula |
| University | Manisa Celal Bayar University |
| Department | Computer Engineering |
| Semester | 2023 |
| Language | English / Python 3.8+ |
| Prerequisites | Data Structures, Basic Operating Systems Knowledge |
| Week | Topic | Contents |
|---|---|---|
| 01 | Course Introduction | Syllabus, parallel computing overview, Flynn's taxonomy |
| 02 | Python Data Structures | Lists, tuples, dictionaries, sets, sequences, list comprehensions |
| 03 | Functions & Decorators | Function annotations, decorators, closures, higher-order functions |
| 04 | Coroutines & Async/Await | async/await syntax, generators vs coroutines, event loop internals |
| 05 | Async Context Managers | Awaitable classes, async context managers, task orchestration with asyncio |
| 06 | Async Web Frameworks | FastAPI vs Flask, synchronous vs asynchronous REST APIs, load testing with locust |
| 07 | Threading | Creating threads, daemon threads, Monte Carlo π estimation with threading |
| 08 | GIL & Docker | Global Interpreter Lock, no-GIL Python, race conditions, container fundamentals |
| 09 | Midterm Exam | Written examination covering weeks 01–08 |
| 10 | Midterm Solutions | Problem walkthrough, common pitfalls, performance analysis |
| 11 | Dining Philosophers | Thread synchronization, deadlock, lock ordering, resource hierarchy |
| 12 | Multiprocessing | Process creation, IPC (queues, pipes, shared memory), multi-container orchestration |
The course is structured across three conceptual tiers — each week builds deliberately on the last:
┌────────────────────────────────────────────────────────────┐
│ 🧱 FOUNDATIONS (Weeks 01–03) │
│ Python data structures → functions → decorators │
│ └─ Establishes the language fluency required for all │
│ subsequent parallel constructs. │
├────────────────────────────────────────────────────────────┤
│ ⚙️ CONCURRENCY MODELS (Weeks 04–08) │
│ Coroutines → async context managers → async web → │
│ threading → GIL & Docker │
│ └─ Contrasts cooperative (async) and preemptive (thread) │
│ multitasking; introduces isolation via containers. │
├────────────────────────────────────────────────────────────┤
│ 🏁 SYNCHRONIZATION & DISTRIBUTION (Weeks 09–12) │
│ Midterm → solutions → Dining Philosophers → │
│ multiprocessing & IPC │
│ └─ Applies everything to classic concurrency problems │
│ and multi-process architectures with shared nothing. │
└────────────────────────────────────────────────────────────┘
- Python 3.8+ — some exercises require Python 3.8 features (assignment expressions,
asyncioimprovements) - Git — for cloning and homework submission
- Docker (optional) — for containerized experiments in Weeks 08 & 12
git clone https://github.com/canbula/ParallelProgramming.git
cd ParallelProgramming
# Jump to a specific week
cd Week07
python creating_thread.pypip install -r Week08/requirements.txt # GIL & Docker week
pip install -r Week12/requirements.txt # Multiprocessing weekcd Week08
./build-docker-image.sh
./start-a-container.shSolutions are placed in WeekXX/hw/ directories. Each submission is automatically tested via GitHub Actions — check the badge status below.
| Assignment | CI Status |
|---|---|
| Variable Types & Sequences | |
| Functions & Decorators | |
| Coroutines | |
| Monte Carlo π Generator |
| Resource | Link |
|---|---|
| 📄 Lecture Notes | LectureNotes.pdf — comprehensive PDF updated weekly |
| 🎥 YouTube Playlist | Parallel Programming 2021 — supplementary lectures covering threading through distributed computing |
| 📖 GitHub Wiki | Course Wiki — supplementary materials, FAQ, and reference guides |
| 🗣 Issue Tracker | Report a bug or suggest an improvement |
| 🤝 Contributing | See CONTRIBUTING.md for guidelines |
| 📋 Pull Request Template | pull_request_template.md |
ParallelProgramming/
├── Week01/ # Syllabus, course overview
├── Week02/ # Python data structures
├── Week03/ # Functions, annotations, decorators
├── Week04/ # Coroutines, async/await
├── Week05/ # Async context managers
├── Week06/ # Web frameworks (Flask ↔ FastAPI), async PG
│ └── hw/ # Student π-estimation submissions
├── Week07/ # Threading, Monte Carlo π
├── Week08/ # GIL experiments, Docker
├── Week09/ # Midterm exam
├── Week10/ # Midterm solutions
├── Week11/ # Dining Philosophers
├── Week12/ # Multiprocessing, IPC
├── .github/workflows/ # CI pipelines for automated homework testing
├── LectureNotes.pdf # Full-course lecture notes
├── homework.md # Homework assignment descriptions
├── LICENSE # MIT License
└── README.md # This file
Distributed under the MIT License. See LICENSE for more information.
Built with ❤️ for the Computer Engineering students of Manisa Celal Bayar University