We have a system optimization problem that requires a clear workflow of the execution of a CPU. How does a modern CPU (e.g. Intel Xeon) with multiple levels of caches execute a program originally stored on a hard drive of a computer?
I know roughly the program is first loaded to memory, and then, the CPU decodes the instructions and get the data needed from the memory. But, What is the detailed workflow of a CPU loading instructions from DRAM with all possible level of caches involved (maybe from DRAM to the L3 cache, L2 cache and the L1 Instruction cache or directly from DRAM to the L1 Instruction cache), and the detailed workflow of CPU loading data (from DRAM to the L3->L2->L1D?).