CS 208 s21 — Victory Lap

1 Coursework Beyond 208

  • CS 251 Programming Langauges
  • CS 231 Computer Security
  • CS 257 Software Design
  • CS 331 Computer Networks
  • CS 332 Operating Systems
  • CS 334 Database Systems
  • CS 348 Parallel and Distributed Computing

2 Skills to Carry Forward

  • Few of you will build new HW, OS, compiler, but…
    1. Effective programmers and computer scientists understand their tools and systems.
    2. The skills and ideas you learn here apply everywhere.
  • Reason about computational models, translation.
  • Debug for correctness and performance (with tools to help).
  • Assess costs and limits of representations.
  • "Figure it out" via documentation, experiments, critical thinking.
  • Remember low-level implications of high-level choices.

3 Big Ideas

big-ideas.png

3.1 Abstractions and Interfaces

  • Computing is about abstractions
  • What are the abstractions that we use?
  • What do you need to know about them?
    • When do they break down and you have to peek under the hood?
    • What bugs can they cause and how do you find them?
  • How does the hardware relate to the software?
    • Become a better programmer and begin to understand the important concepts that have evolved in building ever more complex computer systems

3.2 Representation

  • All digital systems represent everything as 0s and 1
  • "Everything" includes:
    • Numbers — integers and floating point
    • Characters — the building blocks of strings
    • Instructions — the directives to the CPU that make up a program
    • Pointers — addresses of data objects stored away in memory
  • Encodings are stored throughout a computer system
    • In registers, caches, memories, disks, etc.
  • They all need addresses (a way to locate)
    • Find a new place to put a new item
    • Reclaim the place in memory when data no longer needed

3.3 Translation

  • There is a big gap between how we think about programs and data and the 0s and 1s of computers
    • Need languages to describe what we mean
    • These languages need to be translated one level at a time
  • We know Java and/or Python as a programming language
    • Have to work our way down to the 0s and 1s of computers
    • Try not to lose anything in translation!
    • We encountered C language, assembly language, and machine code (for the x86 family of CPU architectures)

3.4 Control Flow

  • How do computers orchestrate everything they are doing?
  • Within one program:
    • How do we implement if/else, loops, switches?
    • What do we have to keep track of when we call a procedure, and then another, and then another, and so on?
    • How do we know what to do upon “return”?
  • Across programs and operating systems:
    • Multiple user programs
    • Operating system has to orchestrate them all
      • Each gets a share of computing cycles
      • They may need to share system resources (memory, I/O, disks)
    • Yielding and taking control of the processor
      • Voluntary or “by force”?

4 C Programming

  • a hands-off language that "exposes" more of hardware (especially memory)
  • weakly-typed language that stresses data as bits
    • anything can be represented with a number!
  • Unconstrained pointers can hold address of anything
    • no bounds checking!

5 In Context

rockets.png

boeing.png

toyota.png

6 How Do We Improve Computer Systems?