Starting Point: What You Already Know
- From Computer Organization and Assembly Language (COAL) you met:
- Registers (very small, very fast storage inside the CPU)
- Clock (a regular electric pulse that sets the speed of each step)
- Cache (small fast memory that keeps recently used data close to the CPU)
- Instructions such as ADD, LOAD, STORE and JUMP
- In this course we ask why computers are built this way and how to make them faster.
Quick self-check (no homework yet)
- 1. Name two registers you used in assembly.
- 2. If a clock runs at 2 GHz, how long is one clock cycle?
- 3. Why is reading from cache faster than reading from RAM?
Today's Plan (50 minutes)
0-3
Welcome and starting point what you already know
3-8
Course roadmap and assessment 5 units, 32 labs, 60 marks
8-18
Module 1: What is computer architecture? architecture vs organization vs hardware
18-28
Module 2: Classes of computers phones to data centers
28-33
Module 3: Kinds of parallelism the map of this course
33-41
Module 4: The task of a computer designer requirements, goals, trade-offs
41-50
Activity, recap quiz and homework classify real devices
Learning Outcomes (SLOs)
By the end of this lecture you will be able to:
SLO 1.1
Differentiate between computer architecture, organization and hardware using real examples.
→ CLO1 · C2 Understand
SLO 1.2
Classify computers into five classes and state the main design concern of each class.
→ CLO1 · C2 Understand
SLO 1.3
Identify the four ways hardware exploits parallelism and where each appears in this course.
→ CLO1 · C1 Remember
SLO 1.4
Explain the task of a computer designer: functional requirements, design goals and trade-offs.
→ CLO1 · C2 Understand
CLO1: Describe the principles of computer design, including technology, cost and dependability trends.
Course Roadmap: Five Units and 32 Labs
Quantitative Principles
Instruction Sets
Pipelining and ILP
- Unit 1 · L1-6
- Trends, cost, performance, benchmarks, Amdahl's law
- Unit 2 · L7-12
- ISA classes, addressing, encoding, compilers
- Unit 3 · L13-22
- Hazards, branch prediction, Tomasulo, speculation
Thread-Level Parallelism
Data-Level Parallelism
MIPS on MARS
- Unit 4 · L23-29
- Multicore, coherence, synchronization, consistency
- Unit 5 · L30-32
- Vectors, SIMD for multimedia, GPUs
- Labs · P1-32
- Assembly programs, hazards, branch and cache tools
Assessment and Course Rules
Mid-Term
Sessional
Final
30% · Week 9
10% · assignments, quizzes, labs
60% · whole course
- Total 60 marks (3 credit hours x 20). Mid-term covers Lectures 1-16 and Practicals 1-16.
- Bring a calculator to every class: this course has many numericals (number-based problems).
- Main book: Hennessy and Patterson, Computer Architecture: A Quantitative Approach (2012).
Module 1: What Is Computer Architecture?
Three levels of a design: architecture, organization and hardware
Three Levels of a Computer Design
Instruction Set Architecture
Organization (Microarchitecture)
Hardware
- What the programmer and compiler see: instructions, registers, data types, addressing modes, memory model.
- Example: x86-64, ARMv8, MIPS32, RISC-V.
- How the ISA is built: pipeline depth, cache sizes, number of cores, memory system.
- Example: two x86 chips with different pipelines and caches.
- The detailed logic design and chip technology: transistor size, clock rate, packaging (the chip's outer case).
- Example: same design made at 7 nm vs 5 nm.
Remember: Architecture today means all three levels, designed together to meet goals of performance, cost, energy and reliability.
Real-World Example: Driving Different Cars
Same ISA, different chips
- Intel Core i7 and AMD Ryzen 7 both run the same Windows programs: both use the x86-64 ISA.
- But their pipelines and caches differ (different organization), so speed and power differ.
Key word: Compatibility (old software still runs on new hardware) is why an ISA lives for decades.
Layers of Abstraction
Application WhatsApp, MS Word, a Python script
Software
Operating System and Compiler Windows, Android, gcc
Abstraction
Instruction Set Architecture the software/hardware contract
- (hiding lower-level details)
- Each layer only needs to know the layer just below it.
Organization (Microarchitecture) pipeline, caches, cores
Logic and Circuits gates, adders, flip-flops
Hardware
Devices (Transistors) billions of tiny switches
Module 2: Classes of Computers
Each class has different design concerns
Five Classes of Computers
Source: Hennessy and Patterson (2012), Figure 1.2. Throughput = work done per unit time. Energy proportionality = power used grows with the work done.
Real-World Examples Around Us
PMD
Desktop
Server
WSC
Embedded
- Infinix / Samsung phone
- battery life, quick response
- UAF lab PC, gaming laptop
- price-performance
- NADRA database, bank servers
- must always be up
- Google / Azure data centers
- electricity is a major cost
- Safe City camera, car ECU, microwave
- low cost, low power
Notice: The same idea (a processor) is tuned for different goals in each class.
Why Servers Care About Availability
99.9% available
99.99% available
99.999% available
8.76 hours
52.6 minutes
5.26 minutes
down per year
down per year
down per year
- Downtime per year = (1 - availability) x 8,760 hours
- 99.99%: 0.0001 x 8,760 = 0.876 h = 52.56 min
Availability (fraction of time a system works correctly). Each extra 'nine' needs more backup hardware, so it costs more.
Module 3: Kinds of Parallelism
Parallelism (doing many things at the same time) drives all modern design
Parallelism: The Map of This Course
Data-level parallelism
Many data items processed together (e.g., brighten every pixel of a photo).
Task-level parallelism
Many independent tasks run together (e.g., many users on a website).
Example: The UAF result website serving 5,000 students at once uses request-level parallelism.
Module 4: The Task of a Computer Designer
Requirements, goals and trade-offs
What Does a Computer Designer Do?
Requirements
Goals
Design
Measure
Trade-off
Which market? Which software must run?
Performance, energy, cost, availability targets
Choose ISA, organization and hardware
Benchmarks, simulation, cost model
Improve the common case; repeat
In one line: Maximize performance and energy efficiency while meeting limits on cost, power and availability.
Functional Requirements
Source: adapted from Hennessy and Patterson (2012), Figure 1.7. Object code = the machine-language file that the CPU runs directly.
Trade-offs: One Problem, Two Designs
Lesson: There is no single best computer, only the best computer for a given set of requirements.
Class Activity: Classify the Device
5 min · pairs
For each device: (a) name its class, (b) name its most important design concern. Work in pairs.
Safe City camera on a Lahore road
Google search data center
Your Android smartphone
UAF computer lab desktop
NADRA citizen database server
Engine control unit (ECU) in a Honda Civic
Common Mistakes
Wrong idea
Correct idea
✗ Architecture means only the instruction set.
✓ Today architecture covers ISA, organization and hardware, designed together.
✗ A faster clock always means a faster computer.
✓ Speed also depends on instructions per program and cycles per instruction (Lecture 4).
✗ Servers and phones need the same design.
✓ Each class has different critical concerns (energy vs availability).
✗ Same ISA means same performance.
✓ Core i7 and Ryzen share x86-64 but have different organizations, so speed differs.
Recap Quiz
Answer on paper in 3 minutes, then we check together.
Q1
The instruction set architecture is the part of a computer visible to the ________.
Q2
Why can Intel Core i7 and AMD Ryzen run the same Windows .exe file?
Q3
What is the most important design concern for a bank's server?
Q4
Pipelining is an example of which kind of parallelism?
Q5
How much downtime per year does 99.99% availability allow?
Homework and Next Lecture
- Read Hennessy and Patterson, Chapter 1, sections 1.1-1.3.
- Your devices: for your phone and your laptop, find the processor name, ISA (ARM or x86), cores and clock speed. State the class and its two main design concerns.
- Calculate the downtime per year for 99.95% availability.
- Install Java and the MARS simulator before Practical 1.
NEXT LECTURE
Lecture 2: Technology Trends and Computer Usage
Moore's law, the end of Dennard scaling (why clock speeds stopped rising), bandwidth vs latency, and power and energy in chips.