Computer Architecture CS 401 Sabanci University erkayssabanciuniv edu
Computer Architecture CS 401 Sabanci University erkays@sabanciuniv. edu 12/3/2020 Erkay Savas 1
Outline • • Brief Overview What is under a computer program Components Roadmap for this class 12/3/2020 Erkay Savas 2
Things You will be Learning • How computers work; the basic foundation • How to analyze their performance and how not to • Key technologies determining the modern processor performance – – – Datapath Pipeline Cache Memory Hierarchy I/O Multiprocessors 12/3/2020 Erkay Savas 3
Below the Software • Abstraction – Delving into the depths reveals more information – An abstraction omits unneeded detail, helps us cope with complexity – Computers might be very different from what we think they are when we look at it at the hardware level. – In fact, they can be communicated only by sending them electrical signals: HIGH/LOW voltage – First level of abstraction is to designate these signals as TRUE/FALSE and 1/0 – We often think that the true language of the computers is binary numbers 12/3/2020 Erkay Savas 4
Instruction Set Architecture • Important abstraction – interface between hardware and low-level software • Or features available to programmers – instructions • e. g. does a computer have an multiply instruction? – instruction coding – number of bits to represent data – I/O mechanism. – addressing mechanism • Modern instruction set architectures: – 80 x 86/Pentium/K 6, Power. PC, DEC Alpha, MIPS, SPARC, HP, ARM. 12/3/2020 Erkay Savas 5
Organization • Organization is how features are implemented in hardware – – Transparent to programmers different implementations of the same architecture Control signals, interfaces, memory technology. e. g. Is there a hardware multiply unit or is it done by repeated addition? 12/3/2020 Erkay Savas 6
How to Program a Computer? • Most natural way is to encode whatever you want to tell the computer to do with electrical signals (on and off) – since this is the only thing it understands • Of course, we need something simpler to work with • Machine Code • Assembly language • High-level languages – C/C++, Pascal, Fortran, Java, C# 12/3/2020 Erkay Savas 7
Processing a C Program High-level language program (in C) Assembly language program for MIPS swap (int v[], int k){ int temp; temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; } Binary machine language program for MIPS 12/3/2020 C compiler 000010100000001 10000001000111000011000 00100001100011000000100011110010 0000000100101011001111 0010000000001010110000000001000000 00111110000000001000 Erkay Savas swap: muli add lw lw sw sw jr $2, $15, $16, $15, $31 $5, 4 $4, $2 0($2) 4($2) Assembler 8
Functions of a Computer • • Data processing Data storage Data movement Control 12/3/2020 Erkay Savas 9
Functions of a Computer source & destination of data movements apparatus Control mechanism Data processing facility Data storage facility 12/3/2020 Erkay Savas 10
Five Classic Components Computer Processor Datapath Control 12/3/2020 Memory Input Output Erkay Savas System Interconnection 11
Motherboard USB 2. 0 PS/2 connectors SIMM Sockets Sound PCI Card Slots 12/3/2020 Erkay Savas Parallel/Serial Processor IDE Connectors 12
Inside the Processor Chip Instruction Cache Data Cache 12/3/2020 Control Bus Erkay Savas branch prediction integer floating-point datapath 13
Computer peripherals CPU I/O System interconnection computer Memory network 12/3/2020 Erkay Savas 14
CPU ALU CPU Internal CPU interconnection Cache Memory 12/3/2020 Registers Erkay Savas Control Unit 15
Memory • Nonvolatile: – ROM – Hard disk, floppy disk, magnetic tape, CDROM, USB Memory • Volatile – DRAM used usually for main memory – SRAM used mainly for on-chip memory such as register and cache – DRAM is much less expensive than SRAM – SRAM is much faster than DRAM 12/3/2020 Erkay Savas 16
DRAM and Processor Characteristics 12/3/2020 Erkay Savas 17
Solutions to Memory Problems • Increase number of bits retrieved at one time – Make DRAM “wider” rather than “deeper” • Change DRAM interface – Cache • Reduce frequency of memory access – More complex cache and cache on chip • Increase interconnection bandwidth – High speed buses – Hierarchy of buses 12/3/2020 Erkay Savas 18
Computer Networks • Very essential aspect of computer systems – Communication – Resource sharing – Remote access • Ethernet is the most popular LAN – Range is limited to 1 kilometer – 3 Mbit/s to 10 Gbit/s – Coaxial cable to twisted pair to optical fiber • Wide Area Networks (WAN) – Cross continents and backbone of the Internet 12/3/2020 Erkay Savas 19
Roadmap • • Performance issues Instruction set of MIPS Arithmetic and ALU Constructing a processor to execute our instructions (datapath design) Pipelining Memory hierarchy: caches and virtual memory I/O Multiprocessors 12/3/2020 Erkay Savas 20
- Slides: 20