1. Home
  2. Explore
  3. Computer Science
  4. Distributed Systems Consensus

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Distributed Systems Consensus

  • 65Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Consensus Foundations

What is the fundamental objective of consensus in a distributed system?

65 questions

  1. 1

    What is the fundamental objective of consensus in a distributed system?

    1. A

      To eliminate the need for communication among distributed processes

    2. B

      To ensure that the fastest process controls every future decision

    3. C

      To allow every process to preserve its own preferred value independently

    4. D

      To ensure that all processes choose one proposed value as the shared truth

    Correct answer
    D

    To ensure that all processes choose one proposed value as the shared truth

    Explanation

    Consensus requires distributed processes to agree on one value from among the proposed values, making that value the shared source of truth for the decision.

  2. 2

    Which situation best illustrates why consensus is needed in a distributed online game?

    1. A

      Servers might store the game software in different programming languages

    2. B

      Players might choose different usernames when joining the game

    3. C

      Different servers might record different players as owning the same unique item

    4. D

      Players might use different graphical settings on different computers

    Correct answer
    C

    Different servers might record different players as owning the same unique item

    Explanation

    Consensus ensures that updates, such as acquiring a rare item, are recorded consistently across servers so that the game world does not contain contradictory states.

  3. 3

    How can consensus support a shared configuration service?

    1. A

      It prevents services from changing configuration settings after deployment

    2. B

      It allows each service to select configuration settings based on local performance

    3. C

      It ensures that all services use the same current configuration settings

    4. D

      It stores configuration data only on the service with the fastest response time

    Correct answer
    C

    It ensures that all services use the same current configuration settings

    Explanation

    Consensus prevents different services from operating with conflicting or outdated configuration values.

  4. 4

    Which statement expresses the safety requirement that prevents phantom decisions?

    1. A

      Only the first value received by an acceptor may be chosen

    2. B

      Every process must propose the same value initially

    3. C

      Every proposed value must eventually be chosen

    4. D

      Only a value that was proposed may be chosen

    Correct answer
    D

    Only a value that was proposed may be chosen

    Explanation

    The first safety condition requires every chosen value to have originated as a legitimate proposal.

  5. 5

    What does the single-value safety requirement guarantee?

    1. A

      A chosen value must be accepted by every process

    2. B

      No two different values can be chosen for the same decision

    3. C

      Every process receives the chosen value at exactly the same time

    4. D

      Only one process is allowed to propose a value

    Correct answer
    B

    No two different values can be chosen for the same decision

    Explanation

    The single-value rule ensures that a decision has only one immutable result rather than multiple conflicting realities.

  6. 6

    What does the safety rule about learning a chosen value prevent?

    1. A

      A process from believing a value was chosen when it was not

    2. B

      An acceptor from storing a value after accepting a proposal

    3. C

      A proposer from changing its value before sending a request

    4. D

      A process from learning a value after another process learned it

    Correct answer
    A

    A process from believing a value was chosen when it was not

    Explanation

    A process must not learn that a value was chosen unless that value really was chosen, preventing false reports and incorrect actions.

  7. 7

    Which statement best distinguishes liveness from safety?

    1. A

      Safety prevents incorrect decisions, whereas liveness requires eventual progress

    2. B

      Safety concerns malicious behavior, whereas liveness concerns data formatting

    3. C

      Safety allows multiple decisions, whereas liveness restricts decisions to one value

    4. D

      Safety requires fast messages, whereas liveness permits only reliable messages

    Correct answer
    A

    Safety prevents incorrect decisions, whereas liveness requires eventual progress

    Explanation

    Safety means the system never violates correctness, while liveness means that a value is eventually chosen and can eventually be learned.

  8. 8

    Which pair of conditions captures the liveness goals described for consensus?

    1. A

      Every proposed value is eventually chosen, and all processes propose simultaneously

    2. B

      Some proposed value is eventually chosen, and processes eventually learn a chosen value

    3. C

      All acceptors remain operational, and no proposal is ever delayed

    4. D

      A leader is always present, and every message arrives immediately

    Correct answer
    B

    Some proposed value is eventually chosen, and processes eventually learn a chosen value

    Explanation

    Liveness requires the system to make a decision eventually and allows processes to eventually discover that decision.

  9. 9

    Why does a single-acceptor design fail to provide fault tolerance?

    1. A

      If the acceptor receives messages, all values are automatically chosen

    2. B

      If the acceptor succeeds, every proposer must be rejected

    3. C

      If the acceptor fails, no further decisions can be made

    4. D

      If the acceptor restarts, proposers are permanently prevented from communicating

    Correct answer
    C

    If the acceptor fails, no further decisions can be made

    Explanation

    A single acceptor is a single point of failure: its crash or disconnection prevents additional progress.

  10. 10

    What does the asynchronous model assume about process speeds?

    1. A

      Processes operate at the same fixed speed

    2. B

      Processes operate only when synchronized by a central clock

    3. C

      Processes may operate at arbitrary and unpredictable speeds

    4. D

      Processes must respond within a known time limit

    Correct answer
    C

    Processes may operate at arbitrary and unpredictable speeds

    Explanation

    Asynchrony means that processes can be fast, slow, or paused for unpredictable periods, with no dependable timing bound.

  11. 11

    What kinds of failures can processes experience in the model described?

    1. A

      They can stop, crash, restart, and lose volatile knowledge

    2. B

      They can deliberately send false information after every restart

    3. C

      They can change messages while remaining continuously operational

    4. D

      They can only slow down but cannot stop or restart

    Correct answer
    A

    They can stop, crash, restart, and lose volatile knowledge

    Explanation

    Processes may crash and later restart without remembering everything that was held in volatile memory.

  12. 12

    Why is stable storage necessary for Paxos acceptors?

    1. A

      Acceptors must recover promises and accepted proposals after a crash

    2. B

      Acceptors use stable storage to guarantee that messages arrive once

    3. C

      Acceptors need stable storage to prevent proposers from generating numbers

    4. D

      Acceptors need stable storage to calculate network latency

    Correct answer
    A

    Acceptors must recover promises and accepted proposals after a crash

    Explanation

    Durable storage preserves the highest promise and accepted proposal across crashes, preventing an acceptor from later making conflicting choices.

  13. 13

    Which network behavior is allowed by the asynchronous model?

    1. A

      Messages must arrive within a known upper time bound

    2. B

      Messages may be delayed arbitrarily, duplicated, or lost

    3. C

      Messages may be intentionally altered by honest processes

    4. D

      Messages are guaranteed to arrive exactly once and in order

    Correct answer
    B

    Messages may be delayed arbitrarily, duplicated, or lost

    Explanation

    The model permits unpredictable delays, duplicate delivery, and loss, but does not assume message corruption.

  14. 14

    What does non-Byzantine mean in the Paxos system model?

    1. A

      Processes never fail, but messages may be corrupted by attackers

    2. B

      Processes may send arbitrary false messages whenever they choose

    3. C

      Processes must reveal all private information before proposing values

    4. D

      Processes may crash or be slow, but they do not intentionally lie

    Correct answer
    D

    Processes may crash or be slow, but they do not intentionally lie

    Explanation

    Non-Byzantine participants are unreliable in benign ways, such as crashing or delaying, but are not malicious and do not intentionally send false information.

  15. 15

    Which role initiates proposals for values that might be chosen?

    1. A

      The coordinator

    2. B

      The learner

    3. C

      The acceptor

    4. D

      The proposer

    Correct answer
    D

    The proposer

    Explanation

    Proposers generate and submit candidate values, such as commands or state updates.

  16. 16

    What is the primary responsibility of an acceptor?

    1. A

      To replace every failed process in the consensus group

    2. B

      To display the final result without participating in decisions

    3. C

      To evaluate proposals and accept them while enforcing consistency

    4. D

      To generate all client commands before they reach the system

    Correct answer
    C

    To evaluate proposals and accept them while enforcing consistency

    Explanation

    Acceptors receive proposals, record acceptances, and enforce the rules that prevent conflicting values from being chosen.

  17. 17

    What is the primary responsibility of a learner?

    1. A

      To maintain the acceptors' durable promise records

    2. B

      To reject every proposal with a lower number

    3. C

      To discover the value that acceptors have chosen

    4. D

      To assign proposal numbers to competing proposers

    Correct answer
    C

    To discover the value that acceptors have chosen

    Explanation

    Learners receive information about acceptances and use it to determine which value was chosen.

  18. 18

    What does it mean that the roles in Paxos are logical roles?

    1. A

      The roles describe network hardware rather than software responsibilities

    2. B

      Only learners may perform more than one role at a time

    3. C

      Each role must always run on a separate physical computer

    4. D

      One physical computer may perform the proposer, acceptor, and learner roles

    Correct answer
    D

    One physical computer may perform the proposer, acceptor, and learner roles

    Explanation

    The roles separate responsibilities conceptually; a single machine can perform several or all of them in an implementation.

  19. 19

    When is a proposal considered chosen in the majority-based Paxos approach?

    1. A

      When one acceptor has accepted the proposal twice

    2. B

      When every proposer has sent the same value

    3. C

      When a majority of acceptors have accepted that proposal

    4. D

      When a learner receives the proposal from any process

    Correct answer
    C

    When a majority of acceptors have accepted that proposal

    Explanation

    A specific proposal is chosen after it has been accepted by a majority of the acceptors.

  20. 20

    Why do any two majorities of the same acceptor group overlap?

    1. A

      A group larger than half the acceptors cannot be disjoint from another such group

    2. B

      The proposer explicitly selects the same acceptors for every majority

    3. C

      Every acceptor is configured to join exactly two majority groups

    4. D

      Learners copy each majority into the same physical storage location

    Correct answer
    A

    A group larger than half the acceptors cannot be disjoint from another such group

    Explanation

    Two groups each containing more than half of the acceptors must share at least one acceptor.

  21. 21

    How does majority overlap help prevent two different values from being chosen?

    1. A

      The shared acceptor automatically informs all learners of the first value

    2. B

      The shared acceptor forces all proposers to use identical proposal numbers

    3. C

      The shared acceptor rejects every proposal regardless of its number

    4. D

      The shared acceptor would have to accept both values, which is prohibited

    Correct answer
    D

    The shared acceptor would have to accept both values, which is prohibited

    Explanation

    If two different proposals each had a majority, their majorities would overlap. An acceptor that accepts at most one value could not belong to both acceptances.

  22. 22

    Why does the naive rule of accepting the first proposal received threaten liveness?

    1. A

      Acceptors cannot store a proposal unless all messages arrive in order

    2. B

      Different proposers may divide acceptances so that neither proposal gets a majority

    3. C

      The rule allows one acceptor to accept every possible value

    4. D

      The first proposal always causes every acceptor to crash

    Correct answer
    B

    Different proposers may divide acceptances so that neither proposal gets a majority

    Explanation

    With concurrent proposers, acceptors may split their acceptances between competing values, leaving no proposal with enough acceptors to be chosen.

  23. 23

    Why must an acceptor be able to accept more than one proposal over time?

    1. A

      Acceptors must accept every value so that all proposers can make progress

    2. B

      Acceptors use multiple acceptances to permit conflicting values to be chosen

    3. C

      Multiple acceptances eliminate the need for majority agreement

    4. D

      Accepting proposals with different numbers allows later rounds to overcome stalled attempts

    Correct answer
    D

    Accepting proposals with different numbers allows later rounds to overcome stalled attempts

    Explanation

    Acceptors may accept multiple numbered proposals across rounds, but the protocol constrains their values so that safety is preserved.

  24. 24

    What uniquely identifies a Paxos proposal?

    1. A

      The number of learners paired with the size of the acceptor group

    2. B

      The physical address of the proposer paired with a timestamp

    3. C

      The message delay paired with the process restart count

    4. D

      A unique increasing proposal number paired with a value

    Correct answer
    D

    A unique increasing proposal number paired with a value

    Explanation

    A proposal consists of a unique proposal number and an associated value; proposal numbers are natural numbers that increase across attempts.

  25. 25

    What does property P2 require after a proposal carrying value V has been chosen?

    1. A

      Every higher-numbered proposal must be rejected by every acceptor

    2. B

      Every lower-numbered proposal must be accepted by a majority

    3. C

      Every proposer must permanently stop issuing proposals

    4. D

      Every higher-numbered proposal that is chosen must also carry value V

    Correct answer
    D

    Every higher-numbered proposal that is chosen must also carry value V

    Explanation

    P2 preserves the chosen value across later chosen proposals by requiring higher-numbered chosen proposals to carry the same value.

  26. 26

    How does P2A strengthen P2?

    1. A

      It requires every higher-numbered proposal accepted by any acceptor to carry the chosen value

    2. B

      It prevents acceptors from accepting any proposal after the first value is chosen

    3. C

      It allows higher-numbered proposals to change the value if they gain a larger majority

    4. D

      It requires only proposals accepted by every acceptor to preserve the chosen value

    Correct answer
    A

    It requires every higher-numbered proposal accepted by any acceptor to carry the chosen value

    Explanation

    P2A applies the value-preservation rule to every higher-numbered proposal accepted by an individual acceptor, not merely to proposals that become chosen.

  27. 27

    What additional restriction does P2B impose?

    1. A

      Every higher-numbered proposal issued by any proposer must carry the already chosen value

    2. B

      Every proposer must use the lowest available proposal number after a choice

    3. C

      Every acceptor must issue a new proposal before accepting a value

    4. D

      Every higher-numbered proposal must be issued by the same proposer as the chosen proposal

    Correct answer
    A

    Every higher-numbered proposal issued by any proposer must carry the already chosen value

    Explanation

    P2B moves the restriction to the source of proposals: once a value is chosen, later proposals issued by any proposer must use that value.

  28. 28

    What is the purpose of invariant P2C?

    1. A

      It replaces stable storage with temporary memory during failures

    2. B

      It allows learners to announce values without observing acceptor responses

    3. C

      It gives proposers a condition that preserves the chosen value when issuing higher-numbered proposals

    4. D

      It guarantees that every proposal will be accepted by all acceptors

    Correct answer
    C

    It gives proposers a condition that preserves the chosen value when issuing higher-numbered proposals

    Explanation

    P2C requires a proposer to consult a majority and either find no earlier accepted proposals or adopt the value of the highest-numbered earlier proposal found there.

  29. 29

    Under P2C, when may a proposer freely select its own value?

    1. A

      When at least one acceptor has accepted a conflicting lower-numbered proposal

    2. B

      When a different proposer has already obtained a majority for another value

    3. C

      When the proposer has not contacted any acceptors before issuing its proposal

    4. D

      When no acceptor in the consulted majority has accepted a lower-numbered proposal

    Correct answer
    D

    When no acceptor in the consulted majority has accepted a lower-numbered proposal

    Explanation

    If the consulted majority reports no earlier accepted proposal, the proposer may use its intended value.

  30. 30

    Under P2C, which value must a proposer use if earlier accepted proposals are reported?

    1. A

      The value from the lowest-numbered proposal reported by any single acceptor

    2. B

      The value reported by the learner with the fastest response

    3. C

      The value associated with the highest-numbered earlier proposal reported by that majority

    4. D

      The proposer's original value, regardless of acceptor history

    Correct answer
    C

    The value associated with the highest-numbered earlier proposal reported by that majority

    Explanation

    The proposer must adopt the value attached to the highest-numbered previously accepted proposal among the responses it receives.

  31. 31

    What is the purpose of the prepare phase?

    1. A

      It replaces phase two by writing only the proposal number to memory

    2. B

      It gathers acceptor history and obtains promises not to accept lower-numbered proposals

    3. C

      It informs learners that a majority has already accepted the value

    4. D

      It immediately chooses the proposer's value without consulting acceptors

    Correct answer
    B

    It gathers acceptor history and obtains promises not to accept lower-numbered proposals

    Explanation

    Phase one both discovers previously accepted proposals and establishes promises that prevent lower-numbered proposals from being accepted later.

  32. 32

    What must a proposer do before sending a prepare request?

    1. A

      Select a value that every learner has already approved

    2. B

      Wait until every acceptor has restarted from stable storage

    3. C

      Receive an accepted message from a majority for the same proposal

    4. D

      Select a new proposal number higher than any number it previously used for that instance

    Correct answer
    D

    Select a new proposal number higher than any number it previously used for that instance

    Explanation

    Each new attempt uses a unique proposal number that is greater than numbers previously used by that proposer for the consensus instance.

  33. 33

    What does an acceptor do when it receives a prepare request with a number higher than its current promise?

    1. A

      It erases all previous accepted proposals before replying

    2. B

      It records the new promise durably and reports its highest previously accepted proposal

    3. C

      It rejects the request because only learners may process new numbers

    4. D

      It accepts the proposal's value immediately without a second phase

    Correct answer
    B

    It records the new promise durably and reports its highest previously accepted proposal

    Explanation

    The acceptor updates and durably stores its highest promised number, then replies with information about its highest previously accepted proposal, if any.

  34. 34

    How does an acceptor respond to a prepare request whose number is not greater than its existing promise?

    1. A

      It forwards the request directly to all learners

    2. B

      It accepts the request but deletes its previous promise

    3. C

      It lowers its promise to match the incoming number

    4. D

      It ignores the request and does not respond

    Correct answer
    D

    It ignores the request and does not respond

    Explanation

    A request with a number less than or equal to the current promise cannot supersede that promise, so the acceptor ignores it.

  35. 35

    What allows a proposer to begin phase two?

    1. A

      Receiving identical intended values from all proposers

    2. B

      Receiving promise responses from a majority of acceptors

    3. C

      Receiving confirmation that every learner is available

    4. D

      Receiving any response from a single acceptor

    Correct answer
    B

    Receiving promise responses from a majority of acceptors

    Explanation

    A majority of promises gives the proposer enough information and protection to proceed with an accept request.

  36. 36

    How does the proposer select the value for its phase-two accept request?

    1. A

      It adopts the highest-numbered previously accepted value reported, or uses its own value if none is reported

    2. B

      It always uses the value from the first promise response received

    3. C

      It chooses the value accepted by the smallest number of acceptors

    4. D

      It combines all reported values into a new composite value

    Correct answer
    A

    It adopts the highest-numbered previously accepted value reported, or uses its own value if none is reported

    Explanation

    The proposer follows P2C: it adopts the value associated with the highest-numbered accepted proposal reported by the majority, unless no such proposal exists.

  37. 37

    When may an acceptor accept a phase-two request for proposal number N?

    1. A

      Whenever N is equal to the first proposal number it ever received

    2. B

      Only when N is strictly larger than its current highest promised number

    3. C

      Only when N is smaller than every promise it has previously made

    4. D

      When N is at least as large as its current highest promised number

    Correct answer
    D

    When N is at least as large as its current highest promised number

    Explanation

    The acceptor may accept N when N is greater than or equal to its current promise. Equality is allowed because the promise forbids only numbers lower than N.

  38. 38

    What happens if an acceptor receives a phase-two request with a number lower than a newer promise?

    1. A

      The acceptor accepts it because phase two overrides all promises

    2. B

      The acceptor accepts it only if a learner has already seen the value

    3. C

      The acceptor changes the newer promise to the lower number

    4. D

      The acceptor rejects or ignores the request

    Correct answer
    D

    The acceptor rejects or ignores the request

    Explanation

    A newer promise prevents the acceptor from accepting a lower-numbered proposal.

  39. 39

    What must an acceptor durably record after accepting a proposal?

    1. A

      Only the number of learners currently online

    2. B

      The complete message history of every process

    3. C

      Only the identity of the proposer

    4. D

      The proposal number and its associated value

    Correct answer
    D

    The proposal number and its associated value

    Explanation

    The accepted proposal pair must survive crashes so that the acceptor does not later accept an inconsistent proposal.

  40. 40

    Why does a proposer generally not need stable storage for safety?

    1. A

      Its state is automatically replicated by every learner before phase one

    2. B

      It may abandon a failed attempt and later retry with a new higher proposal number

    3. C

      Proposers cannot fail because they are not part of the consensus group

    4. D

      Its original proposal value is always chosen after the first retry

    Correct answer
    B

    It may abandon a failed attempt and later retry with a new higher proposal number

    Explanation

    A proposer may forget an unfinished attempt without harming safety, provided any later attempt uses a new, higher proposal number.

  41. 41

    How can learners discover that a value has been chosen in the simplest notification method?

    1. A

      Only the proposer tells one learner, which assumes the value was chosen

    2. B

      Every learner independently reruns phase one without receiving acceptances

    3. C

      Learners choose the value that appears first in their local memory

    4. D

      Each acceptor sends accepted messages to the learners, which detect a majority

    Correct answer
    D

    Each acceptor sends accepted messages to the learners, which detect a majority

    Explanation

    In the direct method, learners observe accepted messages from acceptors and know a proposal is chosen after seeing a majority of acceptances.

  42. 42

    What is the main disadvantage of having every acceptor notify every learner?

    1. A

      The number of notification messages can grow roughly with the product of acceptors and learners

    2. B

      The method prevents more than one consensus instance from running

    3. C

      Learners cannot determine whether a majority accepted the proposal

    4. D

      Acceptors lose the ability to store accepted proposals durably

    Correct answer
    A

    The number of notification messages can grow roughly with the product of acceptors and learners

    Explanation

    Direct broadcasting can create substantial communication overhead because many acceptors send messages to many learners.

  43. 43

    How does a distinguished learner reduce communication overhead?

    1. A

      The distinguished learner sends every proposal to every acceptor twice

    2. B

      The distinguished learner replaces all acceptors and chooses values independently

    3. C

      Acceptors report to the distinguished learner, which informs the other learners after seeing a majority

    4. D

      Learners stop receiving notifications and infer the result from proposal numbers

    Correct answer
    C

    Acceptors report to the distinguished learner, which informs the other learners after seeing a majority

    Explanation

    Funneling acceptances through one distinguished learner reduces messages from an acceptor-to-learner broadcast to a smaller collection-and-notification pattern.

  44. 44

    What is the trade-off of using a single distinguished learner?

    1. A

      It increases communication while guaranteeing that no learner can fail

    2. B

      It makes the system Byzantine because learners no longer trust acceptors

    3. C

      It eliminates the need for acceptors to reach a majority

    4. D

      It reduces communication but can become a bottleneck or learning failure point

    Correct answer
    D

    It reduces communication but can become a bottleneck or learning failure point

    Explanation

    A single distinguished learner is efficient, but if it fails or becomes slow, other learners may not learn the chosen value promptly.

  45. 45

    What can a learner do if it suspects that a value was chosen but cannot learn which value?

    1. A

      It can erase the acceptors' records and restart the consensus instance

    2. B

      It can ask a single acceptor to choose a replacement value

    3. C

      It can declare the most recently proposed value chosen without further evidence

    4. D

      It can initiate a new Paxos round with a sufficiently high proposal number

    Correct answer
    D

    It can initiate a new Paxos round with a sufficiently high proposal number

    Explanation

    A new round forces the system either to recover the previously chosen value through P2C or to choose a value if none had previously been chosen.

  46. 46

    What is a live lock?

    1. A

      Processes remain active but repeatedly prevent one another from making progress

    2. B

      A learner receives a chosen value before any acceptor accepts it

    3. C

      A process permanently stores two different chosen values

    4. D

      All processes stop responding and perform no further work

    Correct answer
    A

    Processes remain active but repeatedly prevent one another from making progress

    Explanation

    In a live lock, processes continue exchanging messages and using resources, but competing actions prevent a decision from completing.

  47. 47

    How can two competing proposers create live lock in Paxos?

    1. A

      Each proposer accepts every value immediately, causing two majorities to form

    2. B

      Each proposer prevents all acceptors from storing promises in stable storage

    3. C

      Each proposer obtains newer promises before the other can complete phase two

    4. D

      Each proposer sends only learner messages and never sends prepare requests

    Correct answer
    C

    Each proposer obtains newer promises before the other can complete phase two

    Explanation

    One proposer can preempt another with a higher prepare number, causing the first phase-two request to fail; repeated preemption prevents either proposal from being chosen.

  48. 48

    What does the FLP impossibility result imply for asynchronous consensus?

    1. A

      A majority cannot prevent two values from being chosen in any distributed system

    2. B

      With possible process failure, deterministic consensus cannot guarantee both safety and termination

    3. C

      Leader election guarantees progress even when all processes may crash

    4. D

      Stable storage makes guaranteed termination possible without any timing assumptions

    Correct answer
    B

    With possible process failure, deterministic consensus cannot guarantee both safety and termination

    Explanation

    FLP shows that in a fully asynchronous system where even one process may fail, no deterministic algorithm can guarantee both perfect safety and guaranteed termination.

  49. 49

    What can be added to obtain guaranteed progress despite the FLP limitation?

    1. A

      More learners without changing the communication model

    2. B

      Removal of stable storage from all acceptors

    3. C

      Randomness or timing assumptions such as timeouts

    4. D

      A rule allowing acceptors to accept conflicting values

    Correct answer
    C

    Randomness or timing assumptions such as timeouts

    Explanation

    Progress guarantees require an additional assumption or mechanism, such as random choices or real-time information provided by timeouts.

  50. 50

    How does electing a distinguished proposer, or leader, usually improve liveness?

    1. A

      It removes the need for proposal numbers and promises

    2. B

      It reduces competing proposal attempts so one proposer can complete phase two

    3. C

      It makes the leader the only acceptor whose failure matters

    4. D

      It allows the leader to choose values without a majority

    Correct answer
    B

    It reduces competing proposal attempts so one proposer can complete phase two

    Explanation

    A stable leader breaks the symmetry among proposers and prevents repeated preemption, allowing proposals to complete.

  51. 51

    What happens to Paxos safety if leader election is unreliable?

    1. A

      Safety is guaranteed only while exactly one leader exists

    2. B

      Two different values may be chosen whenever two leaders appear

    3. C

      Safety remains guaranteed, although progress may stop or live lock may occur

    4. D

      Safety is replaced by eventual consistency after a new leader is elected

    Correct answer
    C

    Safety remains guaranteed, although progress may stop or live lock may occur

    Explanation

    Leader election supports liveness, not core safety. Multiple leaders may cause live lock, but Paxos still prevents conflicting values from being chosen.

  52. 52

    What property of a replicated state machine ensures that replicas reach the same state?

    1. A

      The state machine uses only one replica for all state transitions

    2. B

      The state machine assigns a different random output to each replica

    3. C

      The state machine is deterministic and replicas execute the same commands in the same order

    4. D

      The state machine allows each replica to reorder commands for local efficiency

    Correct answer
    C

    The state machine is deterministic and replicas execute the same commands in the same order

    Explanation

    Identical initial states, deterministic behavior, and identical ordered command sequences produce identical states and outputs.

  53. 53

    How is Paxos used to implement state machine replication?

    1. A

      A separate Paxos instance chooses the command for each position in the ordered log

    2. B

      Each replica independently chooses its own command sequence

    3. C

      Paxos orders only the first command and leaves later commands unordered

    4. D

      One Paxos instance chooses the entire database state in a single message

    Correct answer
    A

    A separate Paxos instance chooses the command for each position in the ordered log

    Explanation

    Paxos is run repeatedly, with each instance deciding the command assigned to one log slot.

  54. 54

    What does a Paxos instance number represent in a replicated command log?

    1. A

      The number of learners that have received a notification

    2. B

      The number of acceptors that have crashed during the system's lifetime

    3. C

      The maximum number of values that may be chosen for the entire system

    4. D

      The position or slot of the command that replicas should execute

    Correct answer
    D

    The position or slot of the command that replicas should execute

    Explanation

    Each Paxos instance corresponds to one position in the ordered sequence of state machine commands.

  55. 55

    Why must replicas execute commands in the same order?

    1. A

      Different orders cause every learner to receive duplicate messages

    2. B

      Different orders make it impossible for a proposer to generate a number

    3. C

      Different orders can produce different final states even when the commands are identical

    4. D

      Different orders prevent acceptors from writing promises to stable storage

    Correct answer
    C

    Different orders can produce different final states even when the commands are identical

    Explanation

    State transitions can depend on order; for example, applying a deposit and withdrawal in opposite orders can produce different intermediate and final states.

  56. 56

    In the normal replicated-state-machine workflow, what does the leader do with a client command?

    1. A

      It places the command in the first available slot without using consensus

    2. B

      It executes the command locally and asks learners to copy the result

    3. C

      It sends the command to every learner without involving acceptors

    4. D

      It assigns the command to a log slot and proposes it for that Paxos instance

    Correct answer
    D

    It assigns the command to a log slot and proposes it for that Paxos instance

    Explanation

    The leader chooses the next log position and uses Paxos to make the client command the value for that slot.

  57. 57

    When should a replica execute a command chosen for slot N?

    1. A

      Before learning whether the command was accepted by a majority

    2. B

      After learning the command and processing all earlier slots in order

    3. C

      Only after every later slot has also been chosen

    4. D

      Immediately upon hearing any proposal for slot N

    Correct answer
    B

    After learning the command and processing all earlier slots in order

    Explanation

    Replicas preserve the ordered log by executing a learned command only after earlier commands have been processed.

  58. 58

    How does a new leader handle a missing log slot that may contain a previously accepted command?

    1. A

      It removes all later slots until the previous leader returns

    2. B

      It runs phase one and must reuse the recovered value if acceptor history reports one

    3. C

      It overwrites the slot with its preferred client command without checking history

    4. D

      It skips the slot because later commands are already known

    Correct answer
    B

    It runs phase one and must reuse the recovered value if acceptor history reports one

    Explanation

    Phase one reveals prior acceptances; P2C requires the new leader to preserve a recovered value that might already be close to being chosen.

  59. 59

    What does a leader propose for a missing slot when phase one finds no previously accepted command?

    1. A

      A randomly selected command from another replica

    2. B

      A command that reverses the state change from the previous slot

    3. C

      A no-op command that fills the slot without changing the state

    4. D

      The newest command from a later slot

    Correct answer
    C

    A no-op command that fills the slot without changing the state

    Explanation

    A no-op preserves log contiguity while producing no state change, allowing later commands to be executed in order.

  60. 60

    Why can a stable leader often skip phase one for ordinary new commands?

    1. A

      Phase one is needed only when learners are unavailable

    2. B

      Previously obtained promises may already cover the relevant future slots

    3. C

      The leader is allowed to choose commands without acceptor approval

    4. D

      A stable leader can safely accept conflicting values for unused slots

    Correct answer
    B

    Previously obtained promises may already cover the relevant future slots

    Explanation

    Standing promises for future proposal numbers allow the leader to proceed directly to phase two in the normal case.

  61. 61

    What is the typical communication cost of reaching consensus in the normal stable-leader case?

    1. A

      One message from each learner followed by a vote from every proposer

    2. B

      A complete communication exchange among every pair of replicas

    3. C

      A separate full two-phase exchange with every learner for every command

    4. D

      One phase-two round trip between the leader and a majority of acceptors

    Correct answer
    D

    One phase-two round trip between the leader and a majority of acceptors

    Explanation

    With standing promises, a stable leader can often use only phase two, requiring a message to acceptors and responses from a majority.

  62. 62

    What happens if no server believes it is the leader in a replicated Paxos system?

    1. A

      All replicas immediately choose no-op commands for every future slot

    2. B

      Two different commands are automatically chosen for the next slot

    3. C

      Acceptors discard all durable promises to restore progress

    4. D

      New commands may not be proposed, but previously established safety remains intact

    Correct answer
    D

    New commands may not be proposed, but previously established safety remains intact

    Explanation

    Without a leader, progress can halt because no proposer drives new instances, but Paxos does not thereby lose safety.

  63. 63

    How can Paxos support changing the membership of its own server group?

    1. A

      A configuration change is proposed as a state machine command

    2. B

      Learners vote on membership without recording it in the log

    3. C

      Acceptors are replaced only after all old commands are deleted

    4. D

      The leader changes membership locally without consensus

    Correct answer
    A

    A configuration change is proposed as a state machine command

    Explanation

    Adding or removing a server is represented as a command in the replicated state machine and is agreed upon through Paxos.

  64. 64

    When can a new acceptor configuration take effect in the replicated log?

    1. A

      After the configuration-change command is chosen and executed

    2. B

      Before the configuration-change command is assigned a log slot

    3. C

      Only after every learner independently confirms the change

    4. D

      As soon as a proposer privately decides to change the membership

    Correct answer
    A

    After the configuration-change command is chosen and executed

    Explanation

    Once the configuration command is chosen at a log position and executed, later consensus decisions may use the new acceptor group.

  65. 65

    What is the central safety-versus-liveness lesson of Paxos?

    1. A

      Paxos preserves consistency under failures, while progress requires mechanisms such as leader election

    2. B

      Paxos solves both safety and liveness without timing assumptions or additional mechanisms

    3. C

      Paxos guarantees progress only by permitting inconsistent decisions

    4. D

      Paxos relies on a leader for safety but does not need one for progress

    Correct answer
    A

    Paxos preserves consistency under failures, while progress requires mechanisms such as leader election

    Explanation

    The core protocol guarantees safety even amid failures and competing proposers, while liveness generally requires a stable leader or other progress-supporting mechanism.

Question 1 of 65
Question 1 of 65

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent