Tech IndustryJul 3, 2019

Multi-threading interview questions

From my research, it looks like LinkedIn and Dropbox likes to ask questions related to multi-threading during the coding interviews. Where do you suggest I look for multi-threading coding problems (LC has none)?

Tibco software !mlikoj! Jul 3, 2019

Lol can confirm. Dropbox leads every question to multi threading.

Bloomberg bsSlayer Jul 3, 2019

the irony is real given they're a Python shop 🤣🤣

Nutanix 1adja134 Jul 3, 2019

Hahaha

New
xizX84j Jul 3, 2019

Just add a lock here and a lock there...

Rackspace mxEbs OP Jul 3, 2019

Just keep adding locks? Lol

Oscar 🐨koala Jul 3, 2019

Now don’t get too kinky, son. The right approach is to use database for everything.

Nvidia fckm Jul 3, 2019

Suggest lock-free programming. I swear half of the CS people are not familiar with lock-free and wait-free concepts!

New
xizX84j Jul 3, 2019

Yeah....no. Don't do this...

Bloomberg bsSlayer Jul 3, 2019

only in very limited cases like single writer multiple readers etc. When you have multiple writers there's no other choice than locking.

Dropbox rawhide Jul 3, 2019

What is a thread?

Amazon FatPig Jul 3, 2019

Just add lock before every write. They will be happy

Apple neverSt0p Jul 3, 2019

You use Java?

Rackspace mxEbs OP Jul 3, 2019

Yes. Know any good source for multi-threading java questions?

Apple neverSt0p Jul 3, 2019

I never prepared for them. But, I have done multi threading. So, I can help you with whatever knowledge that I have, if you are interested 😊

Amazon klulez Jul 3, 2019

Interviews are the only place they use/demonstrate their multi-threading knowledge. @LinkedIn @Dropbox

Alibaba Group vXQh35 Jul 4, 2019

Cracking the code interview has basic questions. I think it’s a good start.

New
Flatline Jul 4, 2019

Read about lock ordering and lock hierarchies (google it), it explains how to avoid deadlocks when doing multi-threading, and you’ll be killing two birds with one Nokia 510.

Docker DckrSecBro Jul 4, 2019

I'm old school but I learned multithreading from Boost.Thread docs & Wikipedia 🤷‍♂️ But, you should also really understand how things like immutability, limiting shared state, and pass-by-value affect the need for locking constructs & the trade-offs. Studying how Rust and Go handle concurrency will give different perspectives -- Dropbox uses Rust in places. Haskell supports traditional multithreading patterns and CSP based concurrency (like Go) and the immutability provides good safety guarantees. I'd say fuck the interview and learn about modern concurrency & async because it's pretty damn important. MT is a prereq for some of that, but its not the end goal anymore.