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
A.a strategy that proceeds without locking, assuming no conflict, then validates at commit time and retries if another writer interfered
B.the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others
C.an atomic instruction that updates a location only if it still holds an expected value, reporting success or failure to the caller
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
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"?
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
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
C.Compare-and-swap — the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others
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
5. Which term means: "a strategy that proceeds without locking, assuming no conflict, then validates at commit time and retries if another writer interfered"?
A.Optimistic concurrency — a strategy that proceeds without locking, assuming no conflict, then validates at commit time and retries if another writer interfered
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
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
D.Optimistic concurrency — the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others
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"?
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
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
C.Lock-free algorithm — the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others
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
11. Which term means: "the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others"?
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
B.Wait-free algorithm — a strategy that proceeds without locking, assuming no conflict, then validates at commit time and retries if another writer interfered
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
D.Wait-free algorithm — the strongest non-blocking guarantee, ensuring every thread finishes its operation in a bounded number of steps regardless of others
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.