
C++ 20 (2a) New Features - Latches and Barriers
Interactive Video
•
Information Technology (IT), Architecture
•
University
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Read more
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary function of a latch in a multithreaded environment?
To synchronize the start of threads
To decrease the execution time of threads
To increment a counter
To ensure threads complete before proceeding
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does a barrier differ from a latch?
A barrier is not reusable
A barrier can only be used with one thread
A barrier is reusable and can synchronize multiple threads
A barrier does not block threads
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when the required number of threads reach a barrier's synchronization point?
All threads are unblocked
The barrier resets to zero
The counter is incremented
All threads are terminated
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a unique feature of a flex barrier?
It requires no initial value
It does not block threads
It allows runtime modification of the counter
It can only be used once
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In what scenario would you use 'arrive and drop' with a barrier?
When a thread needs to increment the counter
When a thread wants to block indefinitely
When a thread does not want to wait at the synchronization point
When a thread needs to terminate
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?