Previous | Next --- Slide 52 of 59
Back to Lecture Thumbnails
mpcomplete

Are the ghost cells thread 2 receives an alias to the cells of thread 1, i.e. could there be a race condition b/w thread 2 updating the ghost cells and thread 1 updating the same cells?

carnegieigenrac

I don't think so. Thread 1 sends the cells to thread 2 before it starts changing them. Because in the massage passing model different threads have different address spaces, the copy of the cells that thread 2 receives is separate in memory from the cells being modified in thread 1. Therefore, if I'm understanding everything correctly, no race conditions should occur.

tommywow

It is not an alias. We are using the message passing model in this case and if you go back a few slides, it has a nice diagram showing that each processor has access to its memory only. Therefore, it is actually not possible to have aliases because one thread simply cannot access the memory of another thread if I am understanding it correctly.