Programmer’s Intent Explanation – Georgia Tech – Advanced Operating Systems

Now the first thing to notice is that all of these are read and write accesses. There’s nothing special about them. This is, this is going to be modifying data using loads and stores, and this is storing a value into it, and this is reading a value and using a value. So all of these are normal read write accesses, but there is a difference between. The way the program uses this flag variable versus this data structure. The flag variable is being used as a synchronization variable. And that’s a, a secret that only this P1 and P2 know about. That this, even though innocuously it looks like a simple Integer variable that is used in a program where there is special semantic for this particular variable so far as this, this program is concerned. P1 and P2 know that this is the way by which their signalling each other, that something that this guy waiting on is available from P1. Right? And so its a synchronization variable. On the other hand, the – The data structure A is a normal data. But, both accessing the synchronization variable and normal data is being accomplished by simple read write accesses that’s available in the processor. And that’s how we’re able to get the solution for this particular question. It’s comforting to know that atomic read and write operations are good for doing simple co-ordination among processes as we illustrate it through this question. And in fact, when we look at certain implementation of barrier algorithms later on You’ll find that this is all that is needed from the architecture in order to implement some of them. But now, how about implementing a synchronization primitive like a mutual-exclusion lock? Are atomic reads and writes sufficient to implement a synchronization primitive like a mutual-exclusion lock? Let’s investigate that.

Leave a Reply

Your email address will not be published. Required fields are marked *