Chapter 2 CPU Data Storage CPU Each computer

  • Slides: 15
Download presentation
Chapter 2: CPU &Data Storage

Chapter 2: CPU &Data Storage

CPU Each computer has at least one CPU n CPU execute instructions to carry

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

CPU Speed n System clock – It controls all the operations in a computer

CPU Speed n 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. n E. g. , ADD X, Y, Z – 10 pulses n E. g. , 2. 1 GHz system clock generates 2. 1 billion pulses per second E. g. , 800 MHz generates 800 million pulses per second. – The pulses, also called clock cycles, are generated by a circuit called system clock n

CPU Speed n CPU A - 2. 0 GHz – 2 billion pulses per

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

Clock Speed n Hz(hertz): 1 clock cycle per second – Size of each pulse

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

CPU Power Many of today’s CPUs have more than one processors in them n

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

Types of Memory n The main memory – ROM: Read-only memory n n n

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

Memory Access Time n n The speed of a RAM chip is called memory

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

Memory Units Bit: binary digit – store 0 or 1 n Byte: 8 bits

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

Type of Storage n Hard disks – – – n Permanent storage – its

Type of Storage n Hard disks – – – n 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 – – – Compact discs Data are written to and read from using laser Permanent storage Read-only Burn CDs – write once and read many

Hard Disks n n n Rigid circular steel platters with magnetic coating Platters spin

Hard Disks n n n Rigid circular steel platters with magnetic coating Platters spin at high speed Each surface is formatted into circular bands called tracks and each track is divided into segments called sectors Data are stored on the sectors 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.

Cylinders, Tracks, and Sectors

Cylinders, Tracks, and Sectors

Hard Disks: Read/Write

Hard Disks: Read/Write

Summary – chapter 2 n n n CPU – central processing unit Instruction set

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

Terminology n n n CPU System clock Clock cycles/pulses Instruction set Single processor CPUs

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