A quick review concerning what happens when process j executes:

     chosing[j] = true;
     number[j] = max(number[0].....number[n])+1;
     chosing[j] = false;

On a modern computer, you need to be very aware that there is a memory cache in between the CPU and the main memory.  Moreover, computations are done in registers.

So, first we set chosing[j] = true.  The value could end up in the L2 cache, getting slowly written back to memory.

Next, we compute max(....)+1 and put the result in a register, r0.  Then we store r0 into number[j], and again this could easily mean "we update an L2 cache entry" so that the new value is sitting in the memory cache but not in the main memory.

Finally, we set chosing[j] back to false.  Yadda yadda.

Stepping back, we can think of the cache as a kind of producer-consumer system that preserves the order in which it sees updates.  (In fact some systems are a bit more subtle, but this is a good enough way to understand things for our purposes.)

Along comes process i.  What is is guaranteed to see?  It turns out that the answer is a bit subtle.  Modern cache systems do have a form of "sequential consistency" guarantee.  They guarantee that:

a) If a series of writes are done on the same memory location, the writes won't get out of order or lost.  So we do know that chosing[j] will definitely get set to true, then back to false, in the main memory.  Since the cache only has one cell in which to keep this value, we also know that by the time chosing[j]=false gets executed, at the end of the algorithm, the memory location does have chosing[j]=true in it.

b) If two different memory locations are modified, we know that the cache will keep the order of the updates right too.  So we know that if we "see" chosing[j]=false then we are either looking at process j before it picked a value (at all), or after number[j] was stored into the main memory location set aside for the number vector.

The Baker's Algorithm makes use of this pair of properties to make sure that if process i picks a number, any number picked previously by process j will be visible to "i".  And the prelim tests your understanding of this basic part of the algorithm.