In this video from ITFreeTraining I will look at how a computer generates a clock rate and
how this is used with different devices like the CPU and buses. Understanding this will
give you a better understanding of how different devices work with each other, even when they
run at different speeds.
Before I start looking at how a computer generates a clock rate, I will first look at the concept
of a cycle. A cycle in a computer is the smallest time period a computer can perform a function
in. To understand how it works, consider that you have a conveyor belt.
On the conveyor belt are the instructions the computer will process. Some instructions
take one cycle. Other instructions take more than one cycle. In this example, the divide
instruction takes two cycles where the add and subtract instructions take one each.
In order to run the conveyor belt, something needs to drive it, in this case a cog. The
computer will process instructions based essentially on how quickly the cog turns. The faster the
cog turns, the faster the computer will run. Keep in mind that if you run the conveyor
too quickly, this will lead to errors in processing. So, the next point to consider is – how
does a computer turn the cog, so to speak?
On your motherboard there will be one or more crystal oscillators. They come in different
shapes and sizes, but with computers they generally tend to be a rectangular component
with rounded corners soldered onto the motherboard.
The crystal oscillator gets its name because it contains an actual crystal. The crystal
used is generally quartz. When electricity is applied to the crystal, it vibrates. The
crystal will vibrate at a precise frequency which is used to create an electrical signal.
Oscillators don’t run very quickly. The speed of them is measured in megahertz, so
the question is – how does a high clock rate get generated?
Before I look at how this is achieved, I will first look at how the clock rate is measured.
One clock cycle is one hertz. One megahertz is a million cycles per second and one gigahertz
is a billion cycles per second.
Crystal oscillators run in the low megahertz range and generally computers use crystal
oscillators that run below 100 megahertz. A common speed for a crystal used in computing
is 14.318 MHz, which compared to the rest of the computer is not too fast. So let’s
look at how gigahertz clock rates are created.
The crystal in your computer generates a signal. This signal goes to a chip on the motherboard
which uses the signal from the crystal to create other frequencies. It is beyond the
scope of this video to go into too much detail about how this is done and there a number
of different methods, but essentially one method is to look at the rise and fall of
the signal. Looking at how high or low the signal is can be used to generate other clock
rates. These are used for devices like the North Bridge and PCI Express slots amongst
others. In some cases, a second crystal oscillator may be used to generate speeds for other buses.
This however does not include the CPU clock rate. Let’s have a look at how that is generated.
The CPU runs faster than any other component in the computer. This causes some problems
when generating a clock rate. The biggest problem is that, if a chip external to the
CPU were to generate the clock rate, given the extra distance between the chip and the
CPU, this will increase the probability there will be corruption in the clock signal. Having
a good reliable clock rate is essential to the CPU running at high speed and thus cannot
be generated by an external chip.
To get around this, the North Bridge will generate a slower clock rate than the one
the CPU runs at. This slower clock rate will be sent to the CPU. This clock rate will be
the speed of the front side bus. Once the clock rate reaches the CPU, a clock generator
in the CPU will generate its own clock rate. This clock rate is based on a multiplier.
The multiplier will be configured in the BIOS. Most BIOS will automatically detect the multiplier,
but you can change it if you wish.
Multipliers vary from CPU to CPU, but it is not uncommon for a multiplier to be as high
as ten. Since the multiplier is linked to the front bus speed, the faster the front
side bus the lower the multiplier will be.
It may be difficult to understand how all the different clock speeds are generated.
To understand it better, consider they are cogs in a system. The crystal generates a
slow frequency; slow, but very accurate.
The signal is used by a clock generator. The clock generator generates additional clock
rates. The clock rate is used by devices like the North Bridge and PCI Express bus. If you
have buses such as an ISA bus, this will run at a much slower speed. These slower buses
may have their own crystal oscillator. These clock rates are not covered in this video,
but are either generated by the South Bridge or other chips on the motherboard.
Lastly, the CPU will generate its own clock rate as a multiple of the front side bus.
This is done in the CPU due to the high speed that its operates at. If this clock rate was
generated elsewhere, there would be timing and accuracy problems.
You should be able to see, that even though the crystal speed is slow compared to the
rest of the computer, it forms the basic building blocks for the clock rates. Just like a mechanical
system where the gears turning at a certain speed will cause other gears to turn at different
speeds, the crystal forms the base for all the other clock speeds. Even though the crystal
speed is slow compared to the rest of the computer, the speed of the crystal is reliable
and does not change. Think of it like the tick of a grandfather clock, slow but reliable.
That concludes this video on clock speeds and bus speeds. I hope you have found this
video useful and I look forward to seeing you in other videos from us. Until the next
video, I would like to thank you for watching.