Lecture No 9: Central Processing Unit Memory and Its Types Factors Affecting Speed
Lecture No 9: Central Processing Unit Memory and Its Types Factors Affecting Speed
Central Processing Unit Memory and Its Types Factors Affecting Speed
CPU
Processor-on-a-chip. The CPU is the computers brain that manipulates data. It follows the instructions of the software to manipulate data into information.
Control Unit
It manages all the computers resources. It tells the rest of the computer system how to carry out a programs instructions. It directs the movement of electronic signals between main memory and ALU/Input Output Devices. The control unit stores the CPU's microcode, which contains the instructions for all the tasks the CPU can perform.
The Control unit and ALU also contain set of registers to enhance the computers performance.
Registers:
- These are high speed staging areas that temporarily store data during processing and provide working areas for computation. - These hold material that is to be processed immediately. e.g. Control Unit might load two numbers from memory into the registers in the ALU. Then it might tell ALU to divide the two numbers.
Machine Cycle
A Machine cycle is a series of operations performed to execute a program instruction. It consists of two parts:
1) Instruction cycle
2) Execution cycle
Instruction Cycle
1) Fetching 2) Decoding During the instruction cycle, the CPU fetches (Gets) a command or data from main memory and decodes it (Determines what it means)
Execution Cycle
1) Executing 2) Storing During the execution cycle, the CPU executes the instruction (Performs the Operation on the data), and may store the instruction's result in memory/Register
Processing Speeds
There are three ways in which processing speeds are measured: 1) Time to complete one machine cycle in fractions of a second. 2) Time to complete instructions in millions of instructions per second. 3) Time in floating point operations per second.
Pipelining
Also called pipeline processing.
The control unit begins a new machine cycle before the current cycle is completed
Memory
Allows the CPU to store and retrieve data quickly. It consists of chips either on the motherboard or on a small circuit board attached to the motherboard. There are two kind of built-in memory: 1) Non-Volatile Memory 2) Volatile Memory
Kinds of Memory
Read-only memory (ROM): nonvolatile - These retain the data even when the computer/power is turned off. - The data cannot be changed except through a special process that overwrites the data. - The Data in these is only read and used.
Kinds of Memory
Random-access memory (RAM): volatile
A Memory that temporarily holds data and instructions that will be needed by the CPU. Data can be stored and retrieved at random. RAM stores data and program code needed by the CPU. The contents of RAM change rapidly and often.
Bus
It refers to the path between the components of a computer. Two main buses: -It resides on the motherboard and connects the CPU to other devices.
Data Bus
It is an electrical path that connects the CPU, Memory and other hardware devices on the motherboard. No of wires in the bus affects the speed at which data can travel between hardware components. 8- wire bus can move 8 bits at a time.
Address Bus
It is a set of wires similar to data bus.
It connects only the CPU and RAM and carries only memory address
Bus Types
Industry standard architecture (ISA) bus 16 bit connect devices Local bus internal Peripheral Component Interconnect (PCI) bus fast 32 and 64 bit Accelerated Graphics Port (AGP) bus -video Universal Serial Bus (USB) fast - no slots IEEE 1394 (FireWire)- fast - no expansion slots
Cache memory
Speeds processing by storing frequently used data or instructions in its high-speed memory
Computer Program
A set of instructions or statements, also called code, to be carried out by the computers CPU.
Files
Typically, a program is stored as a collection of files. Some common file types used in programs are: Executable (.EXE) files actually send commands to the processor. Dynamic Link Library (.DLL) files are partial .EXE files. Initialization (.INI) files contain configuration information for a program. Help (.HLP) files contain information for the user.
Interrupt
A preprogrammed set of steps that the CPU follows.
Machine Code
Also called machine language.
The 1s and 0s that form the language of computer hardware.
Programming Language
A Higher-level language than machine language, enables the programmer to describe a program using a variation of basic English.
Source Code
File where programming language results are kept.
Flowchart
A chart that uses arrows and symbols to show the order in which a programs statement will run.
Pseudo code
Simplified text version of programming code.
Algorithm
The steps represented in a flowchart that lead to a desired result are called an algorithm.
Examples of Loops
For While Do-while
Structured Programming
The practice of building programs using a set of well-defined structures.
Syntax
Programming language rules.
Syntax Examples
Provide information in a certain order and structure
Use special symbols Use punctuation (sometimes)