LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What is a CPU? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-a-cpu-4175534010/)

shone411 02-14-2015 06:52 AM

What is a CPU?
 
What is a cpu do?

yancek 02-14-2015 07:12 AM

http://www.webopedia.com/TERM/C/CPU.html

wpeckham 02-14-2015 07:19 AM

CPU
 
CPU = Central Processing Unit. This is the chip, module, or array of logic gates that implements the machine-language code execution engine at the core of any computer or calculating machine. (including but not limited to PCs, cell phones, automotive monitoring and control modules, smart watches, digital cameras, control modules on TVs (Smart TVs may have two, three, or four), DVRs, most recent VCRs, washing machines, dryers, stoves, smart refigerators, microwave ovens, and much more.)

For such a basic question, you could have discovered a lot using google or wikipedia.

DJ Shaji 02-15-2015 02:13 AM

I am think answer should suited the questioner. A CPU execute instruction given by user. CPU execute thousand of instruction in seconds. Different different type of CPU there are. Computer have the CPU Intel. Phone has CPU called the ARM. Modern CPU has the very power.

This page is having more information. Click here.

tlan 02-15-2015 03:09 AM

the Brains of the computer. All instructions pass thru the CPU for processing. Each process takes ~ one clock cycle. the CPU is rated in Gigahertz, a single hertz is one clock cycle. so a CPU can process billions of cycles per second.

as in the Intel I5 3.4 Ghz thats 3.5 billion cycles per second. or 3.5 billion intructions per second. note: some instructions take more that once cyle to complete. like a simple click of the mouse.

genss 02-15-2015 08:55 AM

Quote:

Originally Posted by tlan (Post 5317467)
the Brains of the computer. All instructions pass thru the CPU for processing. Each process takes ~ one clock cycle. the CPU is rated in Gigahertz, a single hertz is one clock cycle. so a CPU can process billions of cycles per second.

as in the Intel I5 3.4 Ghz thats 3.5 billion cycles per second. or 3.5 billion intructions per second. note: some instructions take more that once cyle to complete. like a simple click of the mouse.

some instructions take more cycles then others
some, like bitwise instructions, can take less (1/3 of a cycle on modern cpus)
then there is the cpus instruction decoder that rearranges them and can send out multiple instructions for processing simultaneously

with that in mind, GHz is not to be taken as a precise speed measurement

clicking a mouse or a keyboard button is kind of a different thing
when you click, things on the motherboard send an interrupt to the cpu saying something like "data on this port, deal with it"
that's where it gets a bit more complicated, especially when usb is involved

check the instruction tables here for latency and throughput
and the microarchitecture pdf for... more info
http://www.agner.org/optimize/


as for the original question
the cpu is what is called an automaton
more precisely it aims to be a "Turing machine"
(wiki has pages on bout)
in short:
a cpu processes data in accordance with its(cpus) state and the data itself
C is fairly close to the instructions a cpu executes, so if you know C you know about half of how a cpu works

jpollard 02-15-2015 08:56 PM

Ouch.
CPU is short for "Central Processing Unit". In computers it is usually a single complex chip that implements the instruction cycle (http://en.wikipedia.org/wiki/Instruction_cycle), which is the algorithm that explains how to interpret instructions.

Historically, it was a central control point for a computer (hence the "Central" part) and the most expensive single piece of equipment in a computer. There was only one such unit per computer.

Current computers are more like a network of many processors - The CPU is generally considered the one that guides all the others... but now there are usually more than one (anywhere from 1 to 32, though there are plans for many more, depending on the manufacturer and the design). There are processors for each disk (programmed to translate data to/from the disk, and interpret commands on how the data is to be passed to main memory) processors for video, processors for bus controllers... Here, the CPU is one or more processors that are used for generic processing, rather than programmed for specific parts of the system.


All times are GMT -5. The time now is 11:55 PM.