Syllabus
Course Description
An introduction to concurrent and parallel programming, with an emphasis on language constructs. Major topics include exceptions, coroutines, atomic operations, critical sections, mutual exclusion, semaphores, high-level concurrency, deadlock, interprocess communication, process structuring, shared memory and distributed architectures. Students will learn how to structure, implement, and debug concurrent programs.
[Note: Enrolment is restricted; see Note 1 above. Lab is not scheduled and students are expected to find time in open hours to complete their work. Offered: F,W] Prereq: CS 350 or SE 350; Computer Science students only
Course Source
Lessons: Parallel, Concurrent, and Distributed Programming in Java Specialization
Supplies:
Java Concurrency and Multithreading Tutorial
Core Concept
The following content based on : Concurrency vs Parallelism
Parallel Execution
Making progress on more than one task at the exact same time.
Concurrency
Making progress on more than one task - seemingly at the same time.
Parallel Concurrent Execution
Making progress on more than one task - seemingly at the same time - on more than one CPU.
Parallelism
Splitting a single task into subtasks which can be executed in parallel.
Issue of Concurrency
Thread Pool
If you need to execuate many tasks:
- You can assign each task with a specific Thread.
- You can assign all the tasks to a Thread Pool with pre-created Threads execute the tasks one by one.