Locks & Thread-Safe Structures
These Rubrik concurrency prompts all start from one shared structure. Several threads read and change it at once, and you decide what needs a lock. Sometimes the interviewer then asks you to do it with no lock at all.
The most common one splits its callers into groups with different rules about who can run together. Others ask for a structure with no lock at all, or one lock over two structures that change together, and two smaller builds round it out.
The approach is the same each time. Build the plain version first and make it pass. Then name the state that changes together, like two structures that point into each other. One lock over that state is a fine first answer. Explain why before you split it into finer locks or swap it for a compare-and-swap loop, because interviewers want to hear the reason for each step.
RubrikPremium lesson · Coding round
The 5 Rubrik problems are below.
- A Premium questionCoding · Medium · Frequently asked
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
+ 2 more in this lesson
Each with hints, the follow-up and a tested solution.
Get the Rubrik questions$49 a year · all 100 companies · cancel anytime
From 202 Rubrik reports, forum threads behind logins and write-ups in Chinese.
Rubrik interview guideKnow what Rubrik asks before you walk in.
32 coding · 3 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.