CS 101 – Sept. 25 Continue Chapter 5

Slides:



Advertisements
Similar presentations
Memory Address Decoding
Advertisements

The Central Processing Unit: What Goes on Inside the Computer.
Chapter 5 Computing Components. The (META) BIG IDEA Cool, idea but maybe too big DATA – Must be stored somewhere in a storage device PROCESSING – Data.
Computational Astrophysics: Methodology 1.Identify astrophysical problem 2.Write down corresponding equations 3.Identify numerical algorithm 4.Find a computer.
CSCE 212 Quiz 9 – 3/30/11 1.What is the clock cycle time based on for single-cycle and for pipelining? 2.What two actions can be done to resolve data hazards?
BA 471 Management Information Systems Hardware Basics.
Computer Hardware In this lecture, we will study:
1 CSE SUNY New Paltz Chapter Seven Exploiting Memory Hierarchy.
Computer Systems CS208. Major Components of a Computer System Processor (CPU) Runs program instructions Main Memory Storage for running programs and current.
 Prof. Dr. M. H. Assal Introduction to Computer AS 26/10/2014.
CPU Describe the purpose of the CPU
What’s on the Motherboard? The two main parts of the CPU are the control unit and the arithmetic logic unit. The control unit retrieves instructions from.
Chapter 3 – Computer Hardware Computer Components – Hardware (cont.) Lecture 3.
Basic Microcomputer Design. Inside the CPU Registers – storage locations Control Unit (CU) – coordinates the sequencing of steps involved in executing.
Computers Central Processor Unit. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.
3 1 3 C H A P T E R Hardware: Input, Processing, and Output Devices.
The Computer Systems By : Prabir Nandi Computer Instructor KV Lumding.
Computing hardware CPU.
CS 111 – Aug – 1.3 –Information arranged in memory –Types of memory –Disk properties Commitment for next day: –Read pp , In other.
CS 1308 Computer Literacy and the Internet Computer Systems Organization.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
What have mr aldred’s dirty clothes got to do with the cpu
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
Computer Architecture Lecture 3 Cache Memory. Characteristics Location Capacity Unit of transfer Access method Performance Physical type Physical characteristics.
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
+ CS 325: CS Hardware and Software Organization and Architecture Memory Organization.
Computer Organization 1 Instruction Fetch and Execute.
CS 1308 Computer Literacy and the Internet. Objectives In this chapter, you will learn about:  The components of a computer system  Putting all the.
Motherboard A motherboard allows all the parts of your computer to receive power and communicate with one another.
Computer Organization. The Five Hardware Units General purpose computers use the "Von Neumann" architecture Also referred to as "stored program" architecture.
CS 101 – Sept. 28 Main vs. secondary memory Examples of secondary storage –Disk (direct access) Various types Disk geometry –Flash memory (random access)
1 Chapter Seven CACHE MEMORY AND VIRTUAL MEMORY. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4.
HOW COMPUTERS WORK THE CPU & MEMORY. THE PARTS OF A COMPUTER.
1 Chapter Seven. 2 Users want large and fast memories! SRAM access times are ns at cost of $100 to $250 per Mbyte. DRAM access times are ns.
Memory The term memory is referred to computer’s main memory, or RAM (Random Access Memory). RAM is the location where data and programs are stored (temporarily),
1 Chapter Seven. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value.
Chapter 11 System Performance Enhancement. Basic Operation of a Computer l Program is loaded into memory l Instruction is fetched from memory l Operands.
24/06/20161 Hardware Processor components & ROM. 224/06/2016 Learning Objectives Describe the function and purpose of the control unit, memory unit and.
Introduction to Programming. Key terms  CPU  I/O Devices  Main memory  Secondary memory  Operating system  User interface  Application  GUI 
CACHE _View 9/30/ Memory Hierarchy To take advantage of locality principle, computer memory implemented as a memory hierarchy: multiple levels.
TYPES OF MEMORY.
Memory Miss Elliott.
Cache Memory and Performance
Performance of Single-cycle Design
Introduction to Computer Architecture
Hardware September 19, 2017.
Revision Name and Form.
Architecture Background
Basic Computer Organization
Primary Storage and Secondary Storage Devices Chapter 3
Introduction to Computers
Little work is accurate
Lesson Objectives Aims You should be able to:
CS2100 Computer Organisation
CSCI206 - Computer Organization & Programming
Introduction to Computer Architecture
Topics Introduction Hardware and Software How Computers Store Data
Direct Memory Access Disk and Network transfers: awkward timing:
Chapter 6 Memory System Design
Today’s agenda Hardware architecture and runtime system
Morgan Kaufmann Publishers Memory Hierarchy: Cache Basics
Components of a CPU AS Computing - F451.
Motherboard External Hard disk USB 1 DVD Drive RAM CPU (Main Memory)
2.C Memory GCSE Computing Langley Park School for Boys.
A Level Computer Science Topic 5: Computer Architecture and Assembly
CS 111 – Sept Beyond the CPU and memory
CS2100 Computer Organisation
Presentation transcript:

CS 101 – Sept. 25 Continue Chapter 5 Review of pipelined instruction execution Memory system Limited memory on chip Main memory (RAM) Secondary memory (e.g. disk)

How many cycles to execute 7 instructions? F D X 1 2 3 4 5 6 7 8 9 How many cycles to execute 7 instructions? Real answer is “too many”  This is as far as we got.

Cycle F D X 1 2 3 4 5 6 7 8 9 Better approach: Technique is called “Pipelining” On each cycle, try to do several jobs at once. Like an assembly line.

Pipelining the CPU CPU consists of parts: fetcher, decoder, executor, etc. Without pipelining, total cycles = (# inst) * (CPI) With pipelining, total cycles = ? (Hint: do first instruction; then handle the rest) # inst + # stages - 1

Example How many cycles are needed to execute 50 instructions, given that the CPU uses 4 stages? [Fetch, decode, execute, writeback] 4 cycles for the first instruction 1 cycle for each of the rest 4 + (50 – 1) = 53 cycles CPI = 53 cycles / 50 instructions = 1.06

Stalls What if instruction 2 needs more time? During cycle 5, instruction 3 has to wait. Cycle F D X W 1 2 3 4 5 6

Cycle F D X W 1 2 3 4 5 6 7 8 9 10

Deli pipeline! Five stages in deli to make sandwich: Place order Get right bread and slice Put meat on bread Add condiments Cashier and pickup. What are some possible stalls?

Summary Time = total cycles / clock rate Is the machine pipelined? If no, cycles = (# instructions) * (CPI) If yes, cycles = # stages + # inst – 1 + stalls Simultaneous stalls With pipelining, CPI is almost 1. Can we do better than this?

Memory system After the CPU, next most important feature CPU contains registers – only enough for immediate calculations Main memory – running programs Secondary memory – long-term storage “open” vs. “save”

Main memory Runs on electricity: “volatile” but fast Principle of random access Examples: RAM (vast majority of main memory is here) Cache (small version of RAM, much faster) BIOS (“Basic I/O System”)

Secondary memory Non-electric, “non-volatile” technologies Magnetic Optical How to find information? It may be: Random access (e.g. flash memory; stick) Direct access (disk) Sequential access (tape)

Example comparison Type Size Access time Cost per MB CPU regs 256 bytes 1 ns Forget it. Cache 16 KB 2 ns $ 20 RAM 128 MB 20 ns $ 1 disk 100 GB 100,000 ns $ .001