Presentation is loading. Please wait.

Presentation is loading. Please wait.

Course Code 114 Introduction to Computer Science

Similar presentations


Presentation on theme: "Course Code 114 Introduction to Computer Science"— Presentation transcript:

1 Course Code 114 Introduction to Computer Science
Lecture 5 Moores' Law, The cache, and Data and instructions Assoc. Prof. Hussam Elbehiery Egypt 2018

2

3

4 Moores' Law In 1965, Gordon Moore predicted that the number of transistors in processors (and hence their speed) would be able to be doubled every 18 months. Moore expected that this regularity would at least apply up until 1975. The many millions of transistors inside the CPU are made of, and connected by, ultra thin electronic tracks. The width of these electronic tracks is measured in microns (or micrometers), which are millionths of a meter. Nano-Transistors, produced using organic (carbon-based) semiconductors with widths of just one molecule.

5

6 This process can be used to produce both CPU’s and RAM circuits up to 1000 times smaller than what we have today! The types of CPU’s we have today use a fairly large amount of electricity when the PC is turned on and is processing data. The processor, as you know, is installed in the motherboard, from which it receives power. There are actually two different voltage levels, which are both supplied by the motherboard: One voltage level which powers the CPU core (kernel voltage up to +/-12 V). Another voltage level which powers the CPU’s I/O ports, which is typically +/- 3.3 volts.

7 As the track width is reduced, more transistors can be placed within the same area, and hence the voltage can be reduced. This leads to lower power consumption per transistor. But since the number of transistors increases by a corresponding amount in each new CPU generation, the end result is often that the total power consumption is unchanged. It is very important to cool the processor; a CPU can easily burn Watts. This produces a fair amount of heat in a very small area, so without the right cooling fan and motherboard design, a Gigahertz processor could quickly burn out. Modern processors contain a thermal diode which can raise the alarm if the CPU gets to hot. If the motherboard and BIOS are designed to pay attention to the diode’s signal, the processor can be shut down temporarily so that it can cool down.

8

9 The cache Two aspects of the development of new CPU’s: increasing clock frequencies and the increasing number of transistors being used. Now it is time to look at a very different yet related technology – the processor’s connection to the RAM, and the use of the caches. The CPU works internally at very high clock frequencies (like 3200 MHz), and no RAM can keep up with these.

10 The most common RAM speeds are between 266 and 533 MHz
The most common RAM speeds are between 266 and 533 MHz. And these are just a fraction of the CPU’s working speed. If nothing could be done about this problem, there would be no reason to develop faster CPU’s. The solution is to insert small, intermediate stores of high-speed RAM. These buffers (cache RAM) provide a much more efficient transition between the fast CPU and the slow RAM. Cache RAM operates at higher clock frequencies than normal RAM. Data can therefore be read more quickly from the cache.

11 CPU Structure

12

13 The CPU can move data in different sized packets, such as bytes (8 bits), words (16 bits), dwords (32 bits) or blocks (larger groups of bits), and this often involves the registers. The different data packets are constantly moving back and forth: From the CPU registers to the Level 1 cache. From the L1 cache to the registers. From one register to another. From L1 cache to L2 cache.

14 Data and Instructions CPU processes instructions and data. It receives orders from the software (Operating System). The CPU is fed a gentle stream of binary data via the RAM. The instructions can also be called program code; send to your PC using your keyboard and mouse. Commands to print, save, open, etc. Data is typically user data. Think about that you are writing.

15 The actual contents (the text, the letters) is user data
The actual contents (the text, the letters) is user data. But when you and your software say “send”, your are sending program code (instructions) to the processor. Instructions are binary code which the CPU can understand. Binary code (machine code) is the mechanism by which PC programs communicate with the processor.

16 These instructions are the language that the CPU understands, and thus all programs have to communicate using these instructions. Here is a simplified example of some “machine code” – instructions written in the language the processor understands: proc near mov AX,01 mov BX, inc AX add BX,AX Programs are written in a programming language (like Visual Basic or C++). But these program lines have to be translated into machine code, they have to be compiled, before they can run on a PC. The compiled program file contains instructions which can be understood by the particular processor (or processor family) the program has been “coded”.

17 The processors from AMD and Intel which we have been focusing on are compatible, in that they understand the same instructions. All the processors in the PC family (regardless of manufacturer) can execute the same instructions and hence the same programs.

18 X86 and CISC Vs. RISC The (X86) instruction set of the original Intel 8086 processor is of the CISC type, which stands for Complex Instruction Set Computer. The individual instructions vary in length from 8 to 120 bits. It is designed for the 8086 processor, with just 29,000 transistors. The opposite of CISC, is RISC instructions. RISC stands for Reduced Instruction Set Computer, which is fundamentally a completely different type of instruction set to CISC. RISC instructions can all have the same length (e.g. 32 bits). They can therefore be executed much faster than CISC instructions.

19 Assoc. Prof. Hussam Elbehiery
Thank you With all my best wishes Assoc. Prof. Hussam Elbehiery


Download ppt "Course Code 114 Introduction to Computer Science"

Similar presentations


Ads by Google