While going through many resources on multithreaded programming, reference to volatile specifier usually comes up. It is clear that usage of this keyword is not a reliable w
Your question is technically known as 'a can of worms'!
For c/c++ ( I can't comment on java )
You can very roughly summarise volatile as being a directive to the compiler to say 'please don't optimise this out' but there is a lot of argument amongst professionals, as to whether it's
a) At all useful for kernel level code <-Edit clarified based on feedback
b) Even implemented correctly by most compilers.
Also, do not ever use it for multi-threaded programming and here's a very good explanation as to why
=Edit= Interestingly, for what it's worth. Dennis Ritchie was against it's inclusion ( as well as const ) details here