Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sometimes it was not only intimidating. Several months ago I had interviews with apple for a devops position. While most interviewers were friendly, there was a very aggressive one. He started with "I am going to ask you some of my favorite questions", and the tone of the interview went sour. Most of the questions should be from the skill sets he was mostly proud in but remotely related to the requirements of the position. For questions that were relevant, he asked something like "how could you terminate a forkbomb without a reboot?" which I answered "practically it is impossible", he insisted there was a way which I did not know, and I felt insulted. While I guess he was expecting me to answer process group killing (which is still impossible when all resources are taken the computer is not responsive at all), it is just too damn wrong to make an interview a do-you-know-what-I-know showcase of the interviewer. Unfortunately, in big companies like Apple, ego-filled persons are not rare. If having to go through more than 5 rounds of interview, one have a good chance to encounter one.


There is a clever trick for that: a classic bash fork bomb will completely die once it gets impossible to spawn new processes. And an easy way to achieve this is to exhaust all PIDs, usually there are 32768 available. So starting enough `sleep` processes will do the job. That is of course if you still can run at least one shell command on the machine.

Other than that the question is stupid, and most companies have a policy that forbids such questions. Same goes for "piano tuners in Manhattan" and "why are manholes round".


From my experience there are three reasons these questions are asked:

1. To see what your thought process would be in figuring out the answer. 2. To judge your reaction to such a nonsensical question. 3. To show off (either the interviewer is showing off or the company is showing off).

That said, they have some value depending on the position your being interviewed for.


I've interviewed at Amazon and Google. Amazon was just poorly structured overall. Google really tried hard to make the experience good, but my last interview was one of these where he had a particular very clever and very proprietary method to solve the question he asked and wanted to see if I could guess it. I could not. Though he ended up telling me about it and it was interesting, reflecting back on the experience I thought it was not very useful.


> "How could you terminate a forkbomb without a reboot?"

I imagine that's a bit like asking how can you completely clean malware off a computer without reformatting. The answer is roughly the same: In the general case it's impossible, because once arbitrary code has been executed on your machine, nothing can be trusted.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: