Lock-Free interview questions

15 Lock-Free questions from the Concurrency bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

1. What is Compare-and-swap?

Mid
  1. A.a strategy that proceeds without locking, assuming no conflict, then validates at commit time and retries if another writer interfered
  2. B.the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others
  3. C.an atomic instruction that updates a location only if it still holds an expected value, reporting success or failure to the caller
  4. D.a subtle bug where a value changes from A to B and back to A, fooling a compare-and-swap into thinking nothing changed

Answer + AI explanation with Pro

2. Which term means: "an atomic instruction that updates a location only if it still holds an expected value, reporting success or failure to the caller"?

Mid
  1. A.ABA problem
  2. B.Wait-free algorithm
  3. C.Lock-free algorithm
  4. D.Compare-and-swap

Answer + AI explanation with Pro

3. Which statement is correct?

Mid
  1. A.Compare-and-swap — a non-blocking design guaranteeing that at least one thread in the system always makes progress, so no single failure stalls everyone
  2. B.Compare-and-swap — an atomic instruction that updates a location only if it still holds an expected value, reporting success or failure to the caller
  3. C.Compare-and-swap — the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others
  4. D.Compare-and-swap — a subtle bug where a value changes from A to B and back to A, fooling a compare-and-swap into thinking nothing changed

Answer + AI explanation with Pro

4. What is Optimistic concurrency?

Senior
  1. A.a non-blocking design guaranteeing that at least one thread in the system always makes progress, so no single failure stalls everyone
  2. B.the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others
  3. C.a strategy that proceeds without locking, assuming no conflict, then validates at commit time and retries if another writer interfered
  4. D.a subtle bug where a value changes from A to B and back to A, fooling a compare-and-swap into thinking nothing changed

Answer + AI explanation with Pro

5. Which term means: "a strategy that proceeds without locking, assuming no conflict, then validates at commit time and retries if another writer interfered"?

Senior
  1. A.ABA problem
  2. B.Optimistic concurrency
  3. C.Lock-free algorithm
  4. D.Compare-and-swap

Answer + AI explanation with Pro

6. Which statement is correct?

Senior
  1. A.Optimistic concurrency — a strategy that proceeds without locking, assuming no conflict, then validates at commit time and retries if another writer interfered
  2. B.Optimistic concurrency — a non-blocking design guaranteeing that at least one thread in the system always makes progress, so no single failure stalls everyone
  3. C.Optimistic concurrency — an atomic instruction that updates a location only if it still holds an expected value, reporting success or failure to the caller
  4. D.Optimistic concurrency — the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others

Answer + AI explanation with Pro

7. What is Lock-free algorithm?

Senior
  1. A.a strategy that proceeds without locking, assuming no conflict, then validates at commit time and retries if another writer interfered
  2. B.a non-blocking design guaranteeing that at least one thread in the system always makes progress, so no single failure stalls everyone
  3. C.a subtle bug where a value changes from A to B and back to A, fooling a compare-and-swap into thinking nothing changed
  4. D.an atomic instruction that updates a location only if it still holds an expected value, reporting success or failure to the caller

Answer + AI explanation with Pro

8. Which term means: "a non-blocking design guaranteeing that at least one thread in the system always makes progress, so no single failure stalls everyone"?

Senior
  1. A.Lock-free algorithm
  2. B.Compare-and-swap
  3. C.Wait-free algorithm
  4. D.ABA problem

Answer + AI explanation with Pro

9. Which statement is correct?

Senior
  1. A.Lock-free algorithm — a subtle bug where a value changes from A to B and back to A, fooling a compare-and-swap into thinking nothing changed
  2. B.Lock-free algorithm — a non-blocking design guaranteeing that at least one thread in the system always makes progress, so no single failure stalls everyone
  3. C.Lock-free algorithm — the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others
  4. D.Lock-free algorithm — an atomic instruction that updates a location only if it still holds an expected value, reporting success or failure to the caller

Answer + AI explanation with Pro

10. What is Wait-free algorithm?

Senior
  1. A.an atomic instruction that updates a location only if it still holds an expected value, reporting success or failure to the caller
  2. B.a strategy that proceeds without locking, assuming no conflict, then validates at commit time and retries if another writer interfered
  3. C.the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others
  4. D.a non-blocking design guaranteeing that at least one thread in the system always makes progress, so no single failure stalls everyone

Answer + AI explanation with Pro

11. Which term means: "the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others"?

Senior
  1. A.Wait-free algorithm
  2. B.Optimistic concurrency
  3. C.Compare-and-swap
  4. D.ABA problem

Answer + AI explanation with Pro

12. Which statement is correct?

Senior
  1. A.Wait-free algorithm — a subtle bug where a value changes from A to B and back to A, fooling a compare-and-swap into thinking nothing changed
  2. B.Wait-free algorithm — a strategy that proceeds without locking, assuming no conflict, then validates at commit time and retries if another writer interfered
  3. C.Wait-free algorithm — a non-blocking design guaranteeing that at least one thread in the system always makes progress, so no single failure stalls everyone
  4. D.Wait-free algorithm — the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others

Answer + AI explanation with Pro

13. What is ABA problem?

Senior
  1. A.a subtle bug where a value changes from A to B and back to A, fooling a compare-and-swap into thinking nothing changed
  2. B.an atomic instruction that updates a location only if it still holds an expected value, reporting success or failure to the caller
  3. C.the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others
  4. D.a strategy that proceeds without locking, assuming no conflict, then validates at commit time and retries if another writer interfered

Answer + AI explanation with Pro

14. Which term means: "a subtle bug where a value changes from A to B and back to A, fooling a compare-and-swap into thinking nothing changed"?

Senior
  1. A.ABA problem
  2. B.Optimistic concurrency
  3. C.Compare-and-swap
  4. D.Wait-free algorithm

Answer + AI explanation with Pro

15. Which statement is correct?

Senior
  1. A.ABA problem — a subtle bug where a value changes from A to B and back to A, fooling a compare-and-swap into thinking nothing changed
  2. B.ABA problem — an atomic instruction that updates a location only if it still holds an expected value, reporting success or failure to the caller
  3. C.ABA problem — a strategy that proceeds without locking, assuming no conflict, then validates at commit time and retries if another writer interfered
  4. D.ABA problem — the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Lock-Free question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers