Professional Documents
Culture Documents
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
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
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
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
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
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
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
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.