Top 80+ Solved Multi-core processors MCQ Questions Answer

From 31 to 45 of 61

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

  • b. they require busy waiting

Q. at any moment (the mutex being initialized to 1)?

a. 1

b. 2

c. 3

d. none of the mentioned

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

  • d. it does not prevent deadlocks but ensures mutual exclusion

Q. (not necessarily immediately)?

a. . #pragma omp section

b. . #pragma omp parallel

c. . none

d. . #pragma omp master

  • a. . #pragma omp section

Q. When compiling an OpenMP program with gcc, what flag must be included?

a. . -fopenmp

b. . #pragma omp parallel

c. . –o hello

d. . ./openmp

  • a. . -fopenmp

Q. program, i.e., each thread executes the same code.

a. . parallel

b. . section

c. . single

d. . master

  • a. . parallel

Q. they would be in serial program.

a. . nowait

b. . ordered

c. . collapse

d. . for loops

  • b. . ordered

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

  • c. . dynamic extent

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

  • b. . for pragma

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 ( )

  • b. . omp_get_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

  • a. . total_no_of_iterations / max_threads

Q. parallel architectures affect parallelization?

a. . performance

b. . latency

c. . bandwidth

d. . accuracy

  • c. . bandwidth

Q. global_count += 5;

a. . 4 instructions

b. . 3 instructions

c. . 5 instructions

d. . 2 instructions

  • c. . 5 instructions
Subscribe Now

Get All Updates & News