CPU - Clock - (Ticks|Cycles) - (CPU|Instruction) Cycle

1 - About

CPU's are marching forward at some frequency, and the period of this frequency is called a tick.

The CPU requires a fixed number of clock ticks (or clock cycles) to execute each instruction. The faster the clock, the more instructions the CPU can execute per second.

An instruction cycle (sometimes called fetch-decode-execute cycle) is the basic operation cycle of a computer.

In most modern CPUs, the instruction cycle is instead executed concurrently in parallel, as an instruction pipeline: the next instruction starts being processed before the previous instruction is finished, which is possible because the cycle is broken up into separate steps.

3 - Counter

3.1 - TSC (Timesatmp counter)

Each core on a moder CPU has a TSC (Timesatmp counter) that counts the number of ticks that have transpired. You can read this counter with the rdtsc assembly instruction.

Example: 2,59 times per nanosecond.

Property: Invariant: guarantee that the frequency will not change.

4 - Documentation / Reference

os/cpu/cycle.txt ยท Last modified: 2017/10/27 15:54 by gerardnico