Top 150+ Solved Muli-core Architectures and Programming MCQ Questions Answer

From 46 to 60 of 120

Q. What are Spinlocks?

a. CPU cycles wasting locks over critical sections of programs

b. Locks that avoid time wastage in context switches

c. Locks that work better on multiprocessor systems

d. All of the mentioned

  • d. All of the mentioned

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. The signal operation of the semaphore basically works on the basic _______system call.

a. continue()

b. wakeup()

c. getup()

d. start()

  • b. wakeup()

Q. If the semaphore value is negative ____________.

a. its magnitude is the number of processes waiting on that semaphore

b. it is invalid

c. no operation can be further performed on it until the signal operation is performed on it

d. none of the mentioned

  • a. its magnitude is the number of processes waiting on that semaphore

Q. Which directive must precede the directive: #pragma omp sections (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. Within a parallel region, declared variables are by default ________ .

a. Private

b. Local

c. Loco

d. Shared

  • d. Shared

Q. ___________________ initializes each private copy with the corresponding valuefrom the master thread.

a. Firstprivate

b. lastprivate

c. nowait

d. Private (OpenMP) and reduction.

  • a. Firstprivate

Q. The ______________ specifies that the iterations of the for loop should beexecuted in parallel by multiple threads.

a. Sections construct

b. for pragma

c. Single construct

d. Parallel for construct

  • b. for pragma

Q. _______________ Function returns the number of threads that are currentlyactive 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. A ____________ in OpenMP is just some text that modifies a directive.

a. data environment

b. clause

c. task

d. Master thread

  • b. clause
Subscribe Now

Get All Updates & News