CIS 451 Week 1
Computer Organization vs. Computer Architecture
- What is the difference between Computer Organization and Computer Architecture?
- Computer Organization: How the computer works (i.e., how we build a physical device that computes).
- Logic gates
- Basic circuits (adders, registers, muxes)
- Datapath (fetch/execute cycle)
- Assembly language
- Computer Architecture: How to design a CPU
- Instruction set (ISA) design
- What are the CPU’s fundamental operations? (And why different CPUs have different operations)
- Addressing modes
- RISC vs. CISC
- Fixed vs. variable width
- etc.
- How to get more transistors doing useful work at once (i.e., how we utilize the transistors better)
- Consider that in the CIS 351 single-cycle CPU, most transistors sat idle most of the time.
- It’s like never using your washer and drier at the same time
- Pipelining
- Cache memory (reduce time transistors spend waiting for memory)
- Instruction level parallelism
- (Yes, we covered piplelining and cache memory in CIS 351)
- Consider that in the CIS 351 single-cycle CPU, most transistors sat idle most of the time.
- We will also touch on power / energy issues.
- Instruction set (ISA) design
Main benefits of taking CIS 451
- Knowledge of current hardware trends
* What has influenced CPU design over the years? (Why are today’s CPUs designed the way they are?)
* What improvements / changes are on the horizon?
* What needs and challenges are driving those (and future) changes?
* A (good) Computer Science program doesn’t focus solely on teaching you to be productive today, but rather on
preparing you to teach yourself what you need to know.
- The field changes too rapidly for a focus on current skills to be sufficient.
- Learning about hardware trends provides context that will help you keep up with changing software trends. (e.g., what is motivating current programming languages and web frameworks trends? Why is cloud computing so big?)
- It may even allow you to anticipate new trends. (This is where many million-dollar ideas come from: Spotting a trend early enough to profit from being first.)
- Practice examining performance and tradeoffs
- On average, 0 GVSU CIS students every year to into the field of hardware design.
- But, almost everybody will have to deal with choosing technology (hardware, language, framework, etc.): You will be faced with something new and have to decide whether / how to use it.
- KEY IDEA: Write this down and look back on it when you decide you are sick of CIS 451 It’s the PROCESS of evaluation that will be helpful, not the specific conclusions you draw in this course.
- What will set you apart from your peers – think “raise” – is not the details you learn in this class; but, your ability to apply the general lessons to new technology that hasn’t even been imagined yet.
Administrative Details
- I am usually on campus from 9 to 3:30 MWF (and most Tuesdays).
- My office hours are when I make a point of being in my office; but, you are welcome to come any time the door is open.
- Piazza: Best way to get responses quickly.
- Course web page (assignments) vs. Piazza (questions) vs. Blackboard (grades only)
- I don’t grade projects until they are working. The most important learning comes from fixing the last few bugs.
- Please do homework in pairs
- Homework tends to be challenging (in that you need to apply ideas to new situations). It is much less frustrating when you can talk it through with someone
- logistically helps me. (Happy grader ==> More points for you)
- Do Not submit two separate nearly identical assignments
How Transistors Work
- The limits/properties of transistors have played a large role in some recent changes
- What is the difference between current and voltage?
- How current flows
- electrons move freely between atoms in a metal
- An electron “pump” at one end adds electrons
- An electron “sink” at the other end accepts electrons
- The electrons “wiggle” freely around. Over time, there is a net flow of charge from source to sink.
- The flow past a given point in current.
- Measured in amps ( electrons per second)
- The strength of the pump is voltage
- How current doesn’t flow
- Consider a carbon crystal (diamond)
- 6 total electrons (2 inner four outer)
- Outer shell filled using covalent bond
- No incentive to move
- Requires a massive “pump” to dislodge them.
- Silicon has a similar chemical structure (14 electrons)
- Consider a carbon crystal (diamond)
- Semiconductor
- Doping: Add some Boron or Phosphorous
- Enough “uncomfortable” electrons to promote flow of current
- PN Junction: Put them next to each other and current will flow in one direction only.
- Transistor (PNP)
- Takes time and energy for holes to move to switch on/off
- Smaller transistors can (theoretically) go faster.
- Limit to how small transistors can get.
- Once the get down to a few atoms wide, electrons can simply “jump” across the depletion region.
- Veritasium videos https://www.youtube.com/playlist?list=PLkahZjV5wKe_dajngssVLffaCh2gbq55_
Brief History of Computer Performance
- Figure 1.1 from Textbook
- Before 1986 Performance primarily driven by shrinking transistors.
- Smaller transistors could switch faster
- Secondary effect: Additional, more complex instructions (CISC)
- Each instruction has some overhead (fetch, decode)
- Fewer instructions could lead to less overall work.
- (At least that was the theory)
- Consider full Intel instruction set
- Starting around 1986, pipelining became more popular.
- Wash and dry at the same time.
- Transistor shrinkage continues to help performance
- Increasing parallelism also contributes.
- RISC philosophy introduced
- More faster instructions more effective than fewer slower instructions
- Allows for simpler hardware => faster clock speed
- Plays nice with pipelining
- MIPS and ARM are both RISC.
- This is first example of how ISA (types of instructions) influence computer design and performance
- In the 1980s there was a “competition” between RISC and CISC.
- Who Won?
- In the 1980s there was a “competition” between RISC and CISC.
- 2004: End of “Denard Scaling”
- Transistors stopped getting smaller and faster as quickly.
- Forced the switch to multicore computers
- 2010: More’s law ends.
- What is Moore’s law
- Why did it end?
- There is only so much parallelism in a given process.
- Diminishing returns
- Not a large benefit from going above 4 to 8 cores.
- What was the other major change in the past 15 years that has driven approaches to hardware?
- Mobile
- How has mobile pushed changes?
- Battery life.
- So, what do we do now?
- Specialization: Fastest and/or most efficient processor for a given task.
- Ability to shut off power to unneeded components.
- New technology / approaches (e.g., Quantum computing.)
Key effects of increased computer performance
- Most are obvious
- Changes to the way we approach software design
- Emphasizing ease of software development over performance (in other words “performance for productivity”)
- virtual functions, heavy reference use
- garbage collection
- closures and other functional programming techniques
- c/c++ => Java => Javascript / Ruby / Python
Power / Energy
- Three main power-related concerns:
- Maximum power (can the power supply deliver energy fast enough)
- Sustained power consumption
- Thermal Design Power (TDP)
- How much cooling is needed
- This is typically more challenging than meeting max power
- Energy and energy efficiency
- Typically energy is more relevant than power.
- Power is often “just” a constraint
- Energy affects the cost of operation (electric bill) and battery life
- Two types of power: Static and Dynamic
- Static energy or “leakage” comes from imperfect transistors (current “leaking” across the gate)
- Dynamic energy is used to switch transistors
- Dynamic Energy per transistor =
capacitive load * Voltage^2
- Dynamic Power per transistor =
capacitive load * Voltage^2 * frequency
- Reducing frequency alone does not save energy!
- You just expend the same amount of energy over a longer period of time.
- Thus, doesn’t help battery life
- To save energy, you must reduce voltage
- But, voltage limits how fast the frequency can be.
- (If there aren’t enough volts, the transistors don’t switch fast enough)
- Key observation: Reducing frequency does not directly save energy. It indirectly saves energy because you can often reduce voltage.
- DVFS: Dynamic Voltage and Frequency scaling
- Keep frequency / voltage low unless higer performance needed
- Desktop: Keep “comfortable” level except for occasional “bursts” of speed.
- Mobile: Keep acceptable performance level until battery gets low, then reduce performance to keep device available longer.
- “human-scale” interactions need only be fast enough not to feel laggy.
- “low power” modes trade performance for extending battery life.
- Keep frequency / voltage low unless higer performance needed
- P-States
- https://en.wikichip.org/wiki/intel/frequency_behavior
- How much energy is saved going from the highest voltage to the lowest?
- (
1 - (0.8^2)/ (1.21^2) = .56
)
- (
- How much is power reduced?
- (
1 - (0.8^2*.6)/(1.21^2*2.8) = .91
)
- (
- By how much does the time increase?
- (
4.6x
as long)
- (
- Is this a good tradeoff?
- (See slide for other tradeoffs)
- Remember, this example is simply for scaling a given CPU to a lower frequency/voltage. When designing a lower-power/energy system, you would probably modify the chip itself (perhaps transistors with a lower capacitive load, or a chip with fewer transistors that requires more cycles).
- Static energy limits how low voltage/frequency can go.
- Static energy is constant (doesn’t depend on voltage/frequency)
- At some point, the static energy dominates the dynamic energy.
- “race to halt”: May occasionally be optimal to finish as quickly as possible then turn off to save static energy.
On a different note:
- Yield is a trade secret; but, believed to be in the 60% to 70% range for new technologies.