Tech Terminology Demystified – The CPU

The most general description of the CPU is that it is the brain of the computer. This is what everyone is familiar with. Let’s delve a little deeper.

 


The CPU fetches instructions from memory and executes them. The CPU is a piece of hardware that is built with it’s own instruction set. The operating system must be designed to work within this CPU architecture and this instruction set that the CPU was built with. This is why one operating system may work on a Pentium processor but not on a SPARC processor.

 

What is the mechanism within the CPU that let’s it do operations on data? It is the same mechanism that works in a calculator – the transistors. The calculator is a computer that has a CPU with a very small instruction set. The speed of the CPU comes from the number of transistors that can be crammed into the CPU chip which is only a couple of square inches. Today there are chips that can hold 2 billion transistor like Intel’s processor called ‘Tukwila’.

 

How do the calculations or operations on data take place. The transistors are arranged to form ‘Logic Gates’ which actually do the calculations. The arrangement of logic gates in different formats creates a unique CPU. All operations within the CPU are performed by electrical signals at different voltages at different combinations and these are held by the transistors. This part within the CPU doing the calculations is called the Arithmetic Logic Unit (ALU).

 

The CPU also contains registers which contain pointers to memory locations where data and instructions are held. When a software is opened, it’s instructions and data are held in memory and when it’s the turn of this software to be executed, the instructions and the data memory addresses are passed to the registers. When the ‘Control Unit’ wants to execute the software, the instructions and data are passed to the ALU for actual processing.

 

Associated Terms

 

Process
When a software is loaded into memory it is called a process. When a process is created it is assigned certain resources such as a memory segment, CPU time slot, access to APIs and files to interact with. This collection of instructions and resources is called a process. A process may be in one of many states – new, ready, running, blocked or done.

 

Multitasking
The CPU can load many programs into memory and allot a small portion of time to each process in such a manner that the CPU does not waste time waiting for responses from memory and other peripheral devices. The switching between processes is so fast that the user thinks the CPU is handling many tasks at once. Preemptive multitasking is when the processor controls how much time a process can use a resources. If a process of higher priorty requires the resource, the processor may force the process holding it to relenquish control.

 

Multiprocessing
Many computers nowadays have more than one processor. Eg. Intel’s Core Duo has 2 processors and Quad Core has 4 processors.

 

Interrupt
When a process wants access to the CPU, it issues an interrupt. Each device and process is assigned a priority level. When the CPU receives an interrupt, it checks the interrupt table for the priority level of the process requesting access to it and starts executing the process with higher priority.

 

Multithreading
A thread is a logical unit of instruction set and the data associated with it. Many applications have different functionalities. When a person uses a word processor to open a file, a thread is dedicated for that; when he wants to save the file, a thread is created for that; when he wants to print the file a separate thread is created for that. When the job is done the thread is destroyed and the resources are released. An application capable of doing various tasks at the same time is called ‘Multithreaded’

 

Virtual Memory
The system uses the hard drive as an extension of RAM memory. The reserved portion of the hard drive is called the swap space.

Comments are closed.