Dr. ClincyLecture1 Chapter 1 Basic Structure of Computers Basic structure of a computer Intro to Machine instructions and their execution Intro to system.

Slides:



Advertisements
Similar presentations
Khaled A. Al-Utaibi  Computers are Every Where  What is Computer Engineering?  Design Levels  Computer Engineering Fields  What.
Advertisements

Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
Computer Systems CS208. Major Components of a Computer System Processor (CPU) Runs program instructions Main Memory Storage for running programs and current.
0 What is a computer?  Simply put, a computer is a sophisticated electronic calculating machine that:  Accepts input information,  Processes the information.
CPU Describe the purpose of the CPU
 Chasis / System cabinet  A plastic enclosure that contains most of the components of a computer (usually excluding the display, keyboard and mouse)
Basic Operational Concepts of a Computer
Computer Architecture Lecture 01 Fasih ur Rehman.
The Structure of the CPU
Intro to CS Chapt 2 Data Manipualtion 1 Data Manipulation How is data manipulated inside a computer? –How is data input? –How is it stored? –How is it.
Lecture#14. Last Lecture Summary Memory Address, size What memory stores OS, Application programs, Data, Instructions Types of Memory Non Volatile and.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Invitation to Computer Science 5th Edition
CS 1308 Computer Literacy and the Internet Computer Systems Organization.
Basic Structure of Computer Computer Architecture Lecture – 2.
Levels of Architecture & Language CHAPTER 1 © copyright Bobby Hoggard / material may not be redistributed without permission.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
Microprocessor Dr. Rabie A. Ramadan Al-Azhar University Lecture 2.
Introduction to Computing Systems from bits & gates to C & beyond The Von Neumann Model Basic components Instruction processing.
Advanced Computer Architecture 0 Lecture # 1 Introduction by Husnain Sherazi.
Von Neumann Machine Objectives: Explain Von Neumann architecture:  Memory –Organization –Decoding memory addresses, MAR & MDR  ALU and Control Unit –Executing.
General Concepts of Computer Organization Overview of Microcomputer.
Computer Architecture And Organization UNIT-II General System Architecture.
CHAPTER 4 The Central Processing Unit. Chapter Overview Microprocessors Replacing and Upgrading a CPU.
Computer Organization & Assembly Language © by DR. M. Amer.
PHY 201 (Blum)1 Microcode Source: Digital Computer Electronics (Malvino and Brown)
I/O Memory Reg File ALU Program Counter Instruction Register Control Interconnect Control 1)PC contains mem address of Instruction, 2)From memory, instr.
Introduction to Microprocessors
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
CPS 4150 Computer Organization Fall 2006 Ching-Song Don Wei.
12/13/ _01 1 Computer Organization EEC-213 Computer Organization Electrical and Computer Engineering.
Computer Organization Instructors Course By: Lecturer: Shimaa Ibrahim Hassan TA: Eng: Moufeda Hussien Lecture: 9:45 Address:
CS 1308 Computer Literacy and the Internet. Objectives In this chapter, you will learn about:  The components of a computer system  Putting all the.
Stored Program A stored-program digital computer is one that keeps its programmed instructions, as well as its data, in read-write,
Computer and Information Sciences College / Computer Science Department CS 206 D Computer Organization and Assembly Language.
Lecture on Central Process Unit (CPU)
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Computer operation is of how the different parts of a computer system work together to perform a task.
C HAPTER 4 OS: C OMPUTER O RGANIZATION TOPICS: The Von Neumann Architecture The CPU.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 5: Computer Systems Organization Invitation to Computer Science,
Chapter 1 An Overview of Computers and Programming Languages.
CPIT Program Execution. Today, general-purpose computers use a set of instructions called a program to process data. A computer executes the.
Hardware and Software By: Kyle Face. Hardware! Main computer hardware components Hardware refers to the physical components of a computer (What you can.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
What is a computer? Simply put, a computer is a sophisticated electronic calculating machine that: Accepts input information, Processes the information.
Lecture 5: Computer systems architecture
What is a computer? Simply put, a computer is a sophisticated electronic calculating machine that: Accepts input information, Processes the information.
CS1251 Computer Architecture
Components of Computer
Edited by : Noor Alhareqi
Computer Organization
Computer Science I CSC 135.
Edited by : Noor Alhareqi
Functional Units.
Morgan Kaufmann Publishers Computer Organization and Assembly Language
The Von Neumann Model Basic components Instruction processing
Chapter 5: Computer Systems Organization
Overview of Computer Architecture and Organization
Introduction to Computer Architecture
Presentation transcript:

Dr. ClincyLecture1 Chapter 1 Basic Structure of Computers Basic structure of a computer Intro to Machine instructions and their execution Intro to system software that enables the preparation and execution of programs Intro to performance issues in computer systems The history of computer development

Dr. ClincyLecture2 In understand the basic structure of computers, one must understand Computer Hardware Electronic circuits Displays Magnet and optical storage media Electromechanical equipment Communication facilities Computer Architecture Instruction set specifications Hardware used to implement the instructions Programming and Software components in a computer system

Dr. ClincyLecture3 In general, how a computer operates Computer accepts info in the form of programs and data via an input unit and stores the data in memory The information stored in memory is fetched, under program control, into an ALU, where it is processed The processed info leaves the computer via an output unit All activities inside the computer are directed by the control unit

Dr. ClincyLecture4 Basic Structure of Computers Coded info is stored in memory for later use Input unit accepts code info from human operators, electromechanical devices (ie keyboard), other computers via networks ALU uses the coded info to perform the desired operations The output unit sends the results back out externally Program is stored in memory and determines the processing steps All actions are coordinated by the control unit Collectively called the I/O unit Collectively called the processor

Dr. ClincyLecture5 Info handled by a computer Instructions or Machine Instructions Governs the transfer of info within a computer Governs the transfer of info between the computer and its I/O devices Specifies the arithmetic and logic operations to be performed List of instructions perform tasks that are called programs Programs stored in memory Computer controlled by the program except for external interrupts by an operator or I/O device Data Numbers and encoded characters used as operands by the instructions Typically means digital information If a program is to be processed by another program, it could be considered “data” (high-level language is data to a compiler that compiles to machine language) Each number, character or instruction is encoded as a string binary digits called bits Binary-coded Decimal (BCD) is an encoding scheme using only 4 bits – ASCII uses 7 bits – EBCDIC uses 8 bits

Dr. ClincyLecture6 Input Unit Coded information is accepted through input devices Examples –Keyboard – key corresponds to letter, key press translate letter to binary code – code either stored in memory or used by processor –Joysticks –Trackballs –Mouses –Microphone – captures audio via sampling and converted to codes (recall “pulse code modulation (PCM) in networking)

Dr. ClincyLecture7 Memory Unit Stores the programs and coded information Two classes of storage –Primary Storage Considered the “Fast memory” Program is stored in primary storage when being executed Memory organized by words containing bits versus individual cells - words that can be stored or retrieved in one operation Word lengths can range 16 to 64 bits Uses addresses to access the words Memory is structured in hierarchy (or levels) – small and fast memory tightly coupled with processor are caches – largest and slowest memory is called main memory –Secondary Storage Cheaper than primary memory Is used when large amounts of data and many programs have to be stored Catered for info accessed infrequently ie. magnetic disks and tapes and optical disks (CD-ROMs)

Dr. ClincyLecture8 Arithmetic and Logic Unit Executes most computer operations –For example Adding two numbers in memory – the numbers are brought into the “processor” and the actual addition is performed by the “ALU” – the sum may to stored in memory or retained in the processor –The operands are stored in high-speed storage elements called registers - each register can store one word of data –Access time to registers is faster than access time to cache –The ALU and control units are many time faster than other computer devices – therefore, a processor can control a number of external devices all at the same time

Dr. ClincyLecture9 Output Unit Sends processed results to the outside of the system –For example Printer Graphic displays

Dr. ClincyLecture10 Control Unit Coordinates the memory, ALU and I/O units in –processing info and –in performing input and output operations Sends control signals to the various units Senses the states of the various units The program instructions control the I/O transfers HOWEVER, the actual timing signals that governs the transfers are generated by the control unit Actually “control circuitry” is not a single unit but rather distributed throughout the computer

Dr. ClincyLecture11 Basic Operational Concepts Add LOCA, R0 Typical Instruction Adds the operand at memory location LOCA To the operand in a register R0 in the processor The sum is placed in a register R0 in the processor Operand at LOCA is preserved however, the operand in register R0 is overwritten ADD instruction combines a memory access operation with an ALU operation Load LOCA, R1 AddR1,R0 Transfer content from memory location LOCA into processor register R1 Adds the content of registers R1 and R0 and places the sum into R0

Dr. ClincyLecture12 Basic Operational Concepts The transfer between the memory and the processor starts by sending the address of the memory location to the memory unit and issuing appropriate control signals The processor also contains numerous registers used for different purposes The instruction register (IR) holds the instruction that is currently being executed – its output to the control unit so the CU can generate the timing signals involved in executing the instruction The program counter (PC) is a register that keeps track of the execution of a program – it contains the address of the next instruction to be fetch and executed General purpose registers The memory address register (MAR) and memory data register (MDR) facilitates communication with memory. The MAR holds the address of the location to be accessed The MDR contains the data to be written into or read out of the address location.

Dr. ClincyLecture13 Basic Operational Concepts 1.Program is loaded to memory via the input unit 2.Execution of the program starts when the program counter (PC) points to the first instruction 3.Contents of the PC is sent to the memory address register (MAR) and a read control signal is sent to memory 4.After memory access time finishes, the 1 st instruction is read out of memory and loaded into the memory data register (MDR) 5.Contents of the MDR are transferred to the instruction register (IR) 6.Now the instruction is ready to be decoded and executed 7.Provided the instruction requires an operation that warrants the ALU, the operand is fetch from memory by sending the operand’s address to the MAR and starting a Read cycle 8.Then operand is transferred from memory to the MDR 9.Then transferred from the MDR to the ALU 10.After all the operands are fetched – the ALU performs its operation 11.Result is stored in memory, then set to the MDR 12.The address of where the result will be stored in memory is sent to the MAR and a Write cycle is started 13.The PC is incremented to point to the next instruction NOTE: normal operations can be preempted by I/O interrupts In this case, the internal state of the PC, general registers and control info are stored in memory After the interrupt-service routine is completed, state of the processor is restored

Dr. ClincyLecture14 Bus Structures We haven’t discussed how these units are connected The units must organized and connected so that ALL units can handle one FULL WORD at a given time – when a WORD is transferred between units, the word is transferred in parallel Single bus does one transfer at a time – only 2 units can actively use the bus at a given time The group of lines, one bit per line, is called a BUS BUS carries data, addresses and control info Buffer registers are used to hold the info during transfers – once the info makes it to the buffer, the buss and process can be released

Dr. ClincyLecture15 Software System software is a collection of programs that are executed as needed to perform various functions such as: Receiving and interpreting user commands Entering and editing application programs Managing the storage and retrieval of files on secondary storage devices Running applications like word processors, spreadsheets and etc Controlling I/O units Translating programs to machine instructions Linking programs with library routines Application programs written in high-level language (Java, C++) High-level language independent of particular computer Compiler used to translate high-level language to machine language program

Dr. ClincyLecture16 Software – Operating System Operating System (OS) is a collection of routines used to control the sharing of and interaction among various computer units as they execute application programs Assign computer resources to individual application programs Assign memory and magnetic disk space to program Move data between memory and disk units Handle I/O operations OS loads application program from disk Waits for transfer to occur, then passes execution control to application program OS loads data file from disk Waits for transfer to occur, then passes execution control to application program Transfer data file from disk and prints the results

Dr. ClincyLecture17 Performance Performance is a measure of how fast a computer can execute a program Performance is affected by: –Design of the computer’s hardware –Machine language instruction set –Compiler The overall time for the program to execute is the “elapsed time” –The times with in the elapsed time the processor is active is called the “processor time” To increase “performance” is to minimized needed “processor time” Elapse time depends on all of the units – the processor time depends on the hardware involved in the execution of the machine instructions

Dr. ClincyLecture18 Performance As mentioned, the processor time depends on the hardware involved in the execution of the machine instructions –Processor –Memory –Bus connecting processor and memory In helping with performance, as instructions are fetched, a copy is placed in cache Later, if the same instruction or data item is needed, it is read directly from cache In helping with performance, the cache memory and processor can be fabricated on the same chip

Dr. ClincyLecture19 Processor Clock Processor circuits are controlled by a timing signal called a “clock” Clock defines the regular time intervals called “clock cycles” The various “steps” that make up an “instruction” can be completed in a clock cycle The length of one clock cycle is P, the clock rate is the inverse, R=1/P R=1/P is measured in cycles per second Modern Personal Computers have clock rates ranging from few million to over a billion cycles per second (or hertz) – recall data comm: –Mega hertz (MHz, million) –Giga hertz (GHz, billion) –Example: 1.25 GHz corresponds to a clock period of 1/1.25 = 0.8 nanoseconds The basic performance equation, T = (NxS)/R, is the program execution time –Where N = # instructions, S = avg # of steps per instruction, R = clock rate in cycles per second –To make program execution time, T, better Seek ways to reduce N and S Seek ways to increase R

Dr. ClincyLecture20 Pipelining and Superscalar Operation Can improve performance by overlapping the execution of successive instructions, using a technique called “pipelining” A higher degree of concurrency can be achieved if there were multiple pipelines implemented in the processor – called superscalar execution Clock Rate Can increase the clock rate –Improving the integrated circuit (IC) and making the circuits faster, thus reducing the time to complete a basic step –Reduce the amount of processing in a basic step

Dr. ClincyLecture21 Instruction Set: CISC and RISC Simple instructions have a small number of steps per instruction (small S) Complex instructions have a larger number of steps per instruction (larger S) Therefore, a processor using only simple instructions, could have –a large number of instructions, N, and a small # steps per instruction, S Therefore, a processor using only complex instructions, could have –a small number of instructions, N, and a large # steps per instruction, S It is NOT obvious which one is best Although complex instructions are less in number and therefore with pipelining, one can better achieve a lower S value Simple instructions achieve more efficient pipelining Processors that use simple instructions are called Reduced Instruction Set Computers (RISC) (pronounced “Risk”) Processors that use complex instructions are called Complex Instruction Set Computers (CISC) (pronounced “Sisk”)

Dr. ClincyLecture22 Performance Measurement It is very difficult to use execution time, T, as a measure of performance of a computer Benchmark programs are used to measure computer performance Organization called System Performance Evaluation Corp (SPEC) selects and publishes application programs for different application domains A reference computer is used The SPEC rating is (reference computer runtime)/(test computer runtime) If SPEC=50, means test computer is 50 times faster than reference computer Test is repeated for all programs in the test suite and an geometric average represents an overall SPEC rating

Dr. ClincyLecture23 History Read section 1.8 for more details 1 st Generation: John von Neumann, vacuum tube technology, magnetic memory and storage 2 nd Generation: AT&T Bell labs (1940s) developed the “Transistor” to replace the vacuum tube – compilers invented 3 rd Generation: fabrication of transistors on silicon chip – microprogramming, parallelism and pipelining – cache and virtual memory 4 th Generation: complete processors and large sections of main memory were all on a single chip – Very Large Scale Integration (VLSI) tens of thousands transistors on a chip