National University of Computer and Emerging Sciences, Lahore Campus
National University of Computer and Emerging Sciences, Lahore Campus
i. Which of the following combination is used by Hadoop for storage and processing?
a. AFS and MapReduce
b. HDFS and MapReduce
c. AFS and UFIDs
d. HDFS and UFIDs
ii. The mechanism of packing function parameters into a message packet is called ________.
a. Marshalling
b. RPC paradigm
c. Stubbing
d. None of the above
iii. ____________ is a meta language to describe the services offered by a service provider.
a. SOAP
b. XML
c. WSDL
d. UDDI
vi. An f-resilient algorithm needs _____ rounds to solve consensus for f failed processors
a. f
b. f + 2
c. f + 1
d. 2f
ix. ________ is the ability to view a distributed system as if it were a single computer.
a. Openness
b. Transparency
c. Extensibility
d. Resource Sharing
x. In _________ service model, only application and data is managed by the end-user.
a. IaaS
b. PaaS
c. SaaS
d. All of the above
True/False
i. In HDFS, DataNode is used to maintain and manage the file system metadata.
a. True
b. False
ii. In permanently evicted strategy of Fault Tolerance for spare nodes, the spares remain constant
over time.
a. True
b. False
iii. A NodeManager is a master daemon that communicates with the client, tracks resources on the
cluster, and orchestrates work by assigning tasks.
a. True
b. False
iv. Cloud is an infrastructure that involves the integrated and collaborative use of Computers,
networks, databases and scientific instruments owned and managed by multiple organizations.
a. True
b. False
v. In Karp-Flatt metric, if 𝑒𝑒 increases as 𝑝𝑝 increases, it means that parallelization overhead is
affecting the speedup.
a. True
b. False
(b) Draw a 4 x 4 Omega network (4 processes and 4 mem modules) and explain how P3 will access M2.
Solution:
Explanation:
Assume each row is stored at different processes, row 1 (1, 3, 5, 7) is stored at process P0, row 2 at P1,
row 3 at P2, and row 4 (10, 12, 14, 16) at P3. We want to apply a matrix transpose. Describe:
(ii) Draw the message originating from process P0 and show what happens at each step with this
message
0 1
3 2
(iii) Draw the message originating from process P3 and show what happens at each step with this
message
0 1
3 2
a) Show the value of the logical clock on each of the three processes after every event. This includes
after each local event and message. Also show the value of the timestamp on each message.
b) Assume three processes, PA, PB and PC. Assume PA sends a message to PC. PA has a vector clock of (4,
1, 0), whereas before receiving this message, PC has a vector clock of (0, 0, 2). What will the vector
clock of PC be after receiving this message from PA?
a) Write the output for the following piece of OpenMP code assuming that there are no errors.
#include <iostream>
#include <omp.h>
using namespace std;
int main() {
int nums[20], total = 0;
bool p;
for (int i = 0; i < 20; i++) nums[i] = i + 1;
b) Would you agree that setting OMP_NESTED to TRUE in the code above would have no impact on the
code above?
b) Can you interpret the meaning of the value of the variable dmax in the code above?