Lecture 2 Flashcards
What’s the point of parallel computing
Distributing the workload across multiple processors or cores, the overall computational power is increased.
Parallelism vs concurrency
Parallel computing focuses on executing multiple tasks simultaneously on multiple processors or cores to improve performance and solve larger computational problems efficiently.
Concurrency deals with managing and coordinating multiple tasks or processes, often within a single processor, to enhance responsiveness and resource utilisation.
Task vs Data parallelism
Task: Different processors or cores work on different tasks concurrently.
Data: Distributing the data across multiple processors or cores and performing the same operation on each subset of the data concurrently.
Shared memory vs distributed memory
Shared memory: all processors have access to a common memory address space.
Distributed memory: all processors have their own private memory space.
Concurrent vs parallel vs distributed computing
Concurrent - a program is one in which multiple tasks can be in progress at any instant.
Parallel - a program is one in which multiple tasks cooperate closely to solve a problem.
Distributed - a program may need to cooperate with other programs to solve a problem.
What are the two main parts of a CPU?
Control unit - responsible for deciding which instruction in a program should be executed (the boss).
ALU - executing the logic (the worker).
What is a process?
Instance of a program in execution
What is a thread?
Contained within processes. Allows programmers to divide their programs into independent tasks.
A light-weight process.
SPMD?
Single program multiple data
SPMD program consists of a single executable that can behave as if it were multiple different programs through the use of conditional branches.
If (im thread process i) do this; else do that;
What’s MPI?
Message passing interface.
Standard communication for distributed memory systems.
Basically asynchronous (blocking and non-blocking).
Basic comms primitives do not inherently give reliable delivery but can be defined to cope with it (e.g. transfer-acknowledge vs request-transfer-acknowledge)
SPMD model (all tasks run the same program)