Multicore02 1 Updated
Multicore02 1 Updated
Introduction to Multicore
Computing
Bong-Soo Sohn
Associate Professor
School of Computer Science and Engineer-
ing
Chung-Ang University
Multicore Processor
A single computing component with two or
more independent cores
Core (CPU): computing unit that reads/executes program instruc-
tions
Ex) dual-core, quad-core, hexa-core, octa-core, …
share cache or not
symmetric or asymmetric
Ex) intel i9-13900K (link)
Intel i9-13900K
L3 cache (shared
Apple CPUs: M1 (2021) , M3 (2023)
CPU clock rate: 3.2GHz (M1) , 4.05GHz
(M3)
Apple M4 CPU (2024)
Apple Unified Memory
Unified memory
CPU, GPU, NPU share memory on a single
chip
+: efficient
-: cannot be changed/replaced after produc-
Multicore Processor
Multiple cores run multiple instructions at
the same time (concurrently)
OpenCL
Open Standard parallel programming platform
Parallel Applications
Image and video processing
Encoding, editing, filtering
3D graphics (rendering, animation)
3D gaming
Simulation
e.g. protein folding, climate modeling
Machine learning, deep learning
Thread/Process
Both
Independent sequence of execution
Process
A process with two
run in separate memory space threads of execution
Thread on a single processor
Multithreaded Program
a program running with multiple threads that is executed
simultaneously
What is Parallel Comput-
ing?
Parallel computing
using multiple processors in parallel to solve problems
more quickly than with a single processor
Examples of parallel machines:
A cluster computer that contains multiple PCs com-
bined together with a high speed network
A shared memory multiprocessor by connecting
multiple processors to a single memory system
A Chip Multi-Processor (CMP) contains multiple pro-
cessors (called cores) on a single chip
Concurrent execution comes from desire for per-
formance; unlike the inherent concurrency in a
multi-user distributed system
Parallelism vs Concurrency
Parallel Programming
Using additional computational resources to
produce an answer faster
Problem of using extra resources effectively?
Example
summing up all the numbers in an array with mul-
tiple n processors
Parallelism vs Concurrency
Concurrent Programming
Correctly and efficiently controlling access by
multiple threads to shared resources
Problem of preventing a bad interleaving of
operations from different threads
Example
Implementation of dictionary with hashtable
operations insert, update, lookup, delete occur simulta-
neously (concurrently)
Multiple threads access the same hashtable
Web Visit Counter
Parallelism vs Concurrency
Often Used interchangeably
Distributed Memory
MPI
Distributed/Shared Memory
Hybrid (MPI+OpenMP)
Parallel Computing
all processors may have access to a shared memory to
exchange information between processors.
more tightly coupled to multi-threading
Distributed Computing
multiple computers communicate through network
each processor has its own private memory
(distributed memory).
executing sub-tasks on different machines and then
merging the results.
Parallel Computing vs. Distributed
Computing
Distributed Computing
Parallel Computing
No Clear Distinction
Cluster Computing vs. Grid Com-
puting
Cluster Computing
a set of loosely connected computers that work together
so that in many respects they can be viewed as a single
system
good price / performance
memory not shared
Grid Computing
federation of computer resources from multiple locations
to reach a common goal (a large scale distributed sys-
tem)
grids tend to be more loosely coupled, heterogeneous,
and geographically dispersed
Cluster Computing vs. Grid Com-
puting
Example of Grid Computing (Fold-
ing@Home)
Example of Grid Computing (Fold-
ing@Home)
Cloud Computing