Lock-Free interview questions

15 real Lock-Free questions from the Concurrency bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Lock-Free free