Monday, September 8, 2008

Lecture 2

Lecture 2


 

  • Calculator example
    • Hardware
      • Was the calculator
    • Software
      • The user
  • Virtual machine
    • Virtual concept came to being in the 60's when machines started to get more complex
  • Translator
    • Is written in L1
      • The lower level language
    • And translates L2 into L1 so that it is understandable by the machine
    • The difference between L2 and L1 should not be that big
    • L2 should be easier for the users to write in
    • L1 is typically called 'machine language'
  • Layers
    • Packages ( level 6 ) -> problem oriented languages -> assembly language -> OS -> conventional machine -> micro programming -> digital logic (level 0)
  • Levels of representation
    • High level language
      • C programming language
    • Assembly language
      • MIPS
    • Machine Language
      • MIPS
      • 0's and 1's
    • Machine interpretation
      • Hardware architecture description
    • Architecture implementation
      • Logic circuit description

Layered Computer Design


 

  • Series of layers built on the predecessor
    • Allows
      • Independence of design
        • Reduced complexity
        • Easier to understand
        • Easier to design and analyze
    • Hierarchical nature of computer system
    • Essential to design and description
    • Only need to deal with one level at a time
    • Each level has structure and function

Understanding architecture and organization

  • Architecture
    • Set of
      • Data types
      • Operations
      • Features at each level
    • What is visible to the user
      • As memory available
      • We don't care about how the memory is constructed
        • What we care about is that it's available
    • Implementation aspects
      • Such as what kind of chip technology are not part of the architecture
  • Computer architecture
    • The study of how to design parts of a computer that are visible to the programmers
  • Definition for Tanenbaum
    • Computer architecture IS computer organization
  • Definition for Stalling
    • Computer architecture
      • Attributes of a system visible to the programmer
        • Instruction set
        • Data types
        • I/O mechanisms
        • Memory addressing techniques
    • Computer organization
      • Operational units and interconnections that realize that architecture
      • Transparent to the user
        • Control signals
        • Interfaces
        • Memory technology
    • Families of computers
      • Architecture remains the same organization differs

Instruction Set Architecture


 

  • A very important abstraction
    • Interface between hardware and low-level software
    • ISA
      • Acronym: Instruction set architecture
    • Standardizes instructions, machine language bit patterns, etc.
    • Advantage: different implementations of the same architecture
    • Disadvantage: sometimes prevents using new innovations


     

  • Microsoft will do anything to get features and go around structural issues that might prevent new innovation. However there is a price to be paid: it prevents using new innovations and software breaks down regularly
  • The Instruction Set
    • Attributes of a computing system as seen by the programmer, the conceptual structure and functional behaviour, as distinct from the organization of the data flows and controls the logic design and the physical implementation
  • Computer Function
    • Data processing
      • Something that actually changes and transforms the data
    • Data storage
      • Places to store before after and during the data processing
    • Data movement
      • The movement of the data
    • Control
      • Control mechanism found in the center of all these functions
  • Functioning at the lowest level virtual machine
    • No compiling
    • Like interpreter
    • Sequential
  • Main memory
    • Works as a loop    
      • Loop
        • Fetch instruction
        • Execute instruction
      • End loop
  • Datapath
    • Are cyclic
    • Fetch
      • From main memory
      • Through the `datapath`
      • From a set of instructions
    • Sends to registers
      • Which goes to the register memory
      • And is passed off the ALU
        • ALU –acronym: arithmetic logic unit

MIPS language


 

  • Assembly language
    • Higher level than machine language
    • (one step higher than machine language)
  • RISC
    • Acronym: reduced instruction set computer
    • A minimum set of machine or assembly language instruction
    • Minimum set of isa instructions
    • Make each run very fast
    • Concentrate effort
  • Instruction representation
    • Add 4 variables
    • Solution
      • Add a,b,c
        • # a ßb+c
      • Add a,a,d
        • #aßa+d
      • Add a,a,e
        • #aßa+e

s

Wednesday, September 3, 2008

Lecture 1

    • Email protocol
      • From your York computer science student account
      • Subject line cs2021A......
      • Identify yourself in the email by name and student number
    • Office hours
      • CSE3012
        • Monday and Wednesday 1-2pm
    • Phone
      • 416 736 2100
    • Course webpage
    • Grade Weighting
      • 24% - LABS
      • 26% - MIDTERM
      • 50% - FINAL EXAM


 


 

Lecture 1

  • What is a computer?
    • Components
      • Input (mouse, keyboard)
      • Output (display, printer)
      • Memory (disc drives, DRAM, SRAM, CD)
      • Processor
      • Network
  • Technology
    • Processor
      • Logic capacity
        • About 30% per year
      • Clock rate
        • About 20% per year
    • Memory
      • DRAM capacity
        • About 60% per year
      • Memory speed
        • About 10% per year
      • Cost per bit
        • Decreases about 25% per year
    • Disk
      • Capacity
        • ~60% per year
  • Rapidly changing field
    • In order
      • Vacuum tube
      • Transistor
      • IC
      • VLSI
    • Doubling every 1.5 years
      • Memory capacity
        • Ram has grown by 100,000x in 44 years
        • Memory capacity has grown exponentially as a trend
        • Random note: 1GB = 1,073,741,824 bytes
      • Processor speed
        • This is due to advances in technology and organization
        • Processor performance has grown exponentially as a trend
        • Moore's law
          • 2x transistors/chip every 1.5 years
  • Machine language
    • Electronic circuits recognize and execute
      • A limited set of instructions
      • Keep limited and simple to reduce cost and complexity
      • Hard for humans to understand
      • Is in raw digital form
        • Binary digits (0 , 1)
    • Book of instructions
      • 001100 – Store
      • 001110 – Add
      • 111000 – Subtract
      • 101000 - Load
      • This is just an example for a theoretical machine
  • Design Forms
    • Build what we can
      • Implies language
      • Therefore: Machine implies Language


         

    • Decide what we want to do by what we build
      • Implies Machine
      • Therefore: Language implies Machine
      • All programs translate into this set first
      • Designers must decide on the instruction set
    • Translation comes in two forms:
      • Compilation
        • Replace each statement in L2 (L2 is the language built on top of L1 to make it more understandable by humans)
        • At end have program in L1
        • Execute this level L1 set of statements
        • Program in L2 -> compiler -> program in L1
      • Interpretation
        • write program in L1 language that will take as input a program in L2
        • each statement in L2 is translated to L1 statements and executed immediately

Program in L2 -> statement in L2 -> interpreter -> statement in L1 -> go to next statement in L2