12 real Patterns 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 Immutability?
Mid
A.an optimization that tests a condition before and after acquiring a lock to avoid synchronization on the common already-initialized path
B.restricting access to an object to a single thread so it needs no synchronization because nothing else can touch it
C.a facility giving each thread its own private copy of a variable, eliminating sharing-related contention for per-thread data
D.designing objects so their state never changes after construction, making them inherently safe to share across threads without locks
2. Which term means: "designing objects so their state never changes after construction, making them inherently safe to share across threads without locks"?
A.Immutability — an optimization that tests a condition before and after acquiring a lock to avoid synchronization on the common already-initialized path
B.Immutability — designing objects so their state never changes after construction, making them inherently safe to share across threads without locks
C.Immutability — a facility giving each thread its own private copy of a variable, eliminating sharing-related contention for per-thread data
D.Immutability — restricting access to an object to a single thread so it needs no synchronization because nothing else can touch it
A.Thread confinement — restricting access to an object to a single thread so it needs no synchronization because nothing else can touch it
B.Thread confinement — designing objects so their state never changes after construction, making them inherently safe to share across threads without locks
C.Thread confinement — an optimization that tests a condition before and after acquiring a lock to avoid synchronization on the common already-initialized path
D.Thread confinement — a facility giving each thread its own private copy of a variable, eliminating sharing-related contention for per-thread data
8. Which term means: "an optimization that tests a condition before and after acquiring a lock to avoid synchronization on the common already-initialized path"?
A.Double-checked locking — restricting access to an object to a single thread so it needs no synchronization because nothing else can touch it
B.Double-checked locking — designing objects so their state never changes after construction, making them inherently safe to share across threads without locks
C.Double-checked locking — an optimization that tests a condition before and after acquiring a lock to avoid synchronization on the common already-initialized path
D.Double-checked locking — a facility giving each thread its own private copy of a variable, eliminating sharing-related contention for per-thread data
A.Thread-local storage — designing objects so their state never changes after construction, making them inherently safe to share across threads without locks
B.Thread-local storage — an optimization that tests a condition before and after acquiring a lock to avoid synchronization on the common already-initialized path
C.Thread-local storage — restricting access to an object to a single thread so it needs no synchronization because nothing else can touch it
D.Thread-local storage — a facility giving each thread its own private copy of a variable, eliminating sharing-related contention for per-thread data
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.