Concurrency and multi threading interview questions

Oracle
zyxw

Go to company page Oracle

zyxw
Dec 13, 2018 22 Comments

How do you guys practice or prepare for multi threading and concurrency related questions asked in interviews. To be more specific, I am talking about questions like those asked for pure storage interviews, confluent.io interviews etc. Not theoretical questions like difference between mutex and semaphores, but questions where they give you a problem that needs to be solved using a asynchronous and multi threaded approach. These might be judged by how are deadlocks avoided, how do you do figure out the minimal part of the code that requires co-ordination among threads, do you use muted or semaphores or conditional variables to solve problems etc?

comments

Want to comment? LOG IN or SIGN UP
TOP 22 Comments
  • Amazon
    IAmFrugal

    Go to company page Amazon

    IAmFrugal
    They ask only algorithms and system design. No one goes into details of concurrency primitives or libraries
    Dec 13, 2018 2
  • Gusto
    u83r

    Go to company page Gusto

    u83r
    I interviewed at many companies including FANGs, and only Dropbox asked this stuff
    Dec 13, 2018 4
    • Intel
      time2gtfo

      Go to company page Intel

      time2gtfo
      Did you have to use write code using actual APIs or was pseudo code acceptable for the multi threading portion of it?
      Dec 14, 2018
    • Gusto
      u83r

      Go to company page Gusto

      u83r
      Actual APIs, although I don’t think the interviewer would have known either way, since I was using a language he didn’t know well
      Dec 14, 2018
  • Oracle
    zyxw

    Go to company page Oracle

    zyxw
    OP
    Well I have been asked multi threading questions. I will give an example : How do u design a alarm callback system? It can take a callback function and a time after which to call this function. Your system has to keep track of everything and do this in a timely and performant manner. I was able to solve this question using mutex and conditional variables. But this is an interesting question, and I realized there are quite a few companies that ask questions like these for backend and hardcore distributed systems work.
    Dec 13, 2018 3
    • ^beeeeep! Next.
      Dec 13, 2018
    • Intuit
      tczT61

      Go to company page Intuit

      tczT61
      @zyxw I was trying to understand and practice this problem " How do u design a alarm callback system? It can take a callback function and a time after which to call this function"
      How did you kept track of time? anything in java. Any help appreciated.
      Aug 13, 2019
  • Amazon
    haha.

    Go to company page Amazon

    haha.
    Did anyone find out what kind of questions are asked for concurrency and multi threading and any prep material ?
    May 25, 2021 0
  • Intuit
    tczT61

    Go to company page Intuit

    tczT61
    Hey Oracle,

    Did you find any source for this? I've something coming up for "multi threading and concurrency related " system design questions and want to practice. Any tips will be helpful.

    Thanks
    Jul 18, 2019 0