Category : cpu-architecture

I am new to c++ programming and computer architecture. I am trying to learn branch prediction using ChampSim simulator.(https://github.com/ChampSim/ChampSim) However, I have no idea how to change the parameters in the program to do some simple simulations. For example, for the bimodal predictor in ChampSim, how can I change the size of prediction tables?How can ..

Read more

This question arises from reading of the popular memory barrier blog (https://preshing.com/20120710/memory-barriers-are-like-source-control-operations/). The below is pseudo code, not C++. I want to get clarification on the concepts mentioned in the blog, not an actual question on specific behavior of C++ or particular CPU. My understanding is the memory fence(barrier) only prevents the reordering of the ..

Read more

Below is the classical example of why neither func_3 or func_4 may print out (assuming each function runs on its own thread). However, I have yet to find an explanation that satisfies my curiosity for details. Assuming the following event order, If func_1 happens first (x.store), then func_3’s x.load will synchronize with thread 1 on ..

Read more