WorksheetsMCQs on Distributed Computing
Total questions: 68
Worksheet time: 34mins
What is the primary advantage of distributed computing?
Higher energy efficiency
Improved scalability
Single point of failure
Requires fewer resources
How does a distributed system achieve fault tolerance?
By eliminating backup nodes
Using a single central server
Through data replication and load balancing
By increasing the network latency
In a client-server architecture, what is the role of the client?
To process all incoming requests
To initiate requests and receive responses
To store all application data
To manage load balancing
Which architecture does Bitcoin use?
Client-server
Multitier
Peer-to-peer (P2P)
Event-driven
What is an advantage of a microservices architecture?
Easier scalability
Centralized storage
Single point of failure
Monolithic structure
Event-driven architectures primarily rely on:
Request-response interactions
On-demand code execution
Message queues and event handlers
Centralized databases
Which of the following protocols ensures reliable data transmission?
UDP
TCP
MQTT
CoAP
What is the main advantage of MQTT over HTTP?
More secure connections
Lower overhead
Faster one-time data retrieval
Uses RESTful APIs
Remote Procedure Call (RPC) is commonly used in:
Static web pages
Microservices communication
Batch processing systems
File storage
Push technologies such as WebSockets are useful for:
Processing large batch files
Real-time updates and notifications
Increasing network latency
Storing logs
What is the key difference between parallelism and multithreading?
Multithreading executes tasks in sequence
Parallelism runs tasks on multiple cores, while multithreading shares resources
Parallelism is slower than multithreading
Multithreading requires multiple CPUs
Deadlocks in multithreading occur when:
Threads execute too fast
Two or more threads are waiting for resources indefinitely
The program terminates
The CPU overheats
Which technique helps in preventing deadlocks?
Ignoring resource conflicts
Assigning priorities and using timeouts
Running all threads sequentially
Increasing the number of CPU cores
Which scheduling algorithm serves tasks in the order they arrive?
Round-Robin
Shortest Job First
First-Come, First-Served (FCFS)
Priority-based
A dynamic load balancing system:
Distributes tasks evenly without considering real-time load
Adjusts task distribution based on server performance
Assigns all tasks to a single node
Is less efficient than static load balancing
Which tool is commonly used for task queues in distributed computing?
PostgreSQL
RabbitMQ
Wireshark
Prometheus
Apache Hadoop primarily uses which processing model?
In-memory processing
Event-driven computing
Batch processing
Asynchronous messaging
What makes Apache Spark faster than Hadoop?
Uses in-memory computing
Does not require data replication
Avoids the use of distributed nodes
Uses only a single-threaded approach
MapReduce consists of which three stages?
Input → Process → Output
Map → Shuffle → Reduce
Load → Transform → Export
Request → Response → Cache
Which of the following is an example of real-time big data processing?
Hadoop MapReduce
Spark Streaming
Batch jobs in SQL
Data stored in CSV files
In the scatter-gather-reduce model, what happens in the scatter phase?
Data is collected from all nodes
Data is distributed across multiple nodes
Results are aggregated
Load balancing is performed
The reduce phase in distributed computing is used for:
Splitting large datasets
Aggregating collected data into a final result
Distributing tasks evenly
Data validation
What is the role of Kafka in distributed systems?
Task scheduling
Message streaming and real-time data processing
Load balancing
Serverless computing
Which monitoring tool is best suited for real-time metric collection?
PostgreSQL
Prometheus
Hadoop
Kafka
Kafka’s acknowledgment levels (acks) help in:
Controlling how many nodes confirm data writes
Preventing all failures in a system
Reducing data replication
Increasing CPU processing power
Which company heavily relies on distributed computing for its cloud services?
Netflix
Amazon AWS
Spotify
Which distributed computing technique is used in streaming services like Netflix?
RESTful APIs
Microservices
puting for its cloud services?
Netflix
Amazon AWS
Spotify
Which distributed computing technique is used in streaming services like Netflix?
RESTful APIs
Microservices and caching
Batch processing
Time-sharing
A system that uses distributed nodes to store and retrieve financial transactions is most likely:
A microservice-based architecture
A blockchain-based system
A serverless computing model
A multitier system
The CAP theorem states that a distributed system can guarantee only two of these three properties:
Fault tolerance, scalability, security
Consistency, availability, partition tolerance
Speed, reliability, cost-effectiveness
Decentralization, efficiency, interoperability
ACID properties in distributed databases ensure:
Scalability
High availability
Data consistency and integrity
Faster processing
Write a Java program to create and start a thread using the Thread class.
Using Thread class
Using Runnable interface
Using Executors.newSingleThreadExecutor()
Using ForkJoinPool
Modify the previous code to use the Runnable interface instead.
Extending Thread
Implementing Runnable
Using Callable
Using ThreadPoolExecutor
Which of the following is NOT a way to prevent deadlocks?
Using locks in a consistent order
Implementing a timeout mechanism
Using a single-threaded approach
Using a resource hierarchy
Which Java client is commonly used for Redis caching?
Lettuce
KafkaStreams
RabbitMQ-Client
gRPC-Java
Which Python library is used for distributed training of ML models?
Horovod
SparkSQL
Kafka-ML
PaxosML
What is the main advantage of distributed computing?
Reduces the need for databases
Increases single-system efficiency
Improves scalability and fault tolerance
Requires fewer computing resources
Which of the following contributes to fault tolerance in distributed systems?
Using a single point of failure
Data replication and load balancing
Reducing the number of nodes
Avoiding network redundancy
In a client-server architecture, what is the role of the client?
To process requests from multiple servers
To initiate requests and receive responses
To store all system data
To manage server load balancing
Which architecture allows all nodes to act as both clients and servers?
Client-server
Peer-to-peer (P2P)
Microservices
Three-tier
Which distributed system architecture divides applications into small independent services that communicate via APIs?
Client-server
Monolithic
Microservices
P2P
Which protocol is connectionless and fast but does not guarantee message delivery?
TCP
UDP
HTTP
WebSockets
What is a major advantage of using WebSockets over HTTP?
It supports batch processing
It allows a persistent connection
It is a more secure protocol
It does
What is a major advantage of using WebSockets over HTTP?
It supports batch processing
It allows a persistent connection
It is a more secure protocol
It does not require authentication
Which protocol is commonly used in IoT devices due to its efficiency for small data transmissions?
TCP
MQTT
REST API
UDP
Which of the following statements is true about parallelism and multithreading?
Multithreading runs tasks on multiple processors
Parallelism executes tasks on different processor cores
Parallelism can only be achieved using a single thread
Multithreading is always faster than parallel processing
What is a deadlock in multithreading?
A situation where a process completes execution
When a thread continuously runs without stopping
When two threads wait for resources indefinitely
When threads are executed sequentially
Which technique can help prevent deadlocks?
Allowing unlimited resource acquisition
Using a single-threaded approach
Implementing timeouts and resource ordering
Running all tasks simultaneously
Which scheduling algorithm processes tasks in the order they arrive?
Round-Robin
Shortest Job First
First-Come, First-Served (FCFS)
Priority Scheduling
Which task queue system ensures sequential processing of messages in distributed systems?
HTTP
Apache Kafka
TCP
Load Balancer
What is the main purpose of load balancing?
To reduce the number of nodes in a system
To distribute tasks evenly across multiple servers
To eliminate the need for parallel processing
To increase latency in the system
Which distributed framework is used for processing Big Data using HDFS and MapReduce?
Spark
Apache Hadoop
Kafka
PostgreSQL
Why is Apache Spark faster than Hadoop?
It uses in-memory processing
It does not require distributed computing
It stores all data locally
It does not support MapReduce
Which file format is most efficient for storing large datasets in Big Data processing?
CSV
XML
Parquet
TXT
What is the first stage in the Scatter-Gather-Reduce model?
Gather
Reduce
Scatter
Parallel
Which phase in Scatter-Gather-Reduce is responsible for aggregating results from nodes?
Scatter
Reduce
Gather
Parallel
What is the primary function of Apache Kafka?
Load balancing
Message queues and real-time data streaming
Multithreading
Data encryption
Which monitoring tool is used to track real-time metrics in distributed computing?
Kafka
PostgreSQL
Prometheus
Hadoop
How does Kafka ensure fault tolerance?
By reducing network traffic
By using data replication across multiple brokers
By running on a single server
By avoiding distributed storage
Which company heavily relies on distributed computing for cloud services?
Netflix
Amazon AWS
Spotify
Which distributed computing technique helps in real-time video streaming?
Multithreading
Load Balancing
Batch processing
Static routing
Which property in distributed databases ensures data consistency and reliability?
CAP Theorem
ACID
BASE
Eventual Consistency
Which component ensures even distribution of processing tasks in cloud environments?
Message queues
Load balancer
Data sharding
Single-thread processing
Which protocol is commonly used for microservice communication?
TCP
REST API
WebSockets
MQTT
Which theorem states that a distributed system can provide only two out of three properties: Consistency, Availability, Partition Tolerance?
ACID
CAP Theorem
BASE
Paxos
What is the main benefit of distributed computing in data processing?
Tasks are divided among multiple nodes
A single system processes all tasks
Data is processed sequentially
Network latency increases
What ensures fault tolerance in distributed storage systems?
Data replication
Increasing network latency
Reducing node count
Using a single point of failure
