DISTRIBUTED SYSTEM
CHAPTER 10 : CASE STUDY
LAB WORK SOLUTION- DISTRIBUTED SYSTEM
DISTRIBUTED SYSTEM -BCA -ALL SLIDES
MCQ- DISTRIBUTED SYSTEM

DISTRIBUTED SYSTEM-MCQ

Distributed System and Characteristics

Question 1:
Which of the following is a key characteristic of distributed systems?
a) Centralised control
b) Scalability
c) Single point of failure
d) No network communication

Correct Answer: b) Scalability
Explanation: Scalability is a key characteristic of distributed systems, allowing them to handle a growing amount of work by adding resources to the system.

Question 2:
In a distributed system, what is meant by transparency?
a) The ability to see all network traffic
b) Displaying all system errors to users
c) Hiding the complexity of the system from users
d) The use of transparent windows in the user interface

Correct Answer: c) Hiding the complexity of the system from users
Explanation: Transparency in distributed systems means hiding the complexities of the system's operations from users, making the system appear as a single coherent entity.

Question 3:
Which type of transparency deals with the failure of a component in a distributed system?
a) Location transparency
b) Failure transparency
c) Replication transparency
d) Migration transparency

Correct Answer: b) Failure transparency
Explanation: Failure transparency ensures that the failure of a component is hidden from users, allowing the system to recover from faults without user intervention.

Question 4:
What does the term "fault tolerance" refer to in a distributed system?
a) The system's ability to reject incorrect data
b) The system's ability to continue operation in the event of a fault
c) The system's ability to tolerate slow performance
d) The system's ability to handle increased workload

Correct Answer: b) The system's ability to continue operation in the event of a fault
Explanation: Fault tolerance is the capability of a distributed system to continue functioning correctly even when some of its components fail.

Question 5:
Which of the following is an example of a distributed system?
a) A single computer running multiple applications
b) A cluster of computers working together to solve a problem
c) A standalone desktop computer
d) An isolated database server

Correct Answer: b) A cluster of computers working together to solve a problem
Explanation: A distributed system consists of multiple interconnected computers that work together to achieve a common goal, such as a cluster of computers.

Question 6:
In distributed systems, what is "load balancing"?
a) Distributing tasks evenly across servers
b) Increasing the load on a single server
c) Reducing the network traffic
d) Limiting the number of users

Correct Answer: a) Distributing tasks evenly across servers
Explanation: Load balancing is the process of distributing workloads evenly across multiple servers to ensure no single server is overwhelmed and to improve overall system performance.

Question 7:
Which of the following protocols is commonly used for communication in distributed systems?
a) FTP
b) POP3
c) SMTP d) HTTP

Correct Answer: d) HTTP
Explanation: HTTP (Hypertext Transfer Protocol) is widely used for communication in distributed systems, especially in web-based applications.

Question 8:
In a distributed system, what is the purpose of middleware?
a) To serve as an intermediary between different applications and hardware
b) To perform data storage and retrieval
c) To manage user authentication
d) To monitor system performance

Correct Answer: a) To serve as an intermediary between different applications and hardware
Explanation: Middleware provides common services and capabilities to applications outside of what's offered by the operating system, acting as a bridge between applications and hardware.

Question 9:
What is the primary advantage of a peer-to-peer (P2P) network over a client-server network?
a) Centralised control
b) Increased security
c) Scalability and redundancy
d) Simplified administration

Correct Answer: c) Scalability and redundancy
Explanation: Peer-to-peer (P2P) networks are more scalable and provide redundancy since every node in the network can act as both a client and a server, distributing resources and tasks more evenly.

Question 10:
Which of the following best describes a "distributed file system"?
a) A single file stored on a central server
b) A file system that can be accessed over a network and is distributed across multiple servers
c) A file system that only works on a local machine
d) A file system that cannot be shared

Correct Answer: b) A file system that can be accessed over a network and is distributed across multiple servers
Explanation: A distributed file system allows files to be stored across multiple servers and accessed over a network, providing improved data redundancy and access speed.

 


Types of Distributed Systems 

Question 1:
What type of distributed system architecture is characterized by independent nodes coordinating through shared data or state management?
a) Peer-to-peer (P2P)
b) Client-server
c) Master-slave
d) Hierarchical

Correct Answer: a) Peer-to-peer (P2P)
Explanation: In a Peer-to-peer (P2P) architecture, independent nodes coordinate through shared data or state management without a central coordinator.

Question 2:
Which of the following is a characteristic of a peer-to-peer (P2P) distributed system?
a) Centralised control
b) Decentralised control
c) Single point of failure
d) High latency

Correct Answer: b) Decentralized control
Explanation: Peer-to-peer (P2P) systems are characterized by decentralized control, where each node has equivalent capabilities and responsibilities.

Question 3:
In a client-server distributed system, which component typically manages resources and responds to requests from clients?
a) Client
b) Server
c) Router
d) Load balancer

Correct Answer: b) Server
Explanation: In a client-server architecture, the server manages resources and responds to requests from clients.

Question 4:
A distributed system where there is a clear distinction between a central coordinating node and subordinate nodes is known as:
a) Peer-to-peer (P2P)
b) Client-server
c) Master-slave
d) Hybrid

Correct Answer: c) Master-slave
Explanation: In a master-slave architecture, there is a clear distinction between a central coordinating node (master) and subordinate nodes (slaves).

Question 5:
Which type of distributed system architecture provides fault tolerance by allowing multiple nodes to act as backups for one another?
a) Peer-to-peer (P2P)
b) Client-server
c) Master-slave
d) Hierarchical

Correct Answer: a) Peer-to-peer (P2P)
Explanation: Peer-to-peer (P2P) systems provide fault tolerance by allowing nodes to act as backups for one another, eliminating single points of failure.

Question 6:
Which of the following is a key advantage of a hierarchical distributed system?
a) High scalability
b) Low latency
c) Simplified management
d) Decentralized control

Correct Answer: c) Simplified management
Explanation: Hierarchical distributed systems simplify management by organizing nodes in a hierarchical manner, which makes control and oversight easier.

Question 7:
In a decentralized distributed system, decision-making is typically:
a) Centralized at one node
b) Decentralized across all nodes
c) Controlled by the client
d) Managed by a load balancer

Correct Answer: b) Decentralized across all nodes
Explanation: In decentralized distributed systems, decision-making is spread across all nodes, avoiding a single point of control.

Question 8:
Which type of distributed system is best suited for applications requiring high reliability and data consistency?
a) Peer-to-peer (P2P)
b) Client-server
c) Master-slave
d) Hybrid

Correct Answer: b) Client-server
Explanation: Client-server systems are often designed for high reliability and data consistency, with servers managing resources and ensuring data integrity.

Question 9:
A distributed system where each node can perform both client and server functions is referred to as:
a) Peer-to-peer (P2P)
b) Client-server
c) Master-slave
d) Hybrid

Correct Answer: a) Peer-to-peer (P2P)
Explanation: In a Peer-to-peer (P2P) system, each node can act as both a client and a server, sharing resources and responsibilities.

Question 10:
Which type of distributed system architecture is known for its ability to distribute processing load efficiently among nodes?
a) Peer-to-peer (P2P)
b) Client-server
c) Master-slave
d) Hierarchical

Correct Answer: a) Peer-to-peer (P2P)
Explanation: Peer-to-peer (P2P) architectures are known for efficiently distributing processing load among nodes, as each node can share in the workload and contribute resources.

 


Name Identifiers and Addresses 

Question 1:
Which of the following best describes a name identifier in a distributed system?
a) A unique identifier for a network packet.
b) A unique identifier for an entity, such as a user or resource, within the system.
c) The physical address of a server.
d) A unique identifier for an IP address.

Correct Answer: b) A unique identifier for an entity, such as a user or resource, within the system.
Explanation: In distributed systems, a name identifier is used to uniquely identify an entity, which could be a user, a process, a service, or a resource. This identifier allows the system to locate and manage the entity.

Question 2:
What is the primary purpose of an address in a distributed system?
a) To provide a unique identifier for an entity.
b) To specify the location of an entity within the system.
c) To encrypt data for secure communication.
d) To describe the attributes of an entity.

Correct Answer: b) To specify the location of an entity within the system.
Explanation: An address in a distributed system indicates the location of an entity, such as a server or a service, enabling communication and interaction between different components within the system.

Question 3:
Which protocol is commonly used for resolving human-readable names to IP addresses in a distributed system?
a) HTTP
b) FTP
c) DNS
d) SMTP

Correct Answer: c) DNS
Explanation: The Domain Name System (DNS) is used to translate human-readable domain names (like www.example.com) into IP addresses, allowing systems to locate and communicate with each other over the network.

Question 4:
In a distributed system, which of the following is a common challenge related to name identifiers?
a) Ensuring consistent packet sizes.
b) Managing network congestion.
c) Handling name collisions and ensuring uniqueness.
d) Optimizing data compression algorithms.

Correct Answer: c) Handling name collisions and ensuring uniqueness.
Explanation: One of the key challenges in managing name identifiers in a distributed system is ensuring that each identifier is unique and avoiding collisions, where two entities end up with the same identifier.

Question 5:
Which addressing scheme is often used in distributed systems to provide location independence?
a) MAC address
b) IP address
c) Logical address
d) Physical address

Correct Answer: c) Logical address
Explanation: Logical addresses are used in distributed systems to provide location independence, meaning that the address does not change even if the entity's physical location changes. This abstraction simplifies communication and management within the system.

Question 6:
Which of the following best describes the role of a directory service in a distributed system?
a) It routes data packets between network nodes.
b) It manages file storage and retrieval.
c) It maps human-readable names to network resources.
d) It monitors network traffic for security purposes.

Correct Answer: c) It maps human-readable names to network resources.
Explanation: A directory service in a distributed system maps human-readable names to the corresponding network resources, making it easier for users and applications to locate and interact with these resources.

Question 7:
Which of the following is NOT a characteristic of a good name identifier in a distributed system?
a) Uniqueness
b) Stability over time
c) Readability by humans
d) Dependency on physical location

Correct Answer: d) Dependency on physical location
Explanation: A good name identifier should be unique, stable over time, and ideally human-readable. It should not depend on the physical location of the entity, as this would undermine the flexibility and scalability of the distributed system.

Question 8:
What is the purpose of using hierarchical naming in distributed systems?
a) To improve data encryption.
b) To reduce network latency.
c) To organize and manage names more effectively.
d) To enhance physical security.

Correct Answer: c) To organize and manage names more effectively.
Explanation: Hierarchical naming structures help organize and manage names more effectively by creating a structured namespace. This can simplify the process of locating resources and managing identifiers in a distributed system.

Question 9:
In a distributed system, what is a potential disadvantage of using flat naming?
a) It complicates the resolution process.
b) It leads to increased network congestion.
c) It makes identifiers harder to remember.
d) It can result in name collisions and scalability issues.

Correct Answer: d) It can result in name collisions and scalability issues.
Explanation: Flat naming can lead to name collisions (where two entities have the same name) and scalability issues, as there is no inherent structure to help manage the names and ensure uniqueness.

Question 10:
Which type of service helps in translating an identifier to a network address in a distributed system?
a) Authentication service
b) Translation service
c) Resolution service
d) Compression service

Correct Answer: c) Resolution service
Explanation: A resolution service translates an identifier (such as a domain name) into a network address (such as an IP address), allowing entities in a distributed system to locate and communicate with each other.

 Fault Tolerance 

Question 1: Which of the following best defines fault tolerance?

 a) The ability of a system to detect faults.
b) The ability of a system to continue operating in the event of a fault.
c) The ability of a system to avoid faults.
d) The ability of a system to predict faults.
Answer: b) The ability of a system to continue operating in the event of a fault.
Explanation: Fault tolerance is the property that enables a system to continue operating properly in the event of the failure of some of its components.

Question 2: Which of the following is NOT a common technique used in fault-tolerant systems? 

a) Replication
b) Load balancing
c) Checkpointing
d) Failover
Answer: b) Load balancing
Explanation: Load balancing is used to distribute workloads across multiple resources to optimize resource use, whereas replication, checkpointing, and failover are directly related to fault tolerance.

Question 3: What is the primary purpose of redundancy in fault-tolerant systems? 

a) To improve system speed
b) To reduce system costs
c) To eliminate system faults
d) To ensure system availability
Answer: d) To ensure system availability
Explanation: Redundancy involves duplicating critical components or functions of a system to increase reliability and ensure availability in case of failure.

Question 4: In a RAID 1 setup, how is data stored to achieve fault tolerance?

 a) Data is striped across multiple disks.
b) Data is mirrored across multiple disks.
c) Data is stored with parity information.
d) Data is compressed and stored on a single disk.
Answer: b) Data is mirrored across multiple disks.
Explanation: RAID 1 achieves fault tolerance by mirroring data across multiple disks, so if one disk fails, the data is still available on the other disk.

Question 5: What is the role of a watchdog timer in fault-tolerant systems? 

a) To manage power consumption
b) To monitor and reset the system in case of failures
c) To optimize data processing
d) To encrypt data for security
Answer: b) To monitor and reset the system in case of failures
Explanation: A watchdog timer is a hardware timer used to detect and recover from system malfunctions by resetting the system if it becomes unresponsive.

Question 6: Which of the following fault tolerance techniques involves periodically saving the state of a system? 

a) Replication
b) Failover
c) Checkpointing
d) Load balancing
Answer: c) Checkpointing
Explanation: Checkpointing involves periodically saving the state of a system so that it can be restored to that point in case of failure.

Question 7: What is a hot standby in the context of fault tolerance?

 a) A backup system that is always online and ready to take over immediately.
b) A system that is offline but can be brought online quickly.
c) A system that operates at a higher temperature.
d) A system that shares the load with the primary system.
Answer: a) A backup system that is always online and ready to take over immediately.
Explanation: A hot standby system is always running and synchronized with the primary system, ready to take over without delay if the primary system fails.

Question 8: In fault-tolerant systems, what is meant by "graceful degradation"? 

a) System performance improves over time.
b) The system shuts down completely when a fault occurs.
c) The system continues to operate at reduced functionality after a fault.
d) The system automatically upgrades its components.
Answer: c) The system continues to operate at reduced functionality after a fault.
Explanation: Graceful degradation means that a system continues to operate, though possibly at a reduced level of functionality, rather than completely failing when a fault occurs.

Question 9: Which type of redundancy involves using different methods or designs to achieve the same functionality? 

a) Active redundancy
b) Passive redundancy
c) N-version programming
d) Temporal redundancy
Answer: c) N-version programming
Explanation: N-version programming involves using different algorithms or designs to achieve the same functionality, enhancing fault tolerance by reducing the likelihood that a single fault will affect all versions.

Question 10: What is a major disadvantage of using replication for fault tolerance?

 a) Increased system speed
b) Higher system costs
c) Reduced system reliability
d) Simplified system design
Answer: b) Higher system costs
Explanation: Replication increases system costs because it requires additional resources to duplicate the components or functions of the system.

 

Multicast Communication 

Question 1:
What is multicast communication in a distributed system?
a) Sending a message to a single recipient
b) Sending a message to all recipients in a network
c) Sending a message to a specific group of recipients
d) Sending a message to a specific IP address
Correct Answer: c) Sending a message to a specific group of recipients
Explanation: Multicast communication involves sending a message to a specific group of recipients rather than a single recipient or all recipients in the network.

Question 2:
Which protocol is commonly used for multicast communication on the Internet?
a) TCP
b) HTTP
c) IP Multicast (UDP)
d) FTP
Correct Answer: c) IP Multicast (UDP)
Explanation: IP Multicast, typically using the User Datagram Protocol (UDP), is commonly used for multicast communication on the Internet.

Question 3:
Which IP address range is reserved for multicast groups?
a) 192.168.0.0 to 192.168.255.255
b) 10.0.0.0 to 10.255.255.255
c) 224.0.0.0 to 239.255.255.255
d) 172.16.0.0 to 172.31.255.255
Correct Answer: c) 224.0.0.0 to 239.255.255.255
Explanation: The IP address range 224.0.0.0 to 239.255.255.255 is reserved for multicast groups.

Question 4:
What is the main advantage of multicast communication over unicast communication in a distributed system?
a) Higher reliability
b) Lower latency
c) Reduced network traffic
d) Improved security
Correct Answer: c) Reduced network traffic
Explanation: Multicast communication reduces network traffic by allowing a single message to be sent to multiple recipients simultaneously, rather than sending multiple individual messages.

Question 5:
Which component in a network helps manage multicast group memberships?
a) Router
b) Multicast router
c) Switch
d) Hub
Correct Answer: b) Multicast router
Explanation: Multicast routers are responsible for managing multicast group memberships and forwarding multicast traffic to the appropriate recipients.

Question 6:
What protocol is used by hosts to join or leave a multicast group?
a) DNS
b) ARP
c) IGMP (Internet Group Management Protocol)
d) ICMP
Correct Answer: c) IGMP (Internet Group Management Protocol)
Explanation: IGMP (Internet Group Management Protocol) is used by hosts to join or leave multicast groups.

Question 7:
In multicast communication, what role does the Rendezvous Point (RP) play in the PIM-SM (Protocol Independent Multicast - Sparse Mode) protocol?
a) It acts as a central point for group members to register and receive multicast traffic.
b) It forwards multicast packets to all network nodes.
c) It manages the IP address allocation for multicast groups.
d) It authenticates multicast group members.
Correct Answer: a) It acts as a central point for group members to register and receive multicast traffic.
Explanation: In PIM-SM, the Rendezvous Point (RP) acts as a central point for group members to register and receive multicast traffic, helping to efficiently route multicast packets.

Question 8:
Which of the following is a disadvantage of multicast communication?
a) High scalability
b) Complexity in managing group memberships
c) Efficient use of bandwidth
d) Reduced network traffic
Correct Answer: b) Complexity in managing group memberships
Explanation: Managing group memberships and ensuring efficient delivery of multicast messages can be complex, which is a disadvantage of multicast communication.

Question 9:
What is the purpose of the Time-to-Live (TTL) field in a multicast packet?
a) To indicate the priority of the packet
b) To limit the packet's lifespan in the network
c) To identify the source of the packet
d) To encrypt the packet data
Correct Answer: b) To limit the packet's lifespan in the network
Explanation: The Time-to-Live (TTL) field in a multicast packet is used to limit the packet's lifespan in the network, preventing it from circulating indefinitely.

Question 10:
Which of the following is an application that commonly uses multicast communication?
a) Email
b) File Transfer Protocol (FTP)
c) Video conferencing
d) Web browsing
Correct Answer: c) Video conferencing
Explanation: Video conferencing commonly uses multicast communication to efficiently distribute video and audio streams to multiple participants simultaneously.

 

Distributed Commit 

Question 1:
What does a distributed commit refer to in a distributed system?
a) Coordinating multiple transactions across different nodes
b) Running simultaneous transactions on a single node
c) Synchronizing clocks across different nodes
d) Isolating transactions from each other
Correct Answer: a) Coordinating multiple transactions across different nodes
Explanation: Distributed commit refers to the process of coordinating multiple transactions across different nodes to ensure that either all nodes commit the transaction or none do, maintaining consistency.

Question 2:
Which protocol is commonly used for Two-Phase Commit (2PC) in distributed systems?
a) HTTP
b) FTP
c) JDBC
d) XA
Correct Answer: d) XA
Explanation: The XA (eXtended Architecture) protocol is commonly used for implementing the Two-Phase Commit (2PC) protocol in distributed systems.

Question 3:
In the Two-Phase Commit protocol, what role does the coordinator play?
a) Initiating the commit process
b) Resolving conflicts during commit
c) Serving data to clients
d) Analyzing transaction logs
Correct Answer: a) Initiating the commit process
Explanation: In the Two-Phase Commit protocol, the coordinator initiates the commit process by sending prepare and commit messages to the participating nodes.

Question 4:
What is a drawback of the Two-Phase Commit (2PC) protocol?
a) It guarantees availability of data
b) It suffers from blocking issues and timeouts
c) It ensures eventual consistency
d) It works well in untrusted networks
Correct Answer: b) It suffers from blocking issues and timeouts
Explanation: A drawback of the Two-Phase Commit protocol is that it can suffer from blocking issues and timeouts, especially if a participant or the coordinator crashes during the process.

Question 5:
Which of the following is an advantage of Three-Phase Commit (3PC) over Two-Phase Commit (2PC)?
a) Improved performance
b) Reduced network traffic
c) Mitigates the risk of blocking indefinitely
d) Simplicity in implementation
Correct Answer: c) Mitigates the risk of blocking indefinitely
Explanation: The Three-Phase Commit protocol mitigates the risk of blocking indefinitely, which is a significant improvement over the Two-Phase Commit protocol.

Question 6:
What role does a transaction manager play in distributed commit scenarios?
a) Managing user authentication
b) Enforcing security policies
c) Coordinating distributed transactions
d) Optimizing database queries
Correct Answer: c) Coordinating distributed transactions
Explanation: A transaction manager coordinates distributed transactions, ensuring that all parts of the transaction are committed or rolled back in a consistent manner.

Question 7:
Which condition can cause a distributed commit protocol to fail?
a) Fast network connections
b) Strong consistency requirements
c) Low latency in data transmission
d) Network partitioning
Correct Answer: d) Network partitioning
Explanation: Network partitioning can cause a distributed commit protocol to fail because nodes may become unreachable, making it impossible to coordinate and complete the transaction.

Question 8:
What is a key challenge in achieving distributed commit across geographically dispersed nodes?
a) Redundant data storage
b) Latency and network failures
c) Physical security of servers
d) Lack of transaction logs
Correct Answer: b) Latency and network failures
Explanation: Latency and network failures are key challenges in achieving distributed commit across geographically dispersed nodes due to the increased likelihood of delays and disruptions in communication.

Question 9:
Which technique is used to handle failure scenarios in distributed commit protocols?
a) Timeouts and retries
b) Ignoring the failed transactions
c) Manually restarting the servers
d) Increasing network bandwidth
Correct Answer: a) Timeouts and retries
Explanation: Timeouts and retries are commonly used techniques to handle failure scenarios in distributed commit protocols, allowing the system to recover from transient issues.

Question 10:
What is an alternative approach to traditional distributed commit protocols for achieving eventual consistency?
a) CAP theorem
b) BASE transactions
c) ACID transactions
d) 2PL locking
Correct Answer: b) BASE transactions
Explanation: BASE (Basically Available, Soft state, Eventually consistent) transactions are an alternative approach to traditional distributed commit protocols, focusing on achieving eventual consistency rather than immediate consistency.

 


Clock Synchronization 

Question 1:
What is the primary goal of clock synchronization in a distributed system?
a) To increase system performance
b) To ensure that all nodes have a consistent view of time
c) To manage user authentication
d) To optimize database queries
Correct Answer: b) To ensure that all nodes have a consistent view of time
Explanation: The primary goal of clock synchronization in a distributed system is to ensure that all nodes have a consistent view of time, which is crucial for coordinating events and transactions.

Question 2:
Which protocol is widely used for synchronizing clocks over a network?
a) HTTP
b) FTP
c) SSH
d) NTP
Correct Answer: d) NTP
Explanation: The Network Time Protocol (NTP) is widely used for synchronizing clocks over a network. It provides mechanisms to synchronize time across different devices and systems.

Question 3:
What is the purpose of the Berkeley algorithm in clock synchronization?
a) To synchronize clocks by averaging clock values from different nodes
b) To provide time stamps for transactions
c) To secure communication between nodes
d) To manage load balancing
Correct Answer: a) To synchronize clocks by averaging clock values from different nodes
Explanation: The Berkeley algorithm is used to synchronize clocks by averaging the clock values from different nodes in the system, adjusting them to achieve a consistent time across all nodes.

Question 4:
Which type of clock synchronization involves each node adjusting its clock based on the time received from a reference clock?
a) Synchronous clock synchronization
b) Asynchronous clock synchronization
c) Physical clock synchronization
d) Logical clock synchronization
Correct Answer: a) Synchronous clock synchronization
Explanation: Synchronous clock synchronization involves each node adjusting its clock based on the time received from a reference clock to achieve uniform time across the network.

Question 5:
What is a logical clock in a distributed system?
a) A physical timekeeping device
b) A counter that tracks the order of events
c) A synchronization mechanism for data
d) A load balancing algorithm
Correct Answer: b) A counter that tracks the order of events
Explanation: A logical clock is a counter that tracks the order of events in a distributed system, rather than actual time, to help maintain a consistent sequence of events.

Question 6:
Which of the following is a key challenge in achieving accurate clock synchronization in a distributed system?
a) High bandwidth
b) Redundant data storage
c) Network latency and jitter
d) User authentication
Correct Answer: c) Network latency and jitter
Explanation: Network latency and jitter are key challenges in achieving accurate clock synchronization because they introduce variability in the time it takes for synchronization messages to travel between nodes.

Question 7:
What is the purpose of the Cristian's algorithm in clock synchronization?
a) To synchronize a client's clock with a server's clock by accounting for message delay
b) To manage transaction logs
c) To increase storage capacity
d) To enforce security policies
Correct Answer: a) To synchronize a client's clock with a server's clock by accounting for message delay
Explanation: Cristian's algorithm is used to synchronize a client's clock with a server's clock by accounting for the round-trip message delay, improving the accuracy of synchronization.

Question 8:
Which of the following is an example of a physical clock?
a) GPS-based clock
b) Logical clock
c) Vector clock
d) Timestamp counter
Correct Answer: a) GPS-based clock
Explanation: A GPS-based clock is an example of a physical clock, as it provides precise time information based on signals received from GPS satellites.

Question 9:
In the context of clock synchronization, what is clock drift?
a) The delay in message transmission
b) The gradual deviation of a clock from the correct time
c) The process of synchronizing clocks
d) The increase in system load
Correct Answer: b) The gradual deviation of a clock from the correct time
Explanation: Clock drift is the gradual deviation of a clock from the correct time due to various factors such as temperature changes, hardware imperfections, and other environmental influences.

Question 10:
Which technique can be used to minimize clock drift in distributed systems?
a) Regular synchronization with a reliable time source
b) Increasing network bandwidth
c) Using logical clocks exclusively
d) Reducing system load
Correct Answer: a) Regular synchronization with a reliable time source
Explanation: Regular synchronization with a reliable time source, such as NTP servers or GPS clocks, can minimize clock drift by frequently adjusting the system clocks to maintain accurate time.

 


ACCESS CONTROL

 

Question 1:
Which access control model assigns permissions to roles rather than individual users?
a) Discretionary Access Control (DAC)
b) Mandatory Access Control (MAC)
c) Role-Based Access Control (RBAC)
d) Attribute-Based Access Control (ABAC)
Answer: c) Role-Based Access Control (RBAC)
Explanation: RBAC simplifies management by assigning permissions to roles and then assigning users to those roles.

Question 2:
What is the primary function of an Access Control List (ACL)?
a) To define roles and permissions
b) To enforce access control policies
c) To list users and their allowed actions on a resource
d) To authenticate users
Answer: c) To list users and their allowed actions on a resource
Explanation: ACLs specify which users or system processes are granted access to objects and what operations are allowed.

Question 3:
Which access control model is typically used in environments where security policies are centrally defined and strictly enforced?
a) Role-Based Access Control (RBAC)
b) Discretionary Access Control (DAC)
c) Mandatory Access Control (MAC)
d) Attribute-Based Access Control (ABAC)
Answer: c) Mandatory Access Control (MAC)
Explanation: MAC is used in environments with strict security policies that are centrally managed and enforced.

Question 4:
Which term refers to the process of granting or denying access to resources?
a) Authentication
b) Authorization
c) Accounting
d) Auditing
Answer: b) Authorization
Explanation: Authorization is the process of granting or denying access to resources.

Question 5:
Which technology allows users to authenticate once and access multiple systems?
a) SSO
b) ACL
c) MFA
d) PEP
Answer: a) Single Sign-On (SSO)
Explanation: Single Sign-On (SSO) allows users to authenticate once and access multiple systems.

Question 6:
Which component is responsible for enforcing access control decisions?
a) Policy Decision Point (PDP)
b) Policy Enforcement Point (PEP)
c) Access Control List (ACL)
d) Authentication Server
Answer: b) Policy Enforcement Point (PEP)
Explanation: The PEP enforces access control decisions by allowing or denying access to resources.

Question 7:
What is the main advantage of using Attribute-Based Access Control (ABAC)?
a) Simplicity in administration
b) Flexibility and fine-grained control
c) Centralized policy management
d) Fixed roles and permissions
Answer: b) Flexibility and fine-grained control
Explanation: ABAC allows for dynamic and context-aware access decisions based on various attributes.

Question 8:
Which access control model uses user roles to determine access permissions?
a) RBAC
b) MAC
c) DAC
d) ABAC
Answer: a) RBAC
Explanation: Role-Based Access Control assigns permissions to roles rather than individuals.

Question 9:
What does the principle of least privilege (PoLP) entail?
a) Granting users full access to all resources
b) Granting users the minimum access necessary to perform their tasks
c) Granting users access based on their attributes
d) Granting access based on predefined roles
Answer: b) Granting users the minimum access necessary to perform their tasks
Explanation: PoLP reduces the risk of unauthorized access by limiting user permissions to the bare minimum needed.

Question 10:
Which method of authentication involves verifying a user's identity using multiple factors?
a) Single Sign-On (SSO)
b) Multi-Factor Authentication (MFA)
c) Role-Based Authentication
d) Token-Based Authentication
Answer: b) Multi-Factor Authentication (MFA)
Explanation: MFA enhances security by requiring multiple forms of verification, such as a password and a fingerprint.

 

RMI 

Question 1:

What is the primary purpose of Remote Method Invocation (RMI) in distributed systems?

a) To manage database transactions

b) To allow a program to invoke methods on a remote object as if they were local

c) To enhance the performance of single-threaded applications

d) To simplify local method calls

Correct Answer: b)To allow a program to invoke methods on a remote object as if they were local

Explanation: RMI lets programs call methods on remote objects as if they were local, simplifying distributed computing.

 

Question 2:

Which layer of the Java RMI system handles network communication between the client and server?

a) Stub/Skeleton Layer

b) Remote Reference Layer

c) Transport Layer

d) Application Layer

Correct Answer: c) Transport Layer

Explanation: The Transport Layer manages the low-level network communication in RMI.


Question 3:

What is the role of the Stub in the Stub/Skeleton Layer of Java RMI?

a) To manage network communication

b)To represent a remote object on the client side

c) To handle method invocations on the server side

d)To store references to remote objects

Correct Answer: b) To represent a remote object on the client side


Explanation: The Stub acts as a local proxy for the remote object on the client side.

Question 4:

Which of the following is a benefit of using RMI for distributed applications?

a) Increased memory usage

b) Simplified remote method invocation

c) Manual network communication management

d) Limited object-oriented communication

Correct Answer: b) Simplified remote method invocation

Explanation: RMI simplifies the process of calling methods on remote objects.


Question 5:

In the context of Java RMI, what is the function of the RMI registry?

a) To compile Java code

b) To manage database transactions

c) To maintain a list of available remote objects and references

d) To handle network protocols

Correct Answer: c) To maintain a list of available remote objects and references

Explanation: The RMI registry keeps track of available remote objects and their references.

 

Question 6:

What must a remote interface in Java RMI extend?

a) java.io.Serializable

b) java.rmi.Remote

c) java.lang.Runnable

d) java.util.Observer

Correct Answer: b) java.rmi.Remote

Explanation: A remote interface must extend `java.rmi.Remote` to indicate it can be used for remote method invocation.


 

 

Question 7:

What does JavaSpaces in Jini enable with respect to object sharing?

a) Synchronous object sharing

b) Asynchronous object sharing

c) Immediate object deletion

d) Local object storage only

Correct Answer: b) Asynchronous object sharing

Explanation: JavaSpaces allows objects to be shared asynchronously between distributed systems.


 


Question 8:

Which of the following real-world applications can benefit from using RMI?

a) Single-user desktop applications

b) Online multiplayer games

c) Local file storage systems

d) Standalone scientific calculators

Correct Answer: b) Online multiplayer games

Explanation: Online multiplayer games benefit from RMI by allowing distributed interaction between players.


 



 

Question 9:

What is a key feature of the Remote Reference Layer in Java RMI?

a) To compile and run client code

b) To handle network communication

c) To manage references to remote objects

d) To represent a remote object on the client side

Correct Answer: c) To manage references to remote objects

Explanation:The Remote Reference Layer manages how remote objects are referenced and interacted with.


Question 10:

Which Java RMI layer includes the skeleton component?

a) Transport Layer

b) Remote Reference Layer

c) Application Layer

d) Stub/Skeleton Layer

Correct Answer: d) Stub/Skeleton Layer

Explanation: The Stub/Skeleton Layer includes the components that facilitate method invocation between client and server.






 

Middleware

1. What is middleware in the context of distributed systems?

a)    A type of hardware

b)    A set of services that enables applications and components to interact

c)    A programming language

d)    A database management system

Answer: b. A set of services that enables applications and components to interact

Explanation:

Middleware provides a layer of services that allow different applications and components to communicate and work together, hiding the complexity of the underlying network and systems.

 

2. Which of the following is NOT a function of middleware?

a)    Communication management

b)    Data storage

c)    Transaction management

d)    Security

Answer: b. Data storage

Explanation:

Middleware facilitates communication, transaction management, and security, but data storage is typically handled by databases or file systems.

 


 

3. Which type of middleware provides messaging services between applications?

a)    Database middleware

b)    Message-oriented middleware (MOM)

c)    Transactional middleware

d)    Object request broker (ORB)

Answer: b. Message-oriented middleware (MOM)

Explanation: 

MOM provides asynchronous messaging services, allowing applications to communicate by sending and receiving messages. 

 

4. What is an Object Request Broker (ORB) in middleware?

a)    A component that manages transactions

b)    A service that manages object communication

c)    A system that stores objects

d)    A type of database

Answer: b. A service that manages object communication

Explanation:

ORB facilitates communication between objects in a distributed environment, allowing them to invoke methods on remote objects as if they were local.

 5. Which middleware architecture is based on the remote procedure call (RPC) model?

a)    Message-oriented middleware (MOM)

b)    Database middleware

c)    Transactional middleware

d)    RPC middleware

Answer: d. RPC middleware

Explanation:

RPC middleware allows applications to invoke procedures or functions on remote systems as if they were local calls.

 

6. Which of the following is an example of middleware?

a)    Microsoft Word

b)    Apache Kafka

c)    Windows OS

d)    MySQL

Answer: b. Apache Kafka

Explanation:

Apache Kafka is a distributed messaging system, which is a type of middleware used for building real-time data pipelines and streaming applications.

 7. What is the primary purpose of transactional middleware?

a)    To ensure reliable messaging

b)    To manage and coordinate transactions across distributed systems

c)    To handle database queries

d)    To store and retrieve data

Answer: b. To manage and coordinate transactions across distributed systems

Explanation: Transactional middleware ensures the consistency and integrity of transactions across multiple systems and databases.

8. Which middleware provides services for the interaction between distributed components using a standardised communication protocol?

a)    RPC middleware

b)    Object middleware

c)    Message-oriented middleware (MOM)

d)    Web middleware

Answer: b. Object middleware

Explanation:

Object middleware, like CORBA, provides a standardized way for distributed objects to interact, often using protocols like IIOP.

 9. What is a common feature of web middleware?

a)    Facilitating communication between web clients and servers

b)    Managing database transactions

c)    Handling low-level hardware functions

d)    Storing large amounts of data

Answer: a. Facilitating communication between web clients and servers

Explanation:

Web middleware provides services such as HTTP request handling, session management, and data exchange between clients and servers.

 

10. Which middleware component ensures that messages are delivered in the order they were sent?

a)    Message broker

b)    Transaction manager

c)    Data replicator

d)    Message queue

Answer: d. Message queue

Explanation:

A message queue ensures that messages are delivered in the order they were sent, providing a reliable way to manage the sequence of messages between applications.





 

Consistency and Replication

1. What is the main purpose of data replication in distributed systems?

a)   To increase data redundancy

b)   To improve data availability and reliability

c)   To decrease network traffic

d)   To simplify data management 

Answer: b. To improve data availability and reliability

Explanation:

Data replication ensures that multiple copies of data are stored at different locations. This increases data availability (data can be accessed even if some nodes fail) and reliability (data is less likely to be lost).

 

2. Which consistency model ensures that all processes see the same value for a data item at all times?

a)    Eventual Consistency

b)    Weak Consistency

c)    Strict Consistency

d)    Causal Consistency 

Answer: c. Strict Consistency

 Explanation:

Strict consistency guarantees that any read operation on a data item returns the most recent write. Thus, all processes see the same value for a data item at any time.

 3. In which type of consistency model is it guaranteed that if a write is followed by a read, the read will always return the written value?

a)   Eventual Consistency

b)   Monotonic Read Consistency

c)   Read or Writes Consistency

d)   Causal Consistency

Answer:  c. Read or Writes Consistency

Explanation:

Read Your Writes Consistency ensures that after a process writes a value, any subsequent read by the same process will return that value.

 4. Which of the following is NOT a type of data consistency model in distributed systems?

a)   Strong Consistency

b)   Weak Consistency

c)   Sequential Consistency

d)   Transactional Consistency

Answer: d. Transactional Consistency

Explanation:

While transactional consistency is a concept in databases ensuring atomicity, consistency, isolation, and durability (ACID), it is not typically classified as a data consistency model in distributed systems like strict, eventual, or sequential consistency.

 


 

5. What is the main drawback of strong consistency models in distributed systems?

a)    High availability

b)    Low reliability

c)    Increased latency

d)    Decreased fault tolerance 

Answer: c. Increased Latency

Explanation:Strong consistency requires that all updates are propagated to all replicas before any read operation can proceed. This can cause increased latency as the system waits for updates to be acknowledged by all nodes.

 6. What is meant by "Eventual Consistency" in a distributed system?

a)    All replicas will converge to the same value eventually if no new updates are made

b)    All operations are completed eventually

c)    Data is always consistent after every write

d)    None of the above

Answer: a. All replicas will converge to the same value eventually if no new updates are made

Explanation:

Eventual consistency guarantees that, given enough time without new updates, all replicas will converge to the same value. This model allows temporary inconsistencies but ensures that consistency will be achieved eventually.

 

7. Which protocol is commonly used for maintaining consistency in distributed databases?

a)    HTTP

b)    Two-Phase Commit Protocol

c)    FTP

d)    DNS 

Answer: b. Two- Phase Commit Protocol

Explanation:The Two-Phase Commit Protocol (2PC) is a consensus protocol used to ensure that all nodes in a distributed system agree on a transaction's outcome, maintaining consistency across the database.

 8. In distributed systems, what is "Replication Transparency"?

a)    Users cannot see the replication process

b)    Users can choose which replica to access

c)    Replicas are visible to users

d)    None of the above 

Answer: a. Users cannot see the replication process

Explanation:Replication transparency means that the replication process is hidden from the users. Users interact with the system as if there is only a single copy of the data.

 9. Which of the following is a common challenge associated with replication in distributed systems?

a)    Data availability

b)    Data reliability

c)    Data consistency

d)    Data redundancy 

Answer: c. Data Consistency

Explanation: While replication can improve availability and reliability, it introduces the challenge of maintaining data consistency across all replicas, especially when updates are made frequently.

10. What is a quorum in the context of distributed systems and replication?

a)    The minimum number of nodes that must agree on a transaction

b)    The maximum number of replicas allowed

c)    A single point of failure in the system

d)    A type of consistency model

 

Answer: a. The minimum number of nodes that must agree on a transaction

Explanation:A quorum is the minimum number of nodes that must agree on a transaction for it to be considered committed. This helps ensure data consistency and fault tolerance in the system.

 

 

 Message-oriented communication in distributed systems

1. What is the primary purpose of message-oriented middleware (MOM) in distributed systems?

   a. To ensure data integrity in databases

   b. To facilitate communication between distributed applications

   c. To manage file storage

   d. To enhance security protocols

 

Answer:- B. To facilitate communication between distributed applications

 Reason: MOM is designed to enable communication between different applications in a distributed system by sending and receiving messages. It allows applications to exchange data and interact with each other asynchronously.

 

2. Which of the following is NOT a characteristic of message-oriented communication?

a. Asynchronous communication

   b. Synchronous communication

   c. Message queues

   d. Loose coupling

 

Answer:-  B. Synchronous communication

  Reason: Message-oriented communication is typically asynchronous, meaning that the sender and receiver do not need to interact with the message at the same time. Synchronous communication requires the sender and receiver to interact simultaneously, which is not a characteristic of message-oriented communication.

 

3. In a distributed system, which of the following is a key advantage of using message queues?

   a. Direct communication between components

   b. Immediate response time

   c. Decoupling of sender and receiver

   d. Increased latency

Answer:- C.Decoupling of sender and receiver

 Reason: Message queues allow the sender and receiver to operate independently, enabling them to be decoupled. This means the sender can send messages without waiting for the receiver to process them immediately, which improves the system's scalability and flexibility.

4. Which protocol is commonly used for message-oriented middleware?

  a. HTTP

   b. FTP

   c. SMTP

   d. AMQP

Answer : -D. AMQP

   Reason: AMQP (Advanced Message Queuing Protocol) is a widely used protocol for message-oriented middleware. It facilitates the reliable exchange of messages between systems.

5. What does the term "message broker" refer to in the context of message-oriented communication?

   a. A system that stores and forwards messages between applications

   b. A protocol for encrypting messages

   c. A method for direct communication

   d. A type of database

 

Answer:-  A. A system that stores and forwards messages between applications

Reason: A message broker is an intermediary program that translates messages from the formal messaging protocol of the sender to the formal messaging protocol of the receiver. It stores, routes, and forwards messages to ensure they reach their intended destination.

6. Which of the following is an example of a message-oriented middleware system?

   a. MySQL

   b. RabbitMQ

   c. Apache HTTP Server

   d. Microsoft Excel

Answer: - B.  RabbitMQ

 Reason: RabbitMQ is a well-known message broker that implements message-oriented middleware, allowing different systems to communicate via messages.

7. In message-oriented communication, what is a "topic"?

   a. A specific type of message queue

  b. A channel where messages are published for subscribers

  c. A protocol for message encryption

   d. A type of database schema

Answer: -- B. 

A channel where messages are published for subscribers

Reason: In the publish/subscribe model, a topic is a logical channel where publishers send messages and subscribers receive messages. It allows for one-to-many communication.

8. What does "publish/subscribe" model refer to in message-oriented communication?

   a. Direct sending of messages from sender to receiver

   b. Sending messages to a central server

   c. A messaging pattern where senders (publishers) send messages to a topic and receivers (subscribers) receive them

   d. A model for synchronous communication

Answer - C. A messaging pattern where senders (publishers) send messages to a topic and receivers (subscribers) receive them

 Reason: The publish/subscribe model allows publishers to send messages to a topic, and any subscribers to that topic can receive the messages. This model decouples the message producers from consumers.

 

9. Which of the following best describes "persistence" in message-oriented middleware?

   a. Ensuring messages are stored and not lost

  b. Encrypting messages for security

   c. Immediate delivery of messages

   d. Compressing messages to save space

Answer :- - A.  Ensuring messages are stored and not lost

 Reason: Persistence in message-oriented middleware means that messages are stored in a durable storage system so that they are not lost even if the system crashes or restarts. This ensures reliable message delivery.

 

10. Which of the following is NOT a benefit of message-oriented communication in distributed systems?

    a. Scalability

    b. Fault tolerance

    c. Tight coupling of components

   d. Load balancing

Answer- C. Tight coupling of components

 Reason: Tight coupling means that components are highly dependent on each other, which is not a benefit in distributed systems. Message-oriented communication aims to decouple components, making the system more scalable and fault-tolerant.




 

Logical Clocks

 

Question 1

Which of the following statements best describes a logical clock in a distributed system?

 

A) It relies on a global physical clock to synchronise events.

 

B) It orders events and captures causality without relying on physical time.

 

C) It uses physical timestamps to ensure event ordering.

 

D) It ensures that all processes have the same clock value at all times.

 

Answer: B

 

Reason: Logical clocks in distributed systems, such as Lamport's Logical Clock, are designed to order events and capture causality without depending on physical time. They provide a way to synchronise events across different nodes to ensure a consistent sequence of operations.

 

Question 2

What does the expression a→b signify in the context of Lamport's Logical Clock?

 

A) Event b happens before event a.

 

B) Event a and event b occur simultaneously.

 

C) Event a happens before event b.

 

D) Event a is independent of event b.

 

Answer: C

 

Reason: In Lamport's Logical Clock, the expression a→b (read as "a happens before b") means that all processes agree that event a occurs before event b.

 

Question 3

Which of the following conditions must hold for the happens-before relation in Lamport's Logical Clock?

 

A) If a and b are two events within the same process and a occurs before b, then a→b is true.

 

B) If a and b are two events within the same process and b occurs before a, then a→b is true.

 

C) If a is the receipt of a message by process and b is the sending of that message by process, then a→b is true.

 

D) A message can be received before it is sent.

 

Answer: A

 

Reason: The happens-before relation in Lamport's Logical Clock states that if a and b are two events within the same process and a occurs before b, then a→b is true. This ensures that the order of events within a single process is respected.

Question 4

What happens to the logical clock counter when a process sends a message to another process in Lamport's Logical Clock?

 

A) The counter is reset to zero.

 

B) The counter value is included with the message.

 

C) The counter is decremented by 1.

 

D) The counter is synchronized with the receiving process.

 

Answer: B

 

Reason: When a process sends a message to another process, it includes its current counter value with the message. This helps the receiving process to update its logical clock based on the sender's clock value.

Question 5

How does a receiving process update its logical clock upon receiving a message in Lamport's Logical Clock?

 

A) The receiver sets its local clock to the sender's clock value minus one.

 

B) The receiver sets its local clock to the sender's clock value plus one if its current clock is less than the sender's clock.

 

C) The receiver increments its local clock by 1.

 

D) The receiver does not update its local clock upon receiving a message.

 

Answer: B

 

Reason: Upon receiving a message, the recipient process updates its logical clock if its current clock is less than the sender's clock. Specifically, the recipient sets its local clock to the sender's clock value plus one to ensure causality is maintained.

Question 6

What is the primary purpose of vector clocks in distributed systems?

 

A) To synchronise all processes to the same physical time.

 

B) To determine if pairs of events are causally related.

 

C) To reset the system clocks periodically.

 

D) To reduce the number of messages transmitted in the system.

 

Answer: B

 

Reason: Vector clocks are used to determine whether pairs of events are causally related by comparing the timestamps associated with each event.

 

Question 7

What does the vector in a vector clock represent in a distributed system with N processes?

 

A) A single integer representing the global time.

 

B) A list of N integers representing the local clock of each process.

 

C) A binary value indicating the occurrence of events.

 

D) A matrix of values representing communication delays.

 

Answer: B

 

Reason: In a distributed system with N processes, the vector in a vector clock is a list of N integers, with each integer representing the local clock of one of the processes.

 

Question 8

What is the initial value of all clocks in a vector clock system?

A) All clocks are set to the current physical time.

B) All clocks are set to one.

C) All clocks are set to zero.

D) All clocks are set to the process ID.

Answer: C

Reason: Initially, all clocks in a vector clock system are set to zero to indicate that no events have occurred yet.

Question 9

How is the vector clock updated when a process sends a message?

A) The vector clock is reset to zero.

B) The sender's logical clock in the vector is incremented by 1.

C) The receiver's logical clock in the vector is incremented by 1.

D) The vector clock is synchronised with the global clock.

Answer: B

Reason: When a process sends a message, it increments the value of its logical clock in the vector by 1. This action updates the sender's logical clock to reflect the event of sending the message.

Question 10

What is the key advantage of vector clocks over Lamport clocks?

A) Vector clocks are simpler to implement.

B) Vector clocks can determine if any two events are causally dependent or concurrent.

C) Vector clocks require fewer messages to be sent.

D) Vector clocks provide a global ordering of events.

Answer: B

Reason: The key advantage of vector clocks over Lamport clocks is that vector clocks allow you to determine if any two arbitrarily selected events are causally dependent or concurrent, whereas Lamport timestamps cannot provide this information.

 

Structured Naming 

  1. What is the primary purpose of a naming service in a distributed system?
  • A. To manage the physical location of resources
  • B. To convert names into addresses or identifiers
  • C. To ensure secure communication between nodes
  • D. To handle data synchronization across systems

Answer: B

  1. In a hierarchical naming system, what is the primary characteristic of names?
  • A. They are based on the physical location of resources
  • B. They are randomly generated strings
  • C. They reflect the structure of the resource organization
  • D. They change dynamically with resource usage

Answer: C

  1. Which of the following is an example of a flat naming system?
  • A. DNS (Domain Name System)
  • B. IP addresses
  • C. URLs (Uniform Resource Locators)
  • D. File paths in a filesystem

Answer: B

  1. In the context of distributed systems, what does the term "name resolution" refer to?
  • A. The process of translating a human-readable name into a machine-understandable address
  • B. The process of creating new names for resources
  • C. The process of deleting unused names from the system
  • D. The process of ensuring name uniqueness across the system

Answer: A

  1. Which of the following best describes a namespace in a distributed system?
  • A. A central repository of all resource names
  • B. A hierarchical structure used to organize names
  • C. A unique identifier for each resource in the system
  • D. A protocol used for name resolution

Answer: B

  1. What is the main advantage of using a hierarchical naming system over a flat naming system?
  • A. Easier to implement
  • B. More efficient in terms of storage
  • C. Scales better with the number of resources
  • D. Provides better security features

Answer: C

  1. In a distributed system, which component typically handles the mapping between names and their corresponding addresses?
  • A. Name server
  • B. Router
  • C. Load balancer
  • D. Proxy server

Answer: A

  1. Which of the following protocols is most commonly associated with hierarchical naming in distributed systems?
  • A. HTTP
  • B. FTP
  • C. DNS
  • D. SMTP

Answer: C

  1. What is a potential drawback of using a centralized name server in a distributed system?
  • A. Increased latency in name resolution
  • B. Difficulty in managing resource names
  • C. Single point of failure
  • D. Lack of name uniqueness

Answer: C

  1.  Which of the following techniques can be used to ensure name uniqueness in a distributed system?
  • A. Hierarchical naming
  • B. Replication of name servers
  • C. Use of unique identifiers like UUIDs
  • D. Load balancing

Answer: C

 

Replica Management

1. What is the primary purpose of replica management in distributed systems?

a) To increase system security
b) To reduce data redundancy
c) To improve data availability and fault tolerance
d) To decrease network traffic

Answer: c) To improve data availability and fault tolerance

2. Which of the following is a common consistency model used in replica management?

a) Eventual consistency
b) Strong consistency
c) Weak consistency
d) All of the above

Answer: d) All of the above

3. In replica management, what is a "replica"?

a) A backup server
b) A copy of the data stored at multiple locations
c) A load balancer
d) A database management system

Answer: b) A copy of the data stored at multiple locations

4. What is the CAP theorem in the context of replica management?

a) It describes the relationship between cache, availability, and partition tolerance.
b) It states that a distributed system can simultaneously achieve consistency, availability, and partition tolerance.
c) It claims that consistency, availability, and partition tolerance cannot all be achieved at the same time.
d) It outlines the principles of caching algorithms in distributed systems.

Answer: c) It claims that consistency, availability, and partition tolerance cannot all be achieved at the same time.

5. Which of the following strategies is NOT typically used for replica placement?

a) Random placement
b) Round-robin placement
c) Geographical placement
d) Load-based placement

Answer: b) Round-robin placement

6. What is the role of quorum in replica management?

a) To determine the number of replicas needed for high availability
b) To ensure that a majority of replicas agree on any changes
c) To balance the load among different replicas
d) To provide security against data breaches

Answer: b) To ensure that a majority of replicas agree on any changes

7. In the context of replica management, what is "data divergence"?

a) When all replicas have the same data
b) When there is a slight delay in data replication
c) When replicas have different versions of the data
d) When data is encrypted during replication

Answer: c) When replicas have different versions of the data

8. Which of the following is a disadvantage of having too many replicas?

a) Increased fault tolerance
b) Increased data availability
c) Increased overhead and maintenance
d) Decreased read performance

Answer: c) Increased overhead and maintenance

9. What does "eventual consistency" guarantee in a distributed system?

a) Immediate consistency of all replicas
b) Consistency only under network partition conditions
c) That all replicas will become consistent over time
d) That all replicas will remain consistent forever

Answer: c) That all replicas will become consistent over time

10. Which replica update method applies changes to all replicas simultaneously?

a) Synchronous replication
b) Asynchronous replication
c) Incremental replication
d) Lazy replication

Answer: a) Synchronous replication

Fault Tolerance

Question 1

Which of the following best describes fault tolerance in distributed systems?

a. The ability to prevent faults from occurring.
b.. The ability to continue operation in the presence of faults.
c. The ability to recover data after a system crash.
d. The ability to detect and log errors in the system.

Correct Answer: B
Explanation: Fault tolerance is the capability of a system to continue functioning correctly even when some of its components fail.

Question 2

What is the primary purpose of redundancy in fault-tolerant systems?

a. To improve performance
b. To increase system complexity
c. To provide backup components that can take over in case of a failure
d. To reduce the cost of the system

Correct Answer: C
Explanation: Redundancy involves having extra components that can take over the function of failed components, ensuring continued operation.

Question 3

Which of the following is a common technique used to achieve fault tolerance in distributed systems?

a. Load balancing
b. Data encryption
c. Checkpointing and rollback
d. Data compression

Correct Answer: C
Explanation: Checkpointing involves saving the state of a system periodically, so that it can be restored to that state in case of a failure.

Question 4 

In a distributed system, what does 'fail-stop' behavior imply?

a. The system continues to operate with reduced functionality
b. The system attempts to repair itself automatically
c. A component stops functioning and halts operation when it fails
d. The system logs the error and alerts the administrator

Correct Answer: C
Explanation: Fail-stop behavior means that when a component fails, it stops working completely, making the failure easy to detect.

Question 5

What is the role of a 'heartbeat' in a distributed system?

a. To monitor the health and status of other components
b. To synchronize data between nodes
c. To encrypt communication between nodes
d. To manage load balancing among servers

Correct Answer: A
Explanation: A heartbeat is a periodic signal sent between components to indicate that they are still operational and to monitor their status.

Question 6

Which of the following is NOT a type of redundancy used in fault-tolerant systems?

a. Hardware redundancy
b. Software redundancy
c. Time redundancy
d. User redundancy

Correct Answer: D
Explanation: User redundancy is not a recognized form of redundancy in fault-tolerant systems, whereas hardware, software, and time redundancy are commonly used techniques.

Question 7

What is 'Byzantine fault tolerance' in the context of distributed systems?

a. The ability to tolerate faults where nodes crash silently
b. The ability to tolerate faults where nodes may act maliciously or unpredictably
c. The ability to tolerate faults caused by network partitioning
d. The ability to tolerate faults caused by hardware failure

Correct Answer: B
Explanation: Byzantine fault tolerance refers to the system's ability to handle cases where components may fail and provide conflicting information, potentially due to malicious behavior.

Question 8

Why is consensus important in fault-tolerant distributed systems?

a. To ensure data compression
b. To ensure all nodes in the system agree on a single state or value
c. To provide data encryption
d. To manage system logs efficiently

Correct Answer: B
Explanation: Consensus ensures that all nodes agree on a single state or value, which is crucial for maintaining consistency and reliability in distributed systems.

Question 9

What is the purpose of replication in a distributed system?

a. To increase system complexity
b. To reduce network bandwidth usage
c. To improve data availability and reliability
d. To compress data for storage efficiency

Correct Answer: C
Explanation: Replication involves creating copies of data on multiple nodes to ensure data availability and reliability, even if some nodes fail.

Question 10

In distributed systems, what is a 'quorum'?

a. A security protocol for data encryption
b. A threshold number of nodes that must agree for a decision to be made
c. A backup system for data recovery
d. A method of data compression

Correct Answer: B
Explanation: A quorum is the minimum number of nodes required to agree on a transaction or decision to ensure consistency and reliability in the system.

 

Process Resilience

Question 1:

Flat groups in process resilience are faster for what?

a. Easy setup
b. Sharing info with everyone
c. Handling a lot of work
d. Keeping secrets safe

Correct Answer: b. Sharing info with everyone
Explanation: Everyone can talk directly in flat groups, so updates spread quickly.

Question 2:

What's a downside of hierarchical groups?

a. Easy to set up with a leader
b. Faster failover
c. Doesn't scale well as workload grows
d. Less secure

Correct Answer: c. Doesn't scale well as workload grows
Explanation: A single leader in hierarchical groups can get overwhelmed with heavy workloads.

Question 3:

How do you make data redundant in a distributed system?

a. Saving process state
b. Balancing workload across servers
c. Creating copies of data on multiple servers
d. Switching to a backup component

Correct Answer: c. Creating copies of data on multiple servers
Explanation: Replication ensures data is available even if a server fails because there are copies elsewhere.

Question 4:

Active-passive vs. active-active replication:

a. Both process all requests at once.
b. Active-passive has one active server, others wait on standby.
c. Active-active is easier to set up.
d. Both offer the same level of data consistency.

Correct Answer: b. Active-passive has one active server, others wait on standby.
Explanation: Active-passive has one server working, while others wait for their turn.

Question 5:

What's the main reason for a load balancer in process resilience?

a. Restarting crashed processes automatically
b. Distributing incoming requests across servers
c. Keeping data copies in sync across servers
d. Saving process state for later use

Correct Answer: b. Distributing incoming requests across servers
Explanation: Load balancers distribute work to multiple servers, preventing overload and ensuring smooth operation.

Question 6:

What's the benefit of using checkpoints in a distributed system?

a. Continuously backing up data
b. Making communication faster between servers
c. Automatically switching to a backup component
d. Going back to a previous good state if something goes wrong

Correct Answer: d. Going back to a previous good state if something goes wrong
Explanation: Checkpoints allow the system to restore itself to a known working state if a failure occurs.

Question 7:

What's the role of a rollback mechanism in process resilience?

a. Restarting crashed processes after a set time
b. Reversing the system to a previous state saved in checkpoints
c. Sending traffic away from a failing server
d. Making sure data copies across servers are identical

Correct Answer: b. Reversing the system to a previous state saved in checkpoints
Explanation: Rollback allows the system to revert to a previous good state captured through checkpoints, minimizing the impact of failures.

Question 8:

Round-robin load balancing works by:

a. Sending requests to the least busy server
b. Prioritizing traffic based on user needs
c. Assigning requests to servers in a round-robin fashion (one after another)
d. Restarting failed servers automatically

Correct Answer: c. Assigning requests to servers in a round-robin fashion (one after another)
Explanation: Round-robin assigns requests to servers in a sequence, like taking turns.

Question 9:

What's a limitation of manual failover compared to automatic failover?

a. Easier to understand
b. More flexible for specific situations
c. Both a & b
d. Requires human intervention (slower recovery)

Correct Answer: d. Requires human intervention (slower recovery)
Explanation: Manual failover requires someone to manually switch to a backup, which takes time.

Question 10:

Choosing active-active vs. active-passive replication: What's a key factor to consider?

a. Cost
b. Performance
c. Simplicity
d. Data consistency

Correct Answer: d. Data consistency
Explanation: Maintaining consistent data across multiple active servers in active-active requires more complex mechanisms.

 

Token Ring Algorithm

Question 1:

In a Token Ring network, what mechanism is used to prevent data collisions?

a. Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
b. Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)
c. Token Passing
d. Time Division Multiplexing (TDM)

Correct Answer: c. Token Passing
Explanation: Token Passing allows only the device holding the token to transmit data, thus preventing collisions.

Question 2:

What is the main advantage of a Token Ring network over Ethernet networks using CSMA/CD?

a. Higher transmission speeds
b. Simpler implementation
c. Collision-free data transmission
d. Lower cost

Correct Answer: c. Collision-free data transmission
Explanation: Token Ring networks inherently avoid collisions by ensuring that only one device can transmit data at a time through the use of a token.

Question 3:

In a Token Ring network, what happens when a device wants to transmit data?

a. It waits for a clear channel
b. It sends data immediately
c. It waits for the token
d. It checks for collisions

Correct Answer: c. It waits for the token
Explanation: A device must wait to receive the token before it can transmit data in a Token Ring network.

Question 4:

What is the primary role of the token in a Token Ring network?

a. To synchronize all devices
b. To grant permission to transmit data
c. To provide error correction
d. To increase network speed

Correct Answer: b. To grant permission to transmit data
Explanation: The token grants permission to the device holding it to transmit data, ensuring orderly communication.

Question 5:

How does a device in a Token Ring network know when its data has been successfully received by the destination?

a. It receives an acknowledgment
b. The token is returned to the sender
c. It checks for collisions
d. It relies on a central controller

Correct Answer: a. It receives an acknowledgment
Explanation: The destination device sends an acknowledgment back to the sender to confirm receipt of the data.

Question 6:

What is the typical topology of a Token Ring network?

a. Star
b. Bus
c. Ring
d. Mesh

Correct Answer: c. Ring
Explanation: Token Ring networks are typically arranged in a ring topology, where each device is connected to two other devices forming a circular pathway.

Question 7:

In a Token Ring network, what happens if the token is lost or corrupted?

a. The network stops functioning
b. A new token is generated
c. Data transmission continues without the token
d. All devices reset

Correct Answer: b. A new token is generated
Explanation: If the token is lost or corrupted, the network will generate a new token to restore normal operation.

Question 8:

What is the maximum number of devices typically supported in a standard Token Ring network?

a. 10
b. 100
c. 255
d. 1024

Correct Answer: b. 100
Explanation: Standard Token Ring networks typically support up to 100 devices, although this can vary based on specific implementations.

Question 9:

Which layer of the OSI model does the Token Ring protocol operate at?

a. Physical layer
b. Data Link layer
c. Network layer
d. Transport layer

Correct Answer: b. Data Link layer
Explanation: The Token Ring protocol operates at the Data Link layer, which is responsible for node-to-node data transfer and error detection.

Question 10:

What type of cable is commonly used in Token Ring networks?

a. Coaxial cable
b. Twisted pair cable
c. Fiber optic cable
d. Ethernet cable

Correct Answer: b. Twisted pair cable
Explanation: Twisted pair cables are commonly used in Token Ring networks for their flexibility and ease of installation.

Question 11:

Which of the following is a key characteristic of distributed systems?

a. Centralised control
b. Scalability
c. Single point of failure
d. No network communication

Correct Answer: b. Scalability
Explanation: Scalability is a key characteristic of distributed systems, allowing them to handle a growing amount of work by adding resources to the system.

 Mutual exclusion 

Question 1:

What is the primary goal of mutual exclusion in distributed systems?

a. Maximize throughput
b. Ensure exclusive access to shared resources
c. Minimize latency
d. Maximize resource utilization

Answer: b. Ensure exclusive access to shared resources
Explanation: Mutual exclusion ensures that only one process can access a shared resource at a time, preventing data corruption and ensuring consistency.

Question 2:

Which of the following algorithms is NOT commonly used for achieving mutual exclusion in distributed systems?

a. Ricart-Agrawala Algorithm
b. Lamport's Bakery Algorithm
c. Token Ring Algorithm
d. Chandy-Misra Algorithm

Answer: d. Chandy-Misra Algorithm
Explanation: While the Chandy-Misra algorithm is relevant to distributed systems, it is primarily used for garbage collection and not specifically for mutual exclusion.

Question 3:

In the Lamport's Bakery Algorithm, what role does the "number" assigned to each process serve?

a. It determines process priority.
b. It indicates the order of resource access requests.
c. It helps in identifying deadlocks.
d. It manages process states.

Answer: b. It indicates the order of resource access requests.
Explanation: In Lamport's Bakery Algorithm, each process gets a number that signifies its turn in accessing the critical section, thus ensuring mutual exclusion.

Question 4:

Which of the following is a disadvantage of using centralized approaches for mutual exclusion?

a. Complexity
b. Single point of failure
c. Low performance
d. Inflexibility

Answer: b. Single point of failure
Explanation: Centralized approaches can lead to a single point of failure, where if the coordinator fails, mutual exclusion can be disrupted.

Question 5:

In the Ricart-Agrawala algorithm, how does a process indicate that it wants to enter its critical section?

a. By sending a message to all processes
b. By waiting for a token
c. By broadcasting a request
d. By sending a timestamp

Answer: a. By sending a message to all processes
Explanation: In the Ricart-Agrawala algorithm, a process sends a request message to all other processes to indicate its desire to enter the critical section.

Question 6:

Which of the following properties must a mutual exclusion algorithm satisfy?

a. Safety and Liveness
b. Consistency and Availability
c. Integrity and Performance
d. Fairness and Scalability

Answer: a. Safety and Liveness
Explanation: Mutual exclusion algorithms must ensure safety (only one process in the critical section) and liveness (every request eventually gets granted).

Question 7:

In a token-based mutual exclusion algorithm, what is the role of the token?

a. It identifies the primary process.
b. It grants permission to enter the critical section.
c. It helps in message passing.
d. It maintains system state.

Answer: b. It grants permission to enter the critical section.
Explanation: In token-based algorithms, possession of the token indicates that a process is allowed to enter its critical section.

Question 8:

What happens if a process crashes while holding the token in a token-based mutual exclusion algorithm?

a. The system automatically recovers the token.
b. The token is lost, causing deadlock.
c. Other processes can continue without the token.
d. The system must be manually restarted.

Answer: a. The system automatically recovers the token.
Explanation: Many token-based systems implement recovery mechanisms to regenerate or redistribute the token if a process crashes.

Question 9:

Which of the following is true about the wait-free property in mutual exclusion?

a. All processes must wait for a lock.
b. No process should be starved indefinitely.
c. Every process can complete its operation in a finite number of steps.
d. Only one process can enter the critical section at a time.

Answer: c. Every process can complete its operation in a finite number of steps.
Explanation: Wait-free algorithms ensure that every process can complete its critical section without waiting indefinitely, making them highly responsive.

Question 10:

The term "fairness" in mutual exclusion refers to:

a. Equal resource allocation among processes.
b. No process should be indefinitely delayed from entering the critical section.
c. Every process must enter the critical section exactly once.
d. Each process must use the resources equally.

Answer: b. No process should be indefinitely delayed from entering the critical section.
Explanation: Fairness ensures that all processes get a chance to access the critical section without any of them being starved indefinitely.

 

RPC 

1. What is the primary purpose of Remote Procedure Call (RPC) in distributed systems?

a. To provide a way to call functions locally

b. To allow a program to execute a procedure on a remote server as if it were local

c. To encrypt communication between client and server

d. To manage database transactions

Answer: b. To allow a program to execute a procedure on a remote server as if it were local

Explanation: The primary purpose of RPC is to enable a program to call procedures on a remote server as if they were local calls, thus hiding the complexity of network communication.

2. Which of the following best describes an RPC mechanism?

a. A protocol for remote file access

b. A protocol for sending emails

c. A protocol that enables a program to cause a procedure to execute in another address space

d. A protocol for real-time video streaming

Answer: c. A protocol that enables a program to cause a procedure to execute in another address space

 Explanation: RPC mechanisms are designed to allow procedures to execute in different address spaces, typically on a remote server, making it a fundamental part of distributed systems.

3.Which layer of the OSI model does RPC typically operate at?

a. Application Layer

b. Presentation Layer

c. Session Layer

d. Transport Layer

Answer: a. Application Layer

Explanation: RPC operates at the Application Layer of the OSI model, which is responsible for providing network services to end-user applications.

4. What is an IDL (Interface Definition Language) used for in RPC systems?

a. To define the interfaces that can be called remotely

b. To compress data before transmission

c. To encrypt communication

d. To monitor network traffic

Answer: a. To define the interfaces that can be called remotely

Explanation: IDL (Interface Definition Language) is used to specify the interfaces of the procedures that can be called remotely, facilitating communication between different systems.

5. What is the main advantage of using RPC in distributed systems?

a. Simplifies the complexity of network communication

b. Increases network bandwidth

c. Reduces the number of servers needed

d. Enhances database performance

Answer: a. Simplifies the complexity of network communication

Explanation: RPC abstracts the details of network communication, making it easier for developers to write distributed applications without needing to manage the underlying network details.

6. In the context of RPC, what does the term "marshalling" refer to?

a. Encrypting the data before transmission

b. Compressing the data before transmission

c. Converting the procedure parameters into a format suitable for transmission

d. Storing procedure calls for future use

Answer: c. Converting the procedure parameters into a format suitable for transmission

Explanation: Marshalling refers to the process of converting the procedure parameters into a format that can be transmitted over the network and understood by the receiving system.

 

7. Which of the following is NOT a characteristic of RPC?

a. Synchronous communication

b. Transparency of remote calls

c. Automatic data serialization

d. Guaranteed message delivery

Answer: d. Guaranteed message delivery

Explanation: RPC does not inherently guarantee message delivery. This must be managed by additional protocols or application logic to handle potential communication failures.

8. What is a "stub" in RPC terminology?

a. A protocol for data encryption

b. A small program that acts as an intermediary between client and server

c. A mechanism for error handling

d. A tool for network monitoring

Answer: b. A small program that acts as an intermediary between client and server

Explanation: In RPC, a stub is a small program that acts as an intermediary, handling the details of the procedure call, data marshalling, and communication between the client and server.

9. How does an RPC handle communication failures?

a. By ignoring them

b. By retrying the call or returning an error to the caller

c. By compressing the data more

d. By switching to a different protocol

Answer: b. By retrying the call or returning an error to the caller

Explanation: RPC systems typically handle communication failures by retrying the call or returning an error to the caller, allowing the application to decide how to handle the failure.

10. Which of the following protocols is commonly used to implement RPC?

a. FTP

b. HTTP

c. TCP

d. SMTP

Answer: c. TCP

Explanation: TCP is a common protocol used to implement RPC because it provides reliable, ordered, and error-checked delivery of a stream of data between applications running on hosts on an IP network.

MCQ questions of reliable client-server communication(Ashmita)

1. Question: Which protocol ensures reliable communication between a client and server?

 a. UDP
b. TCP
c. HTTP
d. FTP

Answer: b. TCP

Explanation: Transmission Control Protocol (TCP) is a connection-oriented protocol for communications that helps in the exchange of messages between different devices over a network.

2. Question: What is the primary function of TCP's acknowledgment mechanism?

a. Ensure data integrity
b. Prevent packet loss
c. Verify successful data transmission
d. Encrypt data packets

Answer: c. Verify successful data transmission

Explanation: TCP's acknowledgment mechanism (ACK) verifies successful data transmission by acknowledging receipt of data segments from the sender, ensuring reliable delivery.

3. Question: What TCP feature ensures that data sent by the sender is received in the same order by the receiver?

a. Sequence numbers
b. Window size
c. Checksum
d. ACK

Answer: a. Sequence numbers

Explanation: Sequence numbers in TCP headers ensure that data sent by the sender is received and reassembled in the correct order by the receiver.

4. Question: What happens if a segment is lost and not acknowledged by the receiver?

a. The segment is retransmitted
b. The connection is terminated
c. The sender sends an ICMP message
d. The segment is ignored

Answer: a. The segment is retransmitted

Explanation: TCP uses retransmission to ensure reliable delivery of data. If a segment is lost and not acknowledged, the sender retransmits the segment to the receiver.

5. Question: What is the purpose of the TCP checksum field?

a. Ensures ordered delivery of packets
b. Detects errors in the TCP header
c. Verifies the integrity of data
d. Identifies the port number of the sender

Answer: c. Verifies the integrity of data

Explanation: The TCP checksum field verifies the integrity of data by detecting errors in the TCP segment during transmission, ensuring that the data received is identical to what was sent.

6. Question: Which TCP field specifies the number of bytes of data being sent?

a. ACK number
b. Window size
c. Length
d. Sequence number

Answer: c. Length

Explanation: The Length field in the TCP header specifies the number of bytes of data being sent in the TCP segment, aiding in efficient data transmission.

7. Question: What happens if TCP detects excessive congestion in the network?

a. Increases the window size
b. Reduces the window size
c. Terminates the connection
d. Ignores the congestion

Answer: b. Reduces the window size

Explanation: TCP reduces the window size when excessive congestion is detected to alleviate network congestion and prevent packet loss.

8. Question: What mechanism does TCP use to ensure data reliability?

a. UDP
b. Checksums
c. Acknowledgment and retransmission
d. Port numbers

Answer: c. Acknowledgment and retransmission

Explanation: TCP uses acknowledgment and retransmission mechanisms to ensure data reliability. The receiver acknowledges receipt of each segment, and if the sender doesn’t receive an acknowledgment within a specified timeout period, it retransmits the segment.

9. Question: Which TCP feature is responsible for managing the rate of data transmission to avoid network congestion?

a. Error checking
b. Flow control
c. Congestion control
d. Port numbers

Answer: b. Flow control

Explanation: Flow control in TCP regulates the rate of data transmission between a client and server to prevent the receiver from being overwhelmed by data. It ensures efficient use of network resources and avoids congestion.

10. Question: Which TCP feature ensures that data transmitted over the network arrives without errors?

a. Sequence numbers
b. Checksum
c. Acknowledgment
d. Flow control

Answer: b. Checksum

Explanation: TCP uses a checksum to detect errors in transmitted data. The sender calculates a checksum for each segment of data sent, and the receiver verifies this checksum upon receipt to ensure data integrity.