What is the length of the lines representing? How is this different from saying B just read before A and it's still basically sequential.
Relaxed consistency was a slightly awkward topic for me, but there's a tradeoff between ensuring a program works correctly vs. the rich amount of the optimization possible from relaxing these constraints. It'd be weird as the programmer to observe output that violates the order that I put instructions in, but this would rarely be the case.
@crs. The length of the line represents the latency of the operation. In total, the length from "start to end" is the latency of Write A + Read B.
In this case, because we've relaxed consistency constraints, B doesn't need to wait for A to terminate, and so we can hide much of B's latency.
In some consistency methodologies, there would be no difference from saying "Read B, then Write A" from a correctness or latency standpoint.
@lindenli I think the philosophy of relaxing consistency constraints is: "For most programs, you won't actually care if we reorder operations on different processors, so we can speed it up. If you write a program that needs there to be an order, use the primitives such as barriers that the architecture provides"
Please log in to leave a comment.
So to be able to do this, there needs to be extra work done by some other component of the processor, as we no longer naively run programs in program order. In this case, there may be a cost in having a more complicated system, unless there are some set-in-stone rules with how we can perform memory operations.