PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which set of variables should you select?

You are designing a parallel algorithm for an OpenMP application. You write the following pseudocode to represent the sequential logic of the algorithm. (Line numbers are included for reference only.)

01 do i = 1, m
02 do j = 1, n
03 x = i/real(m)
04 y = j/real(n)
05 depth[j, i] = calculate_val(x, y)
06 enddo
07 enddo

You need to identify the variables that must be declared as private variables to correctly parallelize the algorithm. Which set of variables should you select?

Which two actions should you perform?

You design an application that processes large amount of user data. The application consists of multiple producer and consumer threads. All threads share a single task queue. You write the following pseudocode. (Line numbers are included for reference only.)

01 task_available = 0; // shared variable
02 Producer_Thread:
03 inserted = 0 // private
04 while (!done()) {
05 inserted = 0;
06 create_task(my_task); //private
07 while (inserted == 0) {
08 if (task_available == 0) {
09 insert_into_queue(my_task);
10 task_available = 1;
11 inserted = 1;
12 }
13 }
14 }
15 end Producer_Thread
16 Consumer_Thread:
17 extracted = 0; // private
18 while (!done()) {
19 extracted = 0;
20 while (extracted == 0) {
21 if (task_available == 1) {
22 extract_from_queue(my_task);
23 task_available = 0;
24 extracted = 1;
25 }
26 }
27 }
28 process_task(my_task);
29 end Consumer_Thread

You need to ensure that multiple instances of the producer and consumer threads can run without deadlocks.
Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two.)

What should you do?

You review the design of a module of an online banking system. The module will provide real-time statistics related to payments made by the users. The module must support 1,000 concurrent users. A new instance named Thread1 is created for every user who accesses the banking system. The following pseudocode represents the design of the module. (Line numbers are included for reference only.)

01 var amount = 0 // shared variable represents amount of transfer
02 var credit = 0 // shared variable represents total credit
03 var debit = 0 // shared variable represents total debit
04 Thread1:
05 reads userInput from console
06 amount = userInput
07 creates new Thread2 instance and runs it
08 creates new Thread3 instance and runs it
09 Thread2:
10 value = amount
11 if (value > 0) debit = debit – value
12 Thread3:
13 value = amount
14 if (value > 0) credit = credit + value

A new instance named Thread1 is created for every user who accesses the banking system. You need to ensure that no data race occurs when the module runs.
What should you do?

Which three actions should you perform?

You administer a Windows HPC Server 2008 cluster for your company. You create two user groups named EngGroup and DevGroup on the cluster. The cluster also contains two node groups named Development and Production. You create the following job templates:
HpcProdto submit jobs to the Production node group.HpcDevto submit jobs to the Development node group. You need to ensure that the following requirements are met: Users in EngGroup can access only the nodes of the Production node group.Users in DevGroup can access only the nodes of the Development node group. Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)

What should you do?

You create a new Microsoft Message Passing Interface (MPI) application. The application will be deployed on a Windows HPC Server 2008 cluster. You plan to debug the application by using the MPI Cluster Debugger in Visual Studio 2008. You need to ensure that you can successfully launch and use the MPI Cluster Debugger.
What should you do?

What should you do?

You administer a Windows HPC Server 2008 cluster for your company. The cluster is used as a testing platform for software development. A job that has a job ID of 101 is submitted to the scheduler without the use of a job template. Default values are used for job resource assignment. You need to identify the nodes, cores, and process IDs that are allocated for the job. What should you do?

What should you instruct the users to do?

You administer a Windows HPC Server 2008 cluster for your company. The cluster serves 15 users who are members of only the Domain Users group. Users report that they do not know when their jobs have failed and so they are unable to resolve the issues. You need to ensure that the users can obtain information about their jobs that have failed. What should you instruct the users to do?