Excellent C# Threading Memory Model Article

April 28th, 2010 by jason Leave a reply »

I just read an excellent article on the memory model in .Net and C# as it relates to threading, written my Microsoft’s Igor Ostrovsky.  I think I had gathered most of these details over the years from various MSDN articles and CLR Via C# (1 & 2) by Jeffrey Richter.  However, Ostrovsky provides a solid narration of how the model works.  I was unaware that the local thread cache (conceptually) is all or nothing on reads and writes.  There are a lot of misconceptions of how threads, locks, and volatile variables work and this article does a pretty good job of nailing it all down.  There are some pieces of information that I had previously found slightly contradictory that really make sense when reading the article.

Advertisement

Leave a Reply

You must be logged in to post a comment.