Introduction 2 Flashcards
What is Process-level parallelism?
Two seperate programs on two seperate cores
Can be single core software. Problem: increasing performance of one
What is Thread-level parallelism?
Collection of execution flows working together e.g. threads
What is Instruction Level Parallesim?
Compiler automatically parallelises a sequential stream of instructions.
Some of which out of order. Overall result same as sequential execution
ILP Advantages and Disadvantages
Advantages: No work on programmer, compiler does all the work
Disadvantages: Limited
How does Thread-Level Parallelism work?
Programmer divides the program into sequences of instructions run in parallel. Deterministic overall result regardless execution details.
TLP Advantages and Disadvantages
Advantages: general purpose, can generate large amount of paralleism
Disadvantages: due to scheduling no control of order, might be paraller or in any order
So we need synchronization
What is the main issue of TLP?
Data sharing between threads (more than one thread accessing the same variable)
Solution: synchronization
How is execution time calculated for threads on a single core?
Sum of each thread’s executiom time
How is execution time calculated for threads on multicores?
Run in parallel so ideally serial execution time/number of parallel threads. But threads can be waiting for each other to finish.
What is Data Paralleism?
Many array computations perform the same or very similar computation on all elements
Examples of data paralleism
- General: Matrix multiplication
- Graphics: Texture mapping
- Differential equations: Financial modelling, weather forecasting
Expain the complexity of Paralleism
Difficult, depends on program structure. Ranges from easy: regular paralleism with little or no data sharing, to hard: irregular with large amounts of mutliple-write data sharing