0

I was recently testing out the linux cpufreq module and noticed that regardless of whether I was running a CPU intensive benchmark or a memory intensive benchmark, the cpufreq module always chose the maximum frequency.

I understand that the governor plays an important role in deciding the frequency settings. Thus I tested it out with both ondemand and conservative governors and found the results to be the almost the same (conservative has a tiny climb to max frequency whereas ondemand just picks max frequency immediately).

This raised the question regarding what the CPU is actually doing during a load/store. We all know that memory runs significantly slower than the CPU and load/store instructions typically take several CPU cycles to complete.

edit: I realize that many such load/store instructions will probably hit the cache. What about ones that don't?

What is the CPU actually doing during these cycles? Is it busy-waiting or idle?

1 Answer 1

2

The terms CPU, processor, and processor core are very key in your question. What you probably mean to ask is, what is the processor core really doing while it waits for memory.

In most modern Intel processors, it begins executing another branch of instructions. This is called hyper-threading.

In most other processors, it essentially spends time in a wait-state.

3
  • Just to add to hyper-threading: If one of the treads need to wait for memory and the other tread does not, then it indeed executes the other tread. If both do non-memory stuff one has to wait (there is only one core after all, despite it showing two treads). If both need to access non-cached memory both wait.
    – Hennes
    Aug 3, 2013 at 7:54
  • I was running a simulation under very strict parameters which included a single core on an in-order pipeline. I do not have hyper-threading on my processor. Given these conditions, what would the processor be most likely to do during a load/store? Aug 3, 2013 at 16:28
  • @user1761555 it essentially spends time in a wait-state.
    – tay10r
    Aug 3, 2013 at 20:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .