Top 80+ Solved Multi-core processors MCQ Questions Answer
Q. What is the main disadvantage of spinlocks?
a. they are not sufficient for many process
b. they require busy waiting
c. they are unreliable sometimes
d. they are too complex for programmers
Q. Here, w1 and w2 have shared variables, which are initialized to false. Which one of the following statements is TRUE about the above construct?
a. it does not ensure mutual exclusion
b. it does not ensure bounded waiting
c. it requires that processes enter the critical section in strict alternation
d. it does not prevent deadlocks but ensures mutual exclusion
Q. The signal operation of the semaphore basically works on the basic system call.
a. continue()
b. wakeup()
c. getup()
d. start()
Q. (not necessarily immediately)?
a. . #pragma omp section
b. . #pragma omp parallel
c. . none
d. . #pragma omp master
Q. When compiling an OpenMP program with gcc, what flag must be included?
a. . -fopenmp
b. . #pragma omp parallel
c. . –o hello
d. . ./openmp
Q. program, i.e., each thread executes the same code.
a. . parallel
b. . section
c. . single
d. . master
Q. code of functions that are called (directly or indirectly) from within the parallel region.
a. . lexical extent
b. . static extent
c. . dynamic extent
d. . none of the above
Q. The specifies that the iterations of the for loop should be executed in parallel by multiple threads.
a. . sections construct
b. . for pragma
c. . single construct
d. . parallel for construct
Q. active in the parallel section region.
a. . omp_get_num_procs ( )
b. . omp_get_num_threads ( )
c. . omp_get_thread_num ( )
d. . omp_set_num_threads ( )
Q. The size of the initial chunksize .
a. . total_no_of_iterations / max_threads
b. . total_no_of_remaining_iterations / max_threads
c. . total_no_of_iterations / no_threads
d. . total_no_of_remaining_iterations / no_threads
Q. parallel architectures affect parallelization?
a. . performance
b. . latency
c. . bandwidth
d. . accuracy
Q. global_count += 5;
a. . 4 instructions
b. . 3 instructions
c. . 5 instructions
d. . 2 instructions