4 ms·
Huh, I think it's time to learn something. I can write C code to reverse a linked list, or discuss the asymptotic efficiency of a bunch of data structures in m
by PieSquared 16y ago
Huh, I think it's time to learn something.
I can write C code to reverse a linked list, or discuss the asymptotic efficiency of a bunch of data structures in my sleep... but I clearly don't have enough experience with threading if I had to google what a "condition variable" was, or had to make sure my intuitive notions about cooperative and preemptive multitasking were right.
Always nice to be reminded that you don't actually know anything.
- pohl 16y agoI have a tangential question: is there a name for the kind of diagram one sees on this wikipedia page involving rooms & doors? I've never seen it before. http://en.wikipedia.org/wiki/Condition_variable http://en.wikipedia.org/wiki/Condition_variable
- lmkg 16y agoIt looks like a variant of a basic floorplan, the sort you would use when designing the layout of your office. I've never seen it used with respect to algorithms.
- ygd 16y agoIt seems they're all some type of "monitor".
- deadlockfeet 16y agofrom my CS class last sem I clearly remeber this one: Semaphores and Monitors are different. Monitors are implemented by compiler to make sure that thread dont mess up with the memmory.However Semaphores are implemented by the porgrammers. A semaphore contains a value on which either up or down can be called to indicate its status also it has a queue which contains process which are sleeping and are waiting for the up on the semaphore to be called.
- deleted 16y ago[deleted]
- roel_v 16y agoI didn't know about condition variables either, but it seems like the questions are drawn from their own problem domain, concurrency (condition variables, multitasking modes, threads vs coroutines). It's fair enough to ask at an interview if that's what is used in your code, but I don't agree that 'what is a condition variable' is of the same level of 'fundamentalness' as 'reverse a linked list'. A graphics programmer will probably find people who don't know their transformation matrices by heart lacking in fundamental knowledge, too, but in the end it's just one concept that is taught once over a 4 year degree, and after that is only relevant for people in that specific subfield. The article says 'Because they’re part of a core body of knowledge taught in any undergraduate curriculum worth its salt, and because in some form or another, they came up in our daily work' - I can agree with asking it because of the second part of that, but I don't agree that all the questions presented in the blog post are in the category of the first part.
- varjag 16y agoThe scary thing is that I once knew what condition variable is, but forgot. Easy to say it here, but would be really poor answer at an interview :)
- kscaldef 16y agoI disagree, at least based on my personal experience. I suppose I've interviewed at a dozen or so companies over the years and gotten job offers from all but 1. There's almost always something I get asked during an interview where I just honestly say, "You know, I'm not really all that familiar with that" or "I'm pretty rusty on that area at the moment". It's a better answer than trying to BS something.
- Tichy 16y agoSame here about condition variables and preemptive vs cooperative multitasking. I know the concepts, but not the names. I think mabye C programmers have to deal with that stuff more often? In most other environments, the need doesn't arise that often. Many are designed especially to avoid that need (ie node.js, Erlang),
- tomjen3 16y agoI too had too look up wtf a condition variable is - but it was because everybody calls them "monitors" which I did have a couple of course that hit on.