Processor is an electronic integrated circuit which means it is nothing but a collection of different types of circuits. These integrated circuits together coordinate with each other and performs an arithmetical, logical, input/output and other basic as well as complex processing task passed by an operating system. Processor is also called as CPU (Central Processing Unit). CPU is the brain of a computer system.
Processor is the main unit or main component in most of the gadgets nowadays. Processor is that component of computer that performs all the task in any computing machine. Every task which happens in any computing machine ranges from a simple opening or execution of a single line instruction (code) to the complex and advanced high-level software, all are directly or indirectly controlled or run by the processor. Nowadays, two brands are very common in the market of processors i.e. Intel and AMD. AMD basically manufacture its CPU with the name ‘Ryzen’.
Architecture of a Processor
Architecture of a processor describes the components or units of a processor on the basis at which processor works. Basically, processor consists of two main parts – arithmetic and logic unit (ALU) and Control unit (CU). Besides these components, there are also another unit on which the processor resides.
The execution unit is the main unit of a processor as it is that component of the processor which process all the task given by the operating system. The execution unit comprises CU and ALU.
Control unit is the main functional unit of a processor. Control unit directs and coordinate all the operations in a most appropriate order (optimized manner). It coordinates the flow of data from the different components(units) of the processor.
For example, ALU, registers, buses and input/output devices in order to perform any task in a most effective and efficient way. It is therefore, also known as the brain of the computer system. As similar to the human brain, CU also control all the operations within the processor. This makes it to controls all the parts of the computer system in a coordinate manner. Basically, we can say CU is responsible for fetching, decoding, executing instructions, as well as storing results. All the components(units) controlled and coordinated by the CU.
Arithmetic and Logic Unit (ALU)
Arithmetic unit performs basic mathematical operations (add, subtract, multiply, divide) and also performs comparison (greater than, less than, etc) while on another side, logic unit performs the logical operations (AND, OR, EX-OR, NOR, NOT, and binary operations, etc). Basically, logical unit performs the operations on the machine level language for example conversion of high-level language instructions understandable by the user to the low-level language (binary language or machine language). All the processes given by the user, in turn passed by the operating system is processed by arithmetic and logic unit (ALU).
A computer register is a storage memory unit of a processor which is used to store the data and instructions processed or executed by the processor. Whenever ALU performs any execution (process), intermediate as well as final result are temporarily stored in these registers. Registers are at the top of the memory hierarchy and are always preferred to speed up program execution.
The size of register depends on the number of words (columns of memory) and the size of that word in bits. The size of words of a register can be of 8 bits, 16 bits, 32 bits, or 64 bits. Mostly 16 bits of registers are used in normal processors. For example (4096*16) where 4096 is the no. of words and 16 is the size of each word in bits. Registers are classified into two types:
General purpose registers (Accumulator)
The general-purpose register is used frequently at the time of processing or at the time of execution. This register helps the execution process smoothly by frequently exchange of data from the main memory (RAM). It also stores the intermediate results during the execution. Due to this rapidly and frequently accumulation of data during processing time, general purpose registers are also known as Accumulator.
Special-purpose registers are the main registers in the processor as they can play many essential tasks for processor like identification of address of the data on the main disk by processor, etc. Special-purpose registers are classified into five main types as follows:
- Memory address register (MAR): These registers are used for storing address of the data or instruction fetched by the processor from the main disk. Simply these registers store the address of data (instructions) wherever it is located on the main disk.
- Memory Buffer Registers (MBR): These registers store the main data or instruction which fetched from the main disk or memory. This is the first register through which the data enter in the CPU. From MBR, this data is transferred to another registers. Memory buffer registers are also used to exchange the data between different types of registers within the processor. Memory Buffer Registers
- Instruction Register (IR): This register directly communicate to the execution unit. IR stores the instruction(data) which are currently being executed. Instruction consists of two parts – operation and address of the data on which the operation has to be performed. When the data entered in the IR, then address of data is transferred to the MAR (Memory address Register) and the operation part is transferred to the CU (Control Unit) which is a part of an execution unit which interprets and executes(process) that instruction to get desirable result.
- Input/output(I/O) Registers: Input/output registers are used to store the instructions or data from the input and output devices like keyboard, mouse, printer, monitor, etc. Instructions from input devices are stored in the I/O registers and then transfer to the processor for their processing. Then after processing, that processed result is again stored in the I/O register and then transfers to the output device.
- Program Counter: Program counter stores the next instruction to be executed. It mainly works by counting the number of processes. For examples, if there are total five processes for execution than after each and every count it takes another consecutive instruction and pass it to the processor for its execution.
Bus Interface Unit (BIU)
Bus user interface (BIU) is nothing but the wires which exchange the data from different parts of the computer system. It helps to exchange data within the processor as well as from outside of the processor or CPU unit such as RAM, HDD, USB and other ports, etc. Bus user interface unit provides a medium for the transferring of data or instructions between different types of registers, RAM, and other external devices. Every system has three types of BIU to carry instructions from one part to another. These are the Address Bus, Data Bus and Control Bus.
Address Bus carry all the addresses of the instruction or data which are carried by the data bus to and from the processor.
When address bus is loaded with the address of the data loaded by the program counter then data located on that address loads in the data bus.
Control bus is used to communicate the processor (CPU) with the other devices. It also used to send the commands by the processor to other devices and also return status signals of these devices to the CPU.
An instruction set is the collection of pre-defined commands which are frequently used by the processor. This makes to identify from where the data can be fetched from the RAM, HDD or from other parts of computer devices. These instructions or commands also tells the CPU that how the data can be processed in a more efficient and effective way according to the desire and need of the user.
Nowadays processors come with large set of instructions in order to decrease the line of codes of software which facilitate easy and smooth execution and interpretation or compilation. There are mostly some basic set of instruction which all the processors use. These instruction set are comprised of some basic commands for example we have to add the two numbers then there is a add command in these set of instruction so that CPU will only have to call these commands to perform operation on the operand.
The processor follows some steps before execution of an instruction or set and that procedure is called the instruction cycle. First of all, the data needed for the execution is fetched from the storage or memory. Then that data is decoded by the interpretation or compilation process and after that the execution of instruction or data takes place. After execution result is stored in the memory.
Every instruction contains two parts- opcode and operand. Opcode specifies the instruction to be performed (e.g., ADD, SUB) and operand is the data (e.g., data in register, in memory, or available through I/O device) on which the instruction is to be applied.
Now this unit consists of small quartz crystal circuit known as system clock. This component look-after the timings of all the operations performed by the different units of CPU in a computer system. This system clock maintains all the processes and help them to coordinate with each other in doing some specific work. There are many small chips and units in the motherboard which require higher clock frequency than their need to run.
Nowadays, there are various units which works on a specific clock frequency to run. Due to this, there are more than one system clock units of a specific clock speed in a computer device or any other gadgets (which operates by processor). So, this make all the components or parts to run properly in a more synchronized way in order to maintain coordination and efficiency of a computer system.
System clock is measured in a frequency and it is measured in MHz (megahertz) but nowadays, this is measured in GHz (gigahertz) according to the advancement of technology. ‘Giga’ means Billion and hertz means Cycle per second i.e. billion cycle per second. Suppose a processor has a clock speed of 3 GHz, it means its frequency to perform any task is 3 billion cycles per second. Processor process any data just in the manner of pulses similar to a human heart.
Here in processor difference occurred in rate of frequency of pulses. Clock speed measured in a tick. Tick is the smallest unit of time in which a task is performed. Some task completes in a single tick Whether some task will take more than one tick to complete according to their size and some other factors too. Hence, clock speed is a unit which contributes a major role in the performance of a CPU.
Pipe-lining and Parallel Processing
- Pipe-lining: Pipe-lining is a method in which a processor can process next instruction before the completion of execution of the previous instruction. In traditional processors, next instruction executes only after the execution of previous instruction, therefore conclude wasting of time. To cope with this wasting of time, processors are designed by using the technique of pipe-lining. Thus, this technique will improve overall performance of a processor. Such processors which executes more than one instruction per clock cycle are knows as super scalar processors.
- Parallel Processing: Parallel process is another technique to improve the performance of a processor. In parallel processing, a complex and bigger instruction splits into smaller various parts. After that, these smaller parts of instructions are distributed to different processors fitted in a same chip-set. After the completion of the execution task by all the processors, the processed instructions are combined in order to get a single solution of that task which is given to the processor.
This technique is presently using in the modern PCs in which more than one processor is fitted on a single chip or a board which in turn complete processing in much lesser time and impart the results in a much faster way. This is basically used in video editing, 3D rendering and various complex execution tasks.
Multi core Processors
Processors having more than one processing (execution unit) in a single chip-set are known as multi core processors. Multi core processors have approximately twice the power of single processor but as in reality the performance gain is 50 percent. So, in reality multi core processors are one and a half times powerful as a single core processor. Few years before dual core processors are firstly launched by the AMD and Intel brands.
Nowadays, apart from dual core processors, there is most rapid advancement in this field and now quad core, hexacore, octa-core processors are very common. Recently, deca-core and hexagonal processors are also launched. Advancement of multi core processors are originated from parallel processing technique. As multi core processors are beneficial for doing multi-tasking in which more than one task performed at the same time.
Multi-core CPU consume less power as the task is distributed to different units so they are comparatively having minimum load on a single unit as compare to single core CPU. Hence, also known as power-aware processors. Multi-core CPU are mainly used for encoding, video editing, 3D rendering purpose.
Types of processors
The computer processor is designed on behalf of the hardware as well as software. Type of a processor is defined according to its way of work. In simple way, we all know that some software only run on particular hardware. For example, we can’t run the software file running on windows in the Mac Operating system. Because we all know that Mac OS recognizing file extension is different from the windows OS. So, on that basis, processors are classified in two categories:
- Complex Instruction Set Computer (CISC)
- Reduced Instruction Set Computer (RISC)
Complex Instruction Set Computer (CISC)
Intel’s hardware-oriented approach led to rise of CISC architecture in which more complexities are added to hardware in order to keep software simpler. CISC is a processor hardware in which all the commands and instructions are pre-programmed which results in the simple software programming. Software used for these types of process are not so complex and are easy to build due to its compact and simple programming module. Due to compact and brief coding, these software have less execution time and are more efficient. Advantages of CISC processors include:
- Programs are simple, short and require less space.
- Translator required less effort to convert program into machine language.
- Instructions are able to executed faster by the processor.
However, downside of the CISC processors having complex hardware circuit build up so that they require additional hardware circuitry in order to handle instructions. However, this results costly manufacturing architecture hence these processors are expensive as compare to RISC (Reduced Instruction set computer). In present time, CISC processors are used in majority.
Reduced Instruction Set Computer (RISC)
Apple hardware-oriented approach led to rise of RISC architecture. RISC utilizes small but highly optimized set of instructions. In a research done by IBM, it was found that 20% of instructions are utilized for 80% of total work. It was surprising results for IT organizations. Due to this RISC architecture is developed in which less instructions are pre-loaded in the hardware which are frequently used in day to day life by the user. Due to less instruction set memory management in the processor is easy for the developers and able to faster execute the programs which results in high performance at a low power hence it is power efficient too.
On other hand, RISC place extra demand on programmers in order to implement complex instructions by combining simple instructions. Due to simple and brief instructions less hardware circuitry is used which results in less expensive hardware architecture processors. RISC processors are also used in small gadgets like wrist bands, etc. due to its simple hardware and its power efficient architecture.
Modern facts about CISC and RISC
As we know that CISC uses parallel processing and RISC uses pipelining processing. Both of them have their own benefits and advantages as well as dis-advantages. As the time passes, the lines between these two architectures begun to blur. Now companies of these two architectures started using RISC pipelining technique in CISC to gain better performance. On other hand, CISC parallel processing is used in RISC to gain programming optimization of their software. It also increases the no. transistors like CISC to store more instructions at a time to process.
Nano-meter technology is a method or way to minimize the size of transistors. Transistors are used in a micro-processor to process number of logical operations (logic gates) in any program or instruction. Basically, transistors are the building blocks (smallest unit) of a micro-processor. There are number of transistors in in a micro-processor and they all together work on logical operations to fulfill a task in an efficient manner.
Smaller the size of transistor greater the performance and power efficiency. The reason behind this fact is very simple. For example, if the size of transistor is small in a micro-processor then the given task is distributed in small pieces to all the transistors. Due to this, the load on each transistor becomes reduced which results in low power consumption and the performance significantly get increased as all the transistors are working on the same time for a same task.
The traditional processors had bigger size transistors (in micro-meter) and due to this reason, huge number of transistors aren’t possible in a processor chip-set. Due to this, load on each single transistor increases hence the performance decreases. In modern micro-processors, the micro-meter sized transistors are converted into nano-meter sized transistors. Nowadays, modern micro-processors have the much smaller transistors having the size in nano-meter. The heating problem of a processor also depends on the size of transistor, bigger the size of transistor greater the energy loss (heating effect).
Presently, 5nm technology is latest one on which the processor is recently manufactured. Modern micro-processor chipsets have billions of transistors in a single chip. Major parameters on which architecture of processors (CPU) availed are 22nm, 16nm, 14nm, 12nm, 10nm, 8nm, 7nm, 5nm. Recently, companies like Apple and Huawei are working on the 3nm technology which is said to be the most efficient processor architecture in the upcoming days.