Computer Architecture - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Computer Architecture

Description:

Drive performance also influenced by speed of interface (IDE, SCSI, Firewire, etc. ... What happens if the third drive fails? ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 22
Provided by: paulre
Category:

less

Transcript and Presenter's Notes

Title: Computer Architecture


1
Computer Architecture
2
Review
  • Representation and interpretation are inverse
    operations
  • How do you represent in binary
  • Letters?
  • Images?
  • Sounds?
  • Smells?
  • Is there ever a time you wouldnt want to use
    compression?

3
Learning Objectives
  • Understand and explain basic computer
    architecture
  • CPU
  • Memory
  • I/O
  • Demystify computer hardware
  • Opening up the black box (literally in section)

4
Real Computers
  • Like the LMC
  • Processor
  • Memory
  • Stores instructions and data
  • Depending on IC, may be treated as instruction
  • Input/Output
  • But different
  • Processor (CPU) can understand a few more
    instructions
  • Instruction execution is automatic no little
    man
  • Memory and processor are binary, not decimal
  • Memory is bigger
  • Can have several input/output devices
  • All components are a lot faster!

5
Subsystem 1The CPU
  • CPU Central Processing Unit
  • Internal clock ticks very fast (e.g., 2Ghz 2
    billion ticks per second)
  • activities are synchronized to start on a clock
    tick
  • some activities take more than one clock tick
  • Instruction execution is automatic
  • (tick) find memory address of next instruction
  • (tick) retrieve instruction from memory
  • (tick) decode the instruction
  • (tick) fetch argument from memory if necessary
  • (tick) execute instruction
  • (tick) store result in memory if necessary

6
Instruction Set
  • The instructions that a CPU can execute
  • LMC add, store, get, etc.
  • Real CPUs a few more, more complicated
  • E.g., add and store result in memory location
  • RISC vs. CISC
  • RISC has fewer, simpler instructions
  • Simpler to implement in hardware
  • Faster execution
  • More instructions to accomplish same program
  • Each CPU has own instruction set
  • Sometimes deliberately compatible
  • Pentium can execute all 486 instructions, plus
    some
  • Pentium IV, AMD Athlon execute Intel Pentium
    instructions, plus some more
  • Thus, Pentium IV and Athlon are both
    backwards-compatible with 486

7
Subsystem 2Memory
  • Like the LMC, the CPU cant remember anything
    that isnt stored in memory.
  • Several types of memory/storage, which differ in
    terms of
  • Performance
  • Cost
  • Most systems include a mix of memory types
  • Cache, RAM, hard drive, removable media, etc.

8
Addressing and Memory Capacity
  • Contents of memory look like this
  • But its easier to think of it as a series of
    fixed bit-length locations, each having a unique
    identifier
  • In LMC, specify a two-digit decimal address
  • How many possible locations?
  • In binary computer, you might have 16-bit, 24-bit
    or 32-bit address
  • How many possible locations in each of these
    systems?

01010000100000100101001100000000100101001100000000
0110010101001110
Remember that 210 is about a thousand, and that
216 26 x 210 64 x thousand
9
Semiconductor Memory
  • Volatile RAM (Random Access Memory)
  • Can access any location equally fast
  • Name is a bit misleading, since ROM works this
    way, too
  • Static (SRAM) vs. Dynamic (DRAM) affects power
    consumption, speed
  • SRAM typically used for cache lower power,
    faster
  • DRAM typically used as main system memory
  • Many types of DRAM in use today, e.g., SDRAM, DDR
    SDRAM, RDRAM, etc.
  • Non-volatile ROM (Read Only Memory)
  • Can access any location equally fast
  • Retains memory even without power
  • What kinds of information might a system designer
    want to store in ROM?

10
Other Types of StorageHard Disks and Floppies
  • Slower than main memory
  • Bits stored as magnetic field of different
    polarity
  • Magnetized surface of disk rotates under a
    magnetized head (read/write mechanism)

Sector
  • Disk divided into tracks, at different radius
    from the center
  • Seek time is how long it takes to move the head
    to a track
  • Tracks are divided into sectors
  • Latency is how long it takes for the desired
    sector to rotate under the disk
  • Drive performance also influenced by speed of
    interface (IDE, SCSI, Firewire, etc.)

Track
11
Disk Arrays (RAID)
  • RAID Redundant Array of Independent (or
    Inexpensive) Disks
  • Instead of better (faster, more reliable) disks,
    use more disks
  • Several levels of RAID
  • Level 0 offers improved performance
  • Level 5 offers big performance improvement and
    good fault tolerance
  • How does RAID do this?

12
Disk Arrays (RAID)
  • Redundancy
  • Store data on more than one disk
  • If one disk fails, can still access all data
  • Example disk mirroring
  • Data Striping
  • Spread data across several disks
  • Can access all disks in parallel
  • Increases throughput (data transfer rate)
  • Decreases reliability, unless

13
Parity Bit Redundancy Through Striping
  • Consider storing the bit string 01110
  • Suppose each bit stored on different disk
  • Define parity(bit-string) as equal to
  • 1 if odd number of ones in the bit-string,
  • else 0
  • Store parity(01110) on a sixth disk
  • What is parity (01110)?
  • If any one disk fails, can recover the string

14
Parity Bit Exercise
01110
  • What should the parity bit be?
  • What happens if the third drive fails?
  • What happens if the fifth drive fails (instead of
    the third)?
  • What if 3 and 5 fail?
  • Work on your own, then discuss.

15
The Memory Hierarchy
  • Want to achieve balance between price and
    performance
  • Small quantity of fast, expensive, temporary
    (dependent on power) semiconductor-based memory
    (e.g., cache, RAM)
  • Larger quantity of slower, less expensive storage
  • Doesnt require power to preserve data
  • Sometimes permanent (e.g., ROM), sometimes
    alterable (e.g., hard drive, CDR, etc.)
  • May be removable (e.g., floppy disks)
  • The memory hierarchy
  • Registers and Cache
  • Main Memory
  • Magnetic disks
  • Tapes, CD-ROMs, etc

16
Caching
  • Caching means storing a copy of a subset of the
    slower memory in the small, fast memory
  • e.g., copying data from main memory to CPU cache.
  • Why do this?
  • If you want to add something to the cache but
    its full, what do you get rid of?

17
Other Caches
  • Principle applies whenever there is small, fast
    access memory and large, slow memory
  • Main memory cache of hard disk
  • Hard disk cache of CD-ROM
  • Proxy server cache of web sites
  • Non-computer examples?

18
Subsystem 3I/O Devices
  • Input
  • Keyboard
  • Mouse
  • Hard Disk
  • Floppy Disk
  • What else?
  • Output
  • Printer
  • Screen
  • Speakers
  • What else?

19
I/O Bus
  • One set of wires connect all devices and CPU
  • One device at a time transmits
  • Transport of information is shared (public)
  • Hence called a bus (public transportation for
    bits)
  • Bus characteristics
  • Clock speed
  • of bits (width)
  • (Form factor)

20
I/O Interrupts
  • Certain events cause interrupt signals
  • E.g., keypress
  • CPU stops what it is doing
  • CPU starts executing a program to handle the
    interrupt
  • E.g., passes keypress to an application, which
    displays character on screen
  • CPU goes back to what it was doing before

21
Conclusion
  • Real computers consist of three interacting
    subsystems.
  • CPU
  • Memory
  • I/O
  • The performance and capabilities of a computer
    are dictated by the interaction of these
    resources.
  • Next time Operating Systems
Write a Comment
User Comments (0)
About PowerShow.com