Multhithread old legacy applications in modern CPUs : <p>I was explaining why volatile keyword is necessary to accessing a shared memory structure by different threads.</p>

<p>My argument is suppose that CPU have two cores and two local caches inside them. Suppose that one thread is running in one core and other thread is running in next core. Then when 1st thread is writing that memory , and 2nd thread is reading it, the up-to date version would not be visible to the 2nd thread due to it's local cache yet not updated.</p>

<p>But my friend come up with an argument, he argue what's happen before the 'volatile' keyword , the old multi-threaded application binaries brought and run in a modern processor, will they fail ? For a example a old 32-bit application brought back and run in multi-core CPU in windows 7? A application that written in era where CPU cores were not introduced so only single cache is there? </p>

<p>Is my friends argument is correct. Or can it fail ? What is the time-frame that 'volatile' keyword was introduced to C/C++?</p>
