I am working Intel Core 2 Duo CPU E4800 Processor @ 3GHz.Mostly idid theoptimization ofApplications written in C and C++. Usually the optimization of criticalloops by analyse the execution time. I have some doubts on some common concepts.
1. What is the meaning of Processor Cycle?
2. What is the relation between processor frequency and execution time and how we derive it.?
3. How the Cycle count relate to the Processor Frequency?
4. How to Calculate MCPS(Machine Cycle Per Second)
I need to find a good understanding on above concepts before study further.
1. Processor cycle is a time to execute an elementary machine instruction. Note that complex machine instructions may need many cycles to complete.
2. The execution time of a program depends not only on the processor frequency but may also depend on many other factors like main memory speed, I/O speed, etc.
3. Processor frequency is the number of processor cycles per second. One cycle per second is 1 Hz. That means your 3GHz CPU runs 3.000.000.000 cycles per second.
4. Given that processor cycle is machine cycle, MCPS (machine cycles per second) equals the processor frequency.
I hope my explanations can help you. You can also consult with Wikipedia (http://en.wikipedia.org/wiki/CPU_cycle , http://en.wikipedia.org/wiki/Clock_cycle) or a good book on computer architecture (like the one from Hennessy&Patterson "Computer Architecture: A Quantitative Approach").