Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2: CPU &Data Storage. CPU Each computer has at least one CPU Each computer has at least one CPU CPU execute instructions to carry out tasks –

Similar presentations


Presentation on theme: "Chapter 2: CPU &Data Storage. CPU Each computer has at least one CPU Each computer has at least one CPU CPU execute instructions to carry out tasks –"— Presentation transcript:

1 Chapter 2: CPU &Data Storage

2 CPU Each computer has at least one CPU Each computer has at least one CPU CPU execute instructions to carry out tasks – MS Word CPU execute instructions to carry out tasks – MS Word Examples of microprocessors Examples of microprocessors –Pentium IV by Intel –PowerPC by Apple-IBM-Motorola Manufacture of CPUs defines its own set of instructions Manufacture of CPUs defines its own set of instructions –That is why a program for Pentium would not run on PowerPC

3 CPU Speed System clock System clock –It controls all the operations in a computer –For a given CPU, the execution of each instruction requires a fixed # of pulses to complete. E.g., ADD X, Y, Z – 10 pulses E.g., ADD X, Y, Z – 10 pulses –The pulses, also called clock cycles, are generated by a circuit called system clock E.g., 2.1GHz system clock generates 2.1 billion pulses per second E.g., 2.1GHz system clock generates 2.1 billion pulses per second E.g., 800MHz generates 800 million pulses per second. E.g., 800MHz generates 800 million pulses per second.

4 CPU Speed CPU A - 2.0GHz CPU A - 2.0GHz –2 billion pulses per second –Size of each pulse = 1,000,000,000 ns/2,000,000,000 = 0.5 nanoseconds (billionth seconds) = 0.5 nanoseconds (billionth seconds) –ADD X, Y, Z – 10 pulses = 5 ns CPU B - 1.0GHz CPU B - 1.0GHz –1 billion pulses per second –Size of each pulse = 1,000,000,000ns/1,000,000,000 = 1 ns = 1 ns –ADD X, Y, Z – 10 pulses = 10 ns CPU A is twice as fast as CPU B CPU A is twice as fast as CPU B The faster the system clock, the more powerful the CPU. The faster the system clock, the more powerful the CPU.

5 Clock Speed Hz(hertz): 1 clock cycle per second Hz(hertz): 1 clock cycle per second –Size of each pulse = 1 second KHZ(Kilohertz): 1 thousand pulses per second KHZ(Kilohertz): 1 thousand pulses per second –Size of each pulse = 1 millisecond MHz (Megahertz): 1 million pulses per second MHz (Megahertz): 1 million pulses per second –Size of each pulse = 1 microsecond GHz (Gigahertz): 1 billion pulses per second GHz (Gigahertz): 1 billion pulses per second –Size of each pulse = 1 nanosecond

6 CPU Power Many of today’s CPUs have more than one processors in them Many of today’s CPUs have more than one processors in them Traditional CPUs execute one instruction at a time Traditional CPUs execute one instruction at a time Dual-Core processor can execute two instructions at the same time Dual-Core processor can execute two instructions at the same time A dual-core processor is “twice” as fast as a single-core processor of the same system clock A dual-core processor is “twice” as fast as a single-core processor of the same system clock

7 Types of Memory The main memory The main memory –ROM: Read-only memory Store permanently instructions for system startup. Store permanently instructions for system startup. Its contents cannot be modified. Its contents cannot be modified. Its contents written by the manufacture Its contents written by the manufacture –RAM Transitory (volatile) memory – when the power is turned off, its contents is lost. Transitory (volatile) memory – when the power is turned off, its contents is lost. Applications and user data are temporarily stored here for processing. Applications and user data are temporarily stored here for processing. Contains operating system, programs being executed, and data being processed Contains operating system, programs being executed, and data being processed

8 Memory Access Time The speed of a RAM chip is called memory access time The speed of a RAM chip is called memory access time The time needed for read from or write into the RAM The time needed for read from or write into the RAM –40ns RAM – needs 40ns to read from RAM –80ns RAM – needs 80ns to read from RAM RAM is much slower than CPU RAM is much slower than CPU Most CPUs requires minimum RAM Access time Most CPUs requires minimum RAM Access time

9 Memory Units Bit: binary digit – store 0 or 1 Bit: binary digit – store 0 or 1 Byte: 8 bits – a character Byte: 8 bits – a character KB: kilobyte – 1000 bytes KB: kilobyte – 1000 bytes MB: megabytes – 1 million bytes MB: megabytes – 1 million bytes GB: gigabytes – 1 billion bytes GB: gigabytes – 1 billion bytes TB: terabytes – 1 trillion bytes TB: terabytes – 1 trillion bytes

10 Type of Storage Hard disks Hard disks –Permanent storage – its contents do not depend on power –Permanent, but not forever –Where applications are installed –Where user files are stored –Where virtual memory is located CDs CDs –Compact discs –Data are written to and read from using laser –Permanent storage –Read-only –Burn CDs – write once and read many

11 Hard Disks Rigid circular steel platters with magnetic coating Rigid circular steel platters with magnetic coating Platters spin at high speed Platters spin at high speed Each surface is formatted into circular bands called tracks and each track is divided into segments called sectors Each surface is formatted into circular bands called tracks and each track is divided into segments called sectors Data are stored on the sectors Data are stored on the sectors Each surface has a read/write (R/W) head for reading and writing from/to the surface Each surface has a read/write (R/W) head for reading and writing from/to the surface To read from or write to a sector, the R/W head of each surface moves to the track and wait for the sector to spin under the R/W head and then read or write. To read from or write to a sector, the R/W head of each surface moves to the track and wait for the sector to spin under the R/W head and then read or write.

12 Cylinders, Tracks, and Sectors

13 Hard Disks: Read/Write

14 Summary – chapter 2 CPU – central processing unit CPU – central processing unit Instruction set – the set of instructions a given CPU understands Instruction set – the set of instructions a given CPU understands System clock – generates a sequence of pulses System clock – generates a sequence of pulses ROM – fast, read only and permanent ROM – fast, read only and permanent RAM – fast, allow read and write, transitory/volatile RAM – fast, allow read and write, transitory/volatile Hard disks – permanent, very high capacity, slow compared to RAM/ROM Hard disks – permanent, very high capacity, slow compared to RAM/ROM –Tracks/sectors

15 Terminology CPU CPU System clock System clock Clock cycles/pulses Clock cycles/pulses Instruction set Instruction set Single processor CPUs Single processor CPUs Multi-processor CPUs Multi-processor CPUs RAM/ROM RAM/ROM –Memory access time Hard disks Hard disks –Cylinder/Track/Sector Transitory/volatile RAM Transitory/volatile RAM Permanent storage Permanent storage


Download ppt "Chapter 2: CPU &Data Storage. CPU Each computer has at least one CPU Each computer has at least one CPU CPU execute instructions to carry out tasks –"

Similar presentations


Ads by Google