[personal profile] tara_hanoi
We're hiring in work. I happen to work in a Unix place so, when we hire, we tend to ask Unix questions (strangely enough).

Like most interview processes, we have a bunch of questions that we make sure we ask, and we might spit-ball a few follow-on questions just to test the range and depth of the candidate's knowledge in that area.

As an aside, I know everyone gets nervous in an interview, but in our interviews we want you to succeed; we're asking questions to see how much you know, not because we want to jump down your throat for not knowing it. The only rule I have as an interviewer is Don't Bullshit Me; if you don't know something, say so.

Anyway, there's one set question that is interesting. "What does the term fork/exec refer to in UNIX?" I didn't write the question, if I did, I'd leave it at fork(), because the answer we're looking for has nothing to do with exec(). What we're looking to segue into is a little chat about processes and subprocesses. Once they pick up on the fact that we're talking about processes, I'll start asking the questions that aren't set, like how you can find out what the parent process is. One of my favourite follow-ons is quickly becoming my head-desk question:

"What happens to the subprocess when the parent process dies?"

The inevitable reply is "Um, Zombie Process?". Normally, I'd let that slide; partially because I'm so nervous I forget the term "Orphan process" and don't mention that it's reclaimed by PID 1 (or at least, it typically tends to be init in most implementations).

An orphan is a subprocess that's still doing work after its parent died.
A Zombie process is a process, that has finished its work but is still in the process table because its parent hasn't reclaimed it with wait().

This is just one of those things that starts to bug me because a Zombie process is something to worry about, but orphans can be fine. I've used, and modified, shell scripts that spawn off children to finish their work while the parents go off and die in order to return control to the user. It's not great architecture, but it's ok, because the work done is big, and we don't want a user sending a SIGINT and leaving the work half-finished.

But, people say "Um, Zombie Process?" because it Sounds Cool.

Please, stop that. I don't want to sound like those bloggers that shout "YOU'RE WRONG" at the entire Internet, or one of those "Too cool" bloggers that likes to use a harsh tone because they're the uber-elite caste of computer professional. I just want people to know a little more so I don't have people trying to score cool-points when I ask a slightly obscure Unix question.



September 2015


Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 21st, 2017 03:27 am
Powered by Dreamwidth Studios