CS417 Exam 2
Spring 2023
Paul Krzyzanowski
100 Points - 25 questions - 4 points each.
For each statement, select the most appropriate answer.
- How does the token ring algorithm for distributed mutual exclusion work?
(a) A process passes a message to its neighbor that grants access to a resource.
(b) A central coordinator assigns tokens to processes based on their priority.
(c) Processes send requests to all other processes in the system to request a token for a resource.
(d) Processes use timestamps to determine the order in which tokens should be granted. - What is the primary communication pattern used in Ricart and Agrawala's mutual exclusion algorithm?
(a) Processes send requests to a central coordinator.
(b) Processes communicate directly only with the process holding the shared resource.
(c) Processes communicate only with their immediate neighbors in the system.
(d) Processes send requests to all other processes in the system. - Which of the following best describes the Bully election algorithm?
(a) Processes with higher IDs win over those with lower IDs to become the leader.
(b) Processes forward election messages to their neighbor to select a leader.
(c) Processes use timestamps to determine the order of election messages.
(d) Processes solicit votes from other processes and the one with the most votes wins. - The Chang and Roberts election algorithm improves the Ring algorithm by:
(a) Having a process to skip over a non-responding neighbor when forwarding a message.
(b) Allowing a process to terminate an election if one is already being held.
(c) Not requiring an election message to circulate through all live processes to elect a leader.
(d) Using a multicast protocol to send an election message to all group members at once. - What is the primary goal of the Raft consensus algorithm?
(a) Load balancing requests among a set of processes.
(b) Reliable distributed data storage.
(c) Sending updates to a group of replicas in a fault-tolerant manner.
(d) Reliable data retrieval even in partitioned networks. - What is the minimum number of nodes in a Raft cluster required to tolerate a single node failure?
(a) 2 nodes.
(b) 3 nodes.
(c) 4 nodes.
(d) 5 nodes. - How does the election protocol in Raft avoid ties (split votes)?
(a) Requiring an odd number of processes in the system.
(b) Having each process wait a random amount of time before starting an election.
(c) Using logical clocks with totally-ordered timestamps in each message.
(d) Passing all messages through a coordinator. - An AFS file server must track the following state of clients:
(a) What files each client has open for reading or writing.
(b) Whether a client is running and connected to the network.
(c) What files each client has open for writing.
(d) What files each client downloaded. - AFS was designed to scale to bigger environments than NFS. The primary way it did this was by:
(a) Enabling the contents of a file to be distributed across multiple servers.
(b) Using a protocol employing compound RPCs, so that each message may contain multiple operations.
(c) Switching to a TCP-based protocol instead of UDP.
(d) Allowing clients to cache files for a long time without checking for updates. - What is the primary advantage of the Coda file system compared to AFS?
(a) Better load balancing.
(b) Enhanced data compression.
(c) Stronger focus on scalability.
(d) Improved fault tolerance. - Microsoft SMB oplocks (and leases in later versions of the protocol):
(a) Tell a client what data it can cache and whether it can delay sending updates to the server.
(b) Are a distributed mutual exclusion mechanism to allow a client to get exclusive access to a file.
(c) Allow a client to download a local copy of a file and enable the server to block anyone else from accessing it.
(d) Allow multiple clients to lock different parts of the same file. - Which is not a feature of the Hadoop Distributed File System (HDFS)?
(a) It requires a client library to access files.
(b) It uses a distributed hash table (DHT) to locate file contents.
(c) The contents of a single file may be spread across multiple servers.
(d) The protocol for writing file data supports n-way replication. - Google's Chubby is not suited for providing a way for a group of computers to:
(a) Elect a leader.
(b) Obtain advisory locks.
(c) Subscribe to asynchronous event notifications.
(d) Store large files whose contents span multiple servers. - Which statement is not true about the differences between the Google File System (GFS) and Amazon Dynamo?
(a) GFS replicates data for fault tolerance while Dynamo does not but writes data to another server if one is down.
(b) GFS relies on a central coordinator while Dynamo is fully distributed.
(c) GFS allows appending data to an object while Dynamo requires updating the entire object.
(d) GFS supports a relatively small number of huge objects while Dynamo supports a huge number of small objects. - Which of the following is a key feature of the Content-Addressable Network (CAN)?
(a) It uses a multi-dimensional coordinate space to store and locate objects.
(b) It creates a hierarchical structure for data organization.
(c) It enables the rapid location of an object by sending a query to all peers on an overlay network.
(d) It uses consistent hashing to distribute the data associated with an object across multiple servers. - Differing from normal hash functions, consistent hashing:
(a) Produces a fixed-length value for any input.
(b) Ensures that each key will be hashed to a unique value so that collisions will not occur.
(c) Is a deterministic function that always produces the same result when applied repeatedly to a key.
(d) Reduces the number of keys that must be remapped if the size of the hash table changes. - Which describes the purpose of finger tables in a distributed hash table (DHT) system such as Chord?
(a) To enable each server to store the entire list of nodes in the group.
(b) To create a local hash table for the rapid access of objects stored within the node.
(c) To provide an efficient routing mechanism for key lookups without storing a list of all the nodes.
(d) To store a complete hash table on each node with all the keys and references to nodes where the data is stored. - How does Amazon Dynamo deal with the possibility of clients making concurrent updates to the value of an object?
(a) It uses mutual exclusion to provide an exclusive lock on the object while it is being modified.
(b) It uses state machine replication to ensure all replicas are updated atomically and consistently.
(c) It associates a vector timestamp with an object that is updated whenever a client updates the object.
(d) Client requests are funneled through a central coordinator that dispatches them serially. - What does the CAP theorem state about distributed systems?
(a) A system can achieve both consistency and availability, but not partition tolerance.
(b) A system can achieve consistency or availability but not both if partitions occur.
(c) Neither consistency nor availability is possible if partitions occur.
(d) A system can achieve consistency, availability, and partition tolerance, but at the cost of performance. - How does the three-phase commit protocol (3PC) improve upon the two-phase commit protocol?
(a) By increasing the number of phases needed to get a vote on committing or aborting.
(b) By propagating the results of the vote to provide more opportunities for the protocol to abort rather than wait.
(c) By removing the need for a transaction coordinator.
(d) By enabling transactions to be committed with a majority consensus. - Which ACID property ensures that a transaction is either fully completed or rolled back, without leaving the system in an intermediate state?
(a) Atomicity.:
(b) Consistency.
(c) Isolation.
(d) Durability. - In which scenario is the BASE transaction model typically preferred over the ACID model?
(a) When strong consistency is more important than high availability.
(b) When performance and high availability are more important than consistency.
(c) When the application requires distributed transactions.
(d) When the application requires strict isolation between transactions. - The purpose of two-phase locking is to:
(a) Ensure serial ordering even if transactions might read uncommitted data.
(b) Control the order in which transactions access resources to prevent deadlock.
(c) Provide a mechanism for rollback in case a transaction must abort.
(d) Get distributed consensus on who gets a lock. - What is the primary goal of Multiversion Concurrency Control (MVCC) in a database system?
(a) To improve write performance by allowing multiple transactions to modify the same resource simultaneously.
(b) To increase the database system's fault tolerance by storing backup copies of objects.
(c) To ensure transactions can always read data without blocking.
(d) To ensure that transactions always access the latest version of a resource. - How does the wait-die algorithm deal with deadlock?
(a) If a transaction detects a circular wait will occur, it waits, checks again, and aborts if it still cannot get the lock.
(b) A transaction waits on a lock with a timeout and aborts if it cannot get the lock within the allowed time.
(c) If a transaction needs a lock held by an older transaction, it aborts itself even if a deadlock would not have occurred.
(d) Transactions get leases instead of locks and must abort if the lease expires.