800 likes | 1.78k Views
Introduction to Computer Architecture (Section-2). By Dr. Muhammad Aleem , Department of Computer Science, Mohammad Ali Jinnah University, Islamabad Spring 2014. Lecture Outline. Introduction to Computer System Basic Components of a Computer System Architecture Vs Organization
E N D
Introduction to Computer Architecture(Section-2) By Dr. Muhammad Aleem, Department of Computer Science, Mohammad Ali Jinnah University, Islamabad Spring 2014
Lecture Outline • Introduction to Computer System • Basic Components of a Computer System • Architecture Vs Organization • A Brief History of Computers • Computer Generations • Introduction of two Processor Architectures • Intel x86 Architecture • Moore’s Law
Why Study Computer Architecture? • Understand high-level design concepts • To best architect at all the levels • Devices, circuits, architecture, compiler, applications • Understand computer performance • Understanding why a program runs faster/slower on a certain hardware • Write better software • Best software designers also understand hardware • Need to understand hardware to write fast software • Design hardware • AT Intel, AMD, IBM, ARM, NVIDIA, Samsung, etc.
What is Computer Architecture? “Computer Architecture is the science of selecting and interconnecting hardware components to create computers that meet functional, performance and cost goals.”
1. Introduction to Computer System “A computer system consists of millions of electronic and electro-mechanical components working together to process data” Q: How to understand computer system having millions of components? Ans: We need abstractions to model and simplify complex details in higher-level concepts.
1. Introduction to Computer System • View computer system as hierarchal structure using (Top-down approach-> More clear approach) Registers ALU IO Memory Internel Bus System Bus Control Unit CPU CPU (Centeral Processing Unit) Computer System
1. Architecture Vs Organization • Architecture is those system attributes which are visible to the programmer: • Instruction set, number of bits used for data representation, addressing techniques. • e.g. Is there a multiply instruction? • Organizationis how features are implemented • Control signals, memory technology, memory levels (on-chip, on-board, off-board) • e.g. Is there a separate hardware multiply unit or is it done by repeated addition?
1. Architecture Vs Organization • Instruction Set Architecture (ISA) • Tells what the computer is capable of (logical view) • Computer Organization • Shows HOW the ISA is implemented (physical view) Instruction Set Architecture (ISA) is the part of the processor that is visible to the programmer or compiler writer. The ISA serves as the boundary between software and hardware
1. Architecture Vs Organization • Examples: • All Intel x86family share the same basic architecture • The IBM System/370 family share the same basic architecture • Organization may differs between different versions of the same architecture or which results in Computer family.
1. Architecture Vs Organization • Possible different organization but same architecture leads to the concept of Families: • Differentcostand performance goals • Run same code (code compatibility)
1. Computer System Architecture Users and problems Programming Languages Resource Virtualization H/W, S/W interfaces Instruction Set, Registers, ALUs, Addressing Techniques, etc. Digital design, Transistors, Signals Atoms, Electrons,
1. Introduction to Computer System • At each level in hierarchy we are concerned with: • Structure: How components are interrelated and connected? • Function: Role or responsibilities of each component in the system.
1. Introduction to Computer System • Basic Functions a Computer System: • Data processing: Text, Numbers, Audio, Video, etc. • Data storage: Short term (in CPU) , and long term (in external storage such as hard disks) • Data movement: Within computer system and out-side (remote computers) • Control: devices, operations, etc.
1. Data Processing • The basic function of any computer is to process data • Describes arithmetic and logical operations performed on data • Transformation of input data into desired output
2. Data Storage • Long term storage • Logging • Data records • Short term • temp variables – e.g., buffer containing the last key pressed • program control data – e.g., loop variables
1. Functional View – Data Movement As a Data Movement Device: From one peripheral /Communication device to another
1. Data Storage to IO (peripheral devices) • Two types: • Peripheral device communication • Data communications (to remote computers)
1. Structural View of a Computer System • Some basic parts of a computer system:
2. Structural View – Top level • View computer system as hierarchal structure using (Top-down approach) Registers ALU IO Memory Internal Bus System Bus Control Unit CPU CPU (Centeral Processing Unit) Computer System
2. Structural View – lower level • Each successively higher layer describes simplified/more abstract view of lower levels Control Unit decoders and Registers ALU Registers Internal Bus Control Memory Control Unit CPU (Central Processing Unit) CPU (Central Processing Unit)
Advantages of Hierarchal Structure • Better understanding of the data that is passed between components • Working within the hierarchy, a designer needs to only concern him/herself with the details of his or her module at that specific level • Working with a well-defined set of inputs, outputs, and function definition, designers can completely design their module independentlywithout any knowledge of how rest of system is made
Implementation • Three basic ways of implementation: • Hardware • Software • Firmware (Hard-wired code and data)
1. Hardware Implementation • The permanent, physical implementation of circuits and devices • Hardware is required for all systems • Hardware carries all the data operations
2. Software Implementation • The programs (set of Instructions) contained in read/write memory ranging from machinelanguage to high-level languages such as C++ • Requires a processor to run (hardware dependent)
3. Firmware Implementation • Lies Between hardware and software • Programs (usually machine code) contained in read only memory • Advantages: • Energy efficient i.e., consumes less energy • Compact size storage compared to hard disks
Performance Characteristics • Throughput/speed: (# of tasks performed / unit time) • HW Best • FM Average • SW Worst • Development Cost: • HW Best • FM Average • SW worst • General-purpose usage: • SW best; • FW average; • HW worst
Brief Computer History ENIAC (Electronic Numerical Integrator and Computer) • Eckert and Mauchly, University of Pennsylvania • Used: Trajectory tables for weapons • Started 1943, Finished 1946, Used until 1955 • Programmed manually by switches • 18,000 vacuum tubes • 30 tons, 15,000 square feet • First general purpose electronic Digital computer
ENIAC (Electronic Numerical Integrator and Computer) • Other components included 70,000 resistors, 10,000 capacitors, and 5 million soldered joints • Consumed 160 kilowatts of electrical power • 5,000 additions, 357 multiplications per second • 38 divisions per second • It was a decimal machine instead of binary
Von Neumann Computer Architecture • Stored Program concept (Revolutionary Concept) • Main memory storing programs and data • ALU operating on data • Control unitinterpreting instructions from memory and executing • Input and output equipment operated by control unit • Princeton Institute for Advanced Studies (IAS) computer (first implementation of the model) • Completed 1952 (first machine based on Von-Nueman)
IAS Computer (First Von-Nueman machine) • First electronic computer • 1000 x 40 bit words (memory size) • Binary number • 2 x 20 bit instructions • Signed magnitude binary number • 1 sign bit • 39 bits for magnitude • 2 x 20 bit instructions • Left and right instructions (left executed first) • 8-bit opcode or operation code • 12 bit address (of memory)
IAS Architecture (Registers in CPU) • Memory Buffer Register (MBR) • Store/Receive to/from IO and Memory • Memory Address Register (MAR) • Address of the memory word for MBR • Instruction Register (IR) • Opcode (8 bit) of current Instruction • Instruction Buffer Register (IBR) • Holds (right hand Inst, while left hand being executed)
IAS Architecture (Registers in CPU) • Program Counter (PC) • Address of next instruction to be fetched • Accumulator Register • Stores Intermediate results
IAS Architecture Multiplier Quotient
IAS Instruction Set • Has total of 21 instructions and can be categorized in following: • Data Transfer: Memory ALU, • Unconditional Branch: Jump • Conditional Branch: Condition-based Jump • Arithmetic: (+, -, /, *) • Address Modify: Address calculation
UNIVAC I (Universal Automatic Computer) • First commercial electronic computer • Based on Von/Nueman Architecture • US Bureau of Census 1950 calculations • Late 1950s - UNIVAC II • Faster • More memory
IBM’s Commercial Computers • Based on Punched-card processing equipment • 1953 (the 701 computer) • IBM’s first stored program computer • Scientific calculations • 1955 (the 702 computer) • Business applications • Lead to 700/7000 series
Transistors replacing Vacuum-tubes • Smaller and Cheaper • Less heat dissipation • Made from Silicon (Sand) • Invented in 1947 at Bell Labs Transistor Vacuum tube
Transistor based Computers • Second generation computers (1956-1963) • NCR & RCA produced small transistor machines • IBM 7000 • DEC produced PDP-1 in 1957 • Programming environment: • Replacing binary or machine language with symbolic Assembly language
Microelectronics • Literally - “small electronics” • A computer is made up of gates, memory cells and interconnections • These can be manufactured on a semiconductor e.g., silicon wafer • Huge increase in speed and memory • Third generation computers
Third generation computers • Based on semiconductor technology • 1964 – 1971 • Punch-cardKeyboard • Printer-based outputMonitors Replaced By Replaced By IBM 360 Computer
Fourth generation computers (1971 – onwards) • Microprocessors • Thousands of semiconductors on a chip • 1971 – onwards… • First personnel computer for home users introduced by IBM in 1981 • Apple introduced “Macintosh” in 1984
Fourth generation computers (Intel’s Processors) • 1971, 4004 processor • First Microprocessor • World First Single Chip Processor • Control Unit • ALU • Registers • 4 bit register width Intel’s 4004 Chip: First microprocessor
Fourth generation computers (Intel’s Processors) • In 1972, 8008 processor chip • 8 bit (register width) • Address bus 8 bits • Total Addressable memory = 16386 memory locations (16 KBs) ?? (2^8 = 256 memory locations) • Addressing used = 14 bits • Address propagated using 2 clock cycles • 2^14 = 16386 Memory Locations = 16 KB