Computer Architecture and Organization PDF
Document Details
Uploaded by AffirmativeTigerEye
Dr. V. K. Jain
Tags
Summary
This document provides an introduction to computer architecture and organization for computer science students. It discusses the components of a computer system, and their interaction.
Full Transcript
COMPUTER ARCHITECTURE AND ORGANIZATION INTRODUCTION TO PROFESSION (CS_1001) 56 Why do we need computer Architecture and Organizations ? What is its significanc...
COMPUTER ARCHITECTURE AND ORGANIZATION INTRODUCTION TO PROFESSION (CS_1001) 56 Why do we need computer Architecture and Organizations ? What is its significance on Computer Engineering students ? What is Answer : It is the study of computers and its components, etc.. Computer Architecture and Computer Architecture A computer is a complex device containing many sub- Organization? systems. Each sub-system is a piece of computer hardware How these pieces interact is called the “Computer Architecture”. It is concerned with the structure and behavior of the computer system as seen by the user. It is the view of a computer as presented to software designers. Computer Organization Organizing a computer. It is how operational attributes are linked together. The actual implementation of a computer in hardware. 57 CS1001_Introduction to Profession (Dr. V. K. Jain) 1 Basic Organization of a Storage Unit Computer System Secondary Storage Program Information Input Output (Results) and Data Unit Unit Primary Storage Control Unit Indicates flow of instructions and data Arithmetic Indicates the control Logic Unit exercised by the control unit Central Processing Unit (CPU) 58 All computers normally perform following functions: Data processing ▪ The computer, of course, must be able to process data. ▪ The data may take a wide variety of forms, and the range of processing requirements is broad. Basic Data storage Computer ▪ It is also essential that a computer store data. ▪ Even if the computer is processing data on the fly, Functions the computer must temporarily store at least those pieces of data that are being worked on at any given moment. Data movement ▪ The computer must be able to move data between itself and the outside world. ▪ I/O and Data Communication Control ▪ there must be control of these three functions. 59 CS1001_Introduction to Profession (Dr. V. K. Jain) 2 Computer architecture refers to those attributes of a system visible to a programmer or, in other words, those attributes that have a direct impact Computer on the logical execution of a program. Architecture Examples of architectural attributes include the and instruction set, the number of bits used to represent various data types (e.g., numbers, Organization characters), I/O mechanisms, and techniques for addressing memory. Computer organization refers to the operational units and their interconnections that realize the architectural specifications. 62 62 Organizational attributes include those hardware details transparent to the programmer: – control signals; Computer – interfaces between the computer and peripherals; Architecture – the memory technology used. For example, it is an architectural design issue and whether a computer will have a multiply Organization instruction. It is an organizational issue whether that instruction will be implemented by a special multiply unit or by a mechanism that makes repeated use of the add unit of the system. Many computer manufacturers offer a family of computer models, all with the same architecture but with differences in organization. 63 63 CS1001_Introduction to Profession (Dr. V. K. Jain) 3 All Intel x86 family share the same basic architecture The IBM System/370 family share the same basic Computer architecture. Architecture This gives code compatibility – At least backwards and Organization differs between different versions. Organization Consequently, the different models in the family have different price and performance characteristics. Furthermore, a particular architecture may span many years and encompass a number of different computer models, its organization changing with changing technology. 64 64 Embarrassing if you are a B.Tech in CSE and can’t make sense of the following terms: DRAM, pipelining, cache hierarchies, I/O, virtual memory Why Embarrassing if you are a B.Tech in CSE and can’t Computer decide which processor to buy: Core i7 11th Generation 3.8 GHz or AMD Ryzen 7 5800X Organization? 3.8 GHz (helps us reason about performance/power) Obvious first step for chip designers, compiler/OS writers Will knowledge of the hardware help me write better programs? 66 66 CS1001_Introduction to Profession (Dr. V. K. Jain) 4 Is a Programmer must care about Hardware? Memory management: if we understand how/where data is placed, it can help to ensure that relevant data is nearby Thread management: if we understand how threads interact, we can write smarter multi-threaded programs → Why do we care about multi-threaded programs? 67 67 Performance 73 CS1001_Introduction to Profession (Dr. V. K. Jain) 5 The most important measure of the performance of a computer is how quickly it can execute programs. Performance Three factors affect performance: Hardware design Instruction set Compiler 74 Processor time to execute a program depends on the hardware involved in the execution of individual machine instructions. This hardware comprises the processor and the memory, which are usually connected by a bus. Performance Main Cache memory Processor memory Bus Figure :The processor cache. 75 CS1001_Introduction to Profession (Dr. V. K. Jain) 6 The processor and a relatively small cache memory can be fabricated on a single integrated circuit chip. The internal speed of performing the Performance basic steps of instruction processing on such chip is very high. Cost Memory management 76 Processor circuits are controlled by a timing signal called Clock. The Clock defines regular time intervals, called clock cycle. Processor The execution of each instruction is divided into several steps, each of which Clock completes in one clock cycle. The length P of one clock cycle is an important parameter that affects processor performance. Its inverse is the clock rate, R = 1/P. Hertz – cycles per second 77 CS1001_Introduction to Profession (Dr. V. K. Jain) 7 N S T= R T – processor time required to execute a program that has Basic been prepared in high-level language Performance N – number of actual machine language instructions needed to complete the execution (note: loop) Equation S – average number of basic steps needed to execute one machine instruction. Each step completes in one clock cycle R – clock rate Note: these are not independent to each other How to improve T? 78 Instructions are not necessarily executed one after another. The value of S doesn’t have to be the number of clock cycles to execute one instruction. Pipeline Pipelining – overlapping the execution of successive and instructions. Add R1, R2, R3 Superscalar In the ideal case, if all instructions are overlapped to the maximum degree possible, execution proceeds at Operation the rate of one instruction completed in each clock cycle. Individual instruction still require several clock cycles to complete, But, for the purpose of computing T, the effective value of S is 1. Superscalar operation – multiple instruction pipelines are implemented in the processor. Goal – reduce S (could become