You are on page 1of 4

Please login to submit answers

1. Which of the following is a primitive synchronization construct that is used to prevent deadlocks?

This is a multiple choice question. Please select your choice and click on "Submit".

a b c d

Semaphores Locks Monitor test&set

2. What is the minimum number of elements of matrix A that should be given to each of the N processors, if two matrices A(2*N, N) and B(N, 2*N) are multiplied in that order?

This is a multiple choice question. Please select your choice and click on "Submit".

a b c d

N 2N N+1 N^2

3. Which of the following sorting algorithm is the best to parallelize on a shared memory multiprocessor system?

This is a multiple choice question. Please select your choice and click on "Submit".

a b c d

Bubble Sort Selection Sort Insertion Sort Merge Sort

4. What is the potential speedup of a program limited by?

This is a multiple choice question. Please select your choice and click on "Submit".

a b c d

Number of Processors Extent of Parallelism Execution time of the sequential portion Amount of Synchronization

5. If N processors are finding the minimum of 3N numbers, how many comparisons will be needed in total?

This is a multiple choice question. Please select your choice and click on "Submit".

a b c d

N^2 3N-1 N + N/2 + N/4 + .... + 1 2N

6. How many tasks should be created to solve quick sort if the array of size N is reverse sorted? (O(.) denotes the asymptotic complexity of the number of tasks).

This is a multiple choice question. Please select your choice and click on "Submit".

a b c d

O(1) O(N) O(N^2) O(sqrt(N))

7. What is the minimum number of steps that will be required if a matrix (N*N) is divided into smaller chunks of size K*K on each processor to compute the total sum of elements? ([x] denotes the Greatest Integer Function).

This is a multiple choice question. Please select your choice and click on "Submit".

b c d

[N^2/K^2] [N/K] + 1 [N^2/K^2] + 1

8. Which of the following cannot be reduced by parallelizing programs?

This is a multiple choice question. Please select your choice and click on "Submit".

a b c d

critical section time execution time synchronization time sequential portion time

9. What is the maximum amount of cycles it will take N threads (id=1, 2, ...) to finish the following subroutine: Shared: lock L int A[N] Private: int mysum Code: sub compute_partial_sum{ process_id=get_my_id() L.lock() for i=0; i<process_id; i++ mysum+=A[i] L.unlock() Assume each simple instruction takes one cycle. This is a multiple choice question. Please select your choice and click on "Submit".

a b c d

N+2 N*(N-1)/2 N/2 + N^2/2 Cannot be predicted

10. Choose the best algorithm that is parallelizable for the construction of a Forest on an unweighted disconnected graph.

This is a multiple choice question. Please select your choice and click on "Submit".

a b c d

Kruskal's algorithm Prim's algorithm Depth First Search Dijkstra's algorithm

11. How many threads are required to complete a 5-way merge sort of 10000000 integers, where the sub-array is sorted using insertion sort if it goes below 1000? Assume every basic operation takes 1 unit time and thread creation time takes 20 units and the target machine has 1024 cores.

You might also like