UNIT 2-PART 2 (Threads)
UNIT 2-PART 2 (Threads)
• Types of parallelism
– Data parallelism – distributes subsets of the
same data across multiple cores, same
operation on each
– Task parallelism – distributing threads across
cores, each thread performing unique
operation
– CPUs have cores as well as hardware threads
– Consider Oracle SPARC T4 with 8 cores, and 8
hardware threads per core
Concurrency vs. Parallelism
Concurrent execution on single-core system:
• Many-to-One
• One-to-One
• Many-to-Many
Many-to-One