Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Architecture CS 110 Fall 2005. Review Humans devise algorithms to solve problems Humans devise algorithms to solve problems Humans implement.

Similar presentations


Presentation on theme: "Computer Architecture CS 110 Fall 2005. Review Humans devise algorithms to solve problems Humans devise algorithms to solve problems Humans implement."— Presentation transcript:

1 Computer Architecture CS 110 Fall 2005

2 Review Humans devise algorithms to solve problems Humans devise algorithms to solve problems Humans implement an algorithm in a high-level programming language Humans implement an algorithm in a high-level programming language ProgramProgram SoftwareSoftware Compiler translates program into machine code Compiler translates program into machine code Machine executes the machine code (version of the algorithm) Machine executes the machine code (version of the algorithm)

3 Review Recall the “Deal a Hand of Poker” algorithm Recall the “Deal a Hand of Poker” algorithm For each of five cardsFor each of five cards For each person sitting at the table For each person sitting at the table Hand that person a card face downHand that person a card face down There’s memory involved There’s memory involved How many cards have I handed out?How many cards have I handed out? Which person gets the next card?Which person gets the next card? What card is next on the deck?What card is next on the deck?

4 Algorithms and Memory Computers are simple machines (conceptually) Computers are simple machines (conceptually) Algorithms (steps of actions)Algorithms (steps of actions) Memory (the subjects and objects of the actions)Memory (the subjects and objects of the actions) Conveniently, algorithms are stored in memory (as programs) Conveniently, algorithms are stored in memory (as programs) Von Neumann architectureVon Neumann architecture

5 Algorithms and Memory Your web browser is algorithm and memory Your web browser is algorithm and memory Accepts input from you (URLs)Accepts input from you (URLs) Stores in memory Stores in memory Sends requests for html on InternetSends requests for html on Internet Uses memory to remember that request is pending Uses memory to remember that request is pending Receives html from web serversReceives html from web servers Collects packets, reorganizes them, and stores whole Collects packets, reorganizes them, and stores whole Reads the html to identify text, pictures, formatting instructionsReads the html to identify text, pictures, formatting instructions Access memory Access memory Displays the desired information on the screenDisplays the desired information on the screen Stores formatted web page for display Stores formatted web page for display

6 Computer Architecture Computer (the physical device) emphasizes two elements Computer (the physical device) emphasizes two elements CPUCPU for running algorithms for running algorithms RAM, disk, flash drives, CDsRAM, disk, flash drives, CDs for storing memory for storing memory BusBus A means of moving data from memory to CPU A means of moving data from memory to CPU

7 Computer Architecture CPU Memory Bus

8 Computer Architecture CPU Memory Bus Instructions: Read memory Write memory

9 Computer Architecture CPU Memory Bus Example: Read (104)

10 Computer Architecture CPU Memory Bus Example: Read (104) “a” 100 104 108 112 116

11 Computer Architecture CPU Memory Bus Example: “a” 100 104 108 112 116

12 Memory Conceptually Conceptually Data that is stored as “words” and organized with numerical “addresses”Data that is stored as “words” and organized with numerical “addresses” Physically Physically Data is stored on disks, chips, CDs, etc.Data is stored on disks, chips, CDs, etc. Abstraction Abstraction The physical location of the memory is irrelevant to the CPUThe physical location of the memory is irrelevant to the CPU

13 Combining CPU / Memory Fetch / Execute cycle Fetch / Execute cycle Basic repetitive process going on inside computer for all tasksBasic repetitive process going on inside computer for all tasks CPU “fetches” next step (instruction) of algorithm CPU “fetches” next step (instruction) of algorithm CPU executes next step of algorithm CPU executes next step of algorithm A legal step is to do nothingA legal step is to do nothing

14 Combining CPU / Memory Three basic “steps” of each fetch/execute cycle Three basic “steps” of each fetch/execute cycle Arithmetic or logicalArithmetic or logical Add, Multiply, NOT Add, Multiply, NOT Memory operationsMemory operations Load, store Load, store Control flowControl flow If a, then b If a, then b

15 Fetch / Execute Fetch / Execute cycle serves to synchronize all computer tasks Fetch / Execute cycle serves to synchronize all computer tasks Reading and writing to memoryReading and writing to memory Displaying to screenDisplaying to screen Acquiring user input from keyboardAcquiring user input from keyboard Sending music to speakersSending music to speakers A 1 hertz (Hz) CPU executes 1 fetch/execute cycle per second A 1 gigahertz (GHz) CPU executes 1 Billion fetch/execute cycles per second

16 Architecture


Download ppt "Computer Architecture CS 110 Fall 2005. Review Humans devise algorithms to solve problems Humans devise algorithms to solve problems Humans implement."

Similar presentations


Ads by Google