CPU and executing programs
https://letsknowaboutcomputer.blogspot.com/2011/10/cpu-and-executing-programs.html
A COMPUTER IS A COMPLEX SYSTEM consisting of many different components. But at the heart -- or the brain, if you want -- of the computer is a single component that does the actual computing. This is the Central Processing Unit, or CPU.CPU is a single "chip" on the order of one square inch in size.
A program is simply a list of unambiguous instructions meant to be followed mechanically by a computer. A computer is built to carry out instructions that are written in a very simple type of language called machine language.
MAIN MEMORY
The following table helps you to understand the differences between the different processors that Intel has introduced over the years.
A computer system consisting of many devices is typically organized by connecting those devices to one or more busses. A bus is a set of wires that carry various sorts of information between the devices connected to those wires. The wires carry data, addresses, and control signals.
CPU keep checking for incoming data over and over. Whenever it finds data, it processes it. This method is called polling.since the CPU polls the input devices continually to see whether they have any input data to report. Unfortunately, although polling is very simple, it is also very inefficient. The CPU can waste an awful lot of time just waiting for input.
To avoid this inefficiency, interrupts are often used instead of polling.
An interrupt is a signal sent by another device to the CPU. The CPU responds to an interrupt signal by putting aside whatever it is doing in order to respond to the interrupt. Once it has handled the interrupt, it returns to what it was doing before the interrupt occurred. For example, when you press a key on your computer keyboard, a keyboard interrupt is sent to the CPU. The CPU responds to this signal by interrupting what is doing, reading the key that you pressed, processing it, and then returning to the task it was performing before you pressed the key.
Some computers can be used by several people at once. Since the CPU is so fast, it can quickly switch its attention from one user to another, devoting a fraction of a second to each user in turn. This application of multitasking is called timesharing.
Each of the individual tasks that the CPU is working on is called a thread. (Or a process; there are technical differences between threads and processes, but they are not important here.) At any given time, only one thread can actually be executed by a CPU.
A program is simply a list of unambiguous instructions meant to be followed mechanically by a computer. A computer is built to carry out instructions that are written in a very simple type of language called machine language.
MAIN MEMORY
When the CPU executes a program, that program is stored in the computer's main memory (also called the RAM or random access memory). In addition to the program, memory can also hold data that is being used or processed by the program. Main memory consists of a sequence of locations. These locations are numbered, and the sequence number of a location is called its address.
Microprocessor History
The first microprocessor was the Intel 4004, introduced in 1971. The 4004 was not very powerful -- all it could do was add and subtract, and it could only do that 4 bits at a time. But it was amazing that everything was on one chip.
The first microprocessor was the Intel 4004, introduced in 1971. The 4004 was not very powerful -- all it could do was add and subtract, and it could only do that 4 bits at a time. But it was amazing that everything was on one chip.
The first microprocessor to make it into a home computer was the Intel 8080, a complete 8-bit computer on one chip, introduced in 1974. The first microprocessor to make a real splash in the market was the Intel 8088, introduced in 1979 and incorporated into the IBM PC (which first appeared around 1982).
The following table helps you to understand the differences between the different processors that Intel has introduced over the years.
Name | Date | Transistors | Microns | Clock speed | Data width |
8080 | 1974 | 6,000 | 6 | 2 MHz | 8 bits |
8088 | 1979 | 29,000 | 3 | 5 MHz | 16 bits, 8-bit bus |
80286 | 1982 | 134,000 | 1.5 | 6 MHz | 16 bits |
80386 | 1985 | 275,000 | 1.5 | 16 MHz | 32 bits |
80486 | 1989 | 1,200,000 | 1 | 25 MHz | 32 bits |
Pentium | 1993 | 3,100,000 | 0.8 | 60 MHz | 32 bits, 64-bit bus |
Pentium II | 1997 | 7,500,000 | 0.35 | 233 MHz | 32 bits, 64-bit bus |
Pentium III | 1999 | 9,500,000 | 0.25 | 450 MHz | 32 bits, 64-bit bus |
Pentium 4 | 2000 | 42,000,000 | 0.18 | 1.5 GHz | 32 bits, 64-bit bus |
- A hard disk for storing programs and data files. (Note that main memory holds only a comparatively small amount of information, and holds it only as long as the power is turned on. A hard disk is necessary for permanent storage of larger amounts of information, but programs have to be loaded from disk into main memory before they can actually be executed.)
- A keyboard and mouse for user input.
- A monitor and printer which can be used to display the computer's output.
- A network interface that allows the computer to communicate with other computers that are connected to it on a network.
- A scanner that converts images into coded binary numbers that can be stored and manipulated on the computer.
A computer system consisting of many devices is typically organized by connecting those devices to one or more busses. A bus is a set of wires that carry various sorts of information between the devices connected to those wires. The wires carry data, addresses, and control signals.
CPU keep checking for incoming data over and over. Whenever it finds data, it processes it. This method is called polling.since the CPU polls the input devices continually to see whether they have any input data to report. Unfortunately, although polling is very simple, it is also very inefficient. The CPU can waste an awful lot of time just waiting for input.
To avoid this inefficiency, interrupts are often used instead of polling.
An interrupt is a signal sent by another device to the CPU. The CPU responds to an interrupt signal by putting aside whatever it is doing in order to respond to the interrupt. Once it has handled the interrupt, it returns to what it was doing before the interrupt occurred. For example, when you press a key on your computer keyboard, a keyboard interrupt is sent to the CPU. The CPU responds to this signal by interrupting what is doing, reading the key that you pressed, processing it, and then returning to the task it was performing before you pressed the key.
Some computers can be used by several people at once. Since the CPU is so fast, it can quickly switch its attention from one user to another, devoting a fraction of a second to each user in turn. This application of multitasking is called timesharing.
Each of the individual tasks that the CPU is working on is called a thread. (Or a process; there are technical differences between threads and processes, but they are not important here.) At any given time, only one thread can actually be executed by a CPU.