stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Multithreaded programming Flashcards | StudBud
Explore
/
Multithreaded programming
Multithreaded programming
19 terms
·
StudBud Administration
·
23 plays
Basics concepts in #multithreaded #programming using #threads and #openmp
Flashcards
19 cards
F
Practice quiz
P
Host live
L
Questions
19
Answers
1
In omp tasks,
firstprivate
variables must be initialized inside the task
True
False
2
A race condition occurs when the result depends on
whether threads exchange data
whether one or more threads are used
the timing of events
3
std::condition_variable must be used in conjunction with std::unique_lock<std::mutex>
It depends
No
Yes
Not sure
4
The Frontier supercomputer will be capable of
1.5 Teraflops
15 Teraflops
1.5 Exaflops
150 Teraflops
5
Frontier will use
AMD accelerators
NVIDIA accelerators
6
The United States owns ___ share of the performance of top supercomputers in the world
40
20
50
30
7
On a multi-processor, is it possible for two different threads to share memory?
Yes
No
8
On a shared memory machine, the bandwidth to memory is always the same for all cores
False
True
9
In general, the result of a floating-point reduction depends on the number of threads
No
Yes
10
OpenMP 5.0 provides ___ support for accelerator devices
full
no
partial
11
#pragma omp task
is typically preceded by
#pragma omp single
False
True
12
On a multi-processor, is it possible for two different processes to share memory?
No
Yes
13
#pragma omp parallel for
is a valid openmp directive
Yes
No
14
#pragma omp for schedule(guided)
uses ___ chunks of iterations
fixed size
varying size
15
A mutex deadlock may occur when
mutexes are locked in the same order
a mutex is used inside a critical region
multiple mutexes exist
mutexes are locked in different orders
16
A mutex ensures that ___ one thread can be in a critical region
at most
at least
exactly
17
What is one of the reasons behind the single-core performance plateau?
Market demand
Frequency and power
Number of cores
Number of transistors
18
When both are correct,
atomic
is preferred over
reduction
in a for loop
True
False
19
Critical section: piece of code in which concurrent access to ____ resources may lead to errors
local
private
shared
global