Informatica Interview Question
Software Engineer / DevelopersCountry: India
Interview Type: Phone Interview
is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
Volatile just ensures that all threads see the most up-to-date value of a variable, up-to-date meaning that it may have been updated by other threads. It's not guaranteed that any operations are atomic.
- Anonymous June 15, 2012For instance, when two threads both execute x = x+1 with x starting at 5, you'd expect to get 7. But it's possible that you'd read the value for x as 5 in both threads, then the first thread would add 1 to it getting 6 -- then the second thread would interrupt and increment the variable, getting 6 -- and then your write operation writing 6 to x would execute and x would have 6 instead of 7. Volatile vars don't guarantee that this won't happen. They just guarantee that if one thread updates a variable, that change will be reflected in the next read of that variable that other threads do. Without volatile, even this isn't guaranteed and a thread might be locally caching its own copy of a variable.