Lectures for 2nd Edition - Winona State University

Download Report

Transcript Lectures for 2nd Edition - Winona State University

Computer Systems
1
Introduction – What is a Computer?
•
This course is all about how computers work
•
What do computer and computer system mean to you?
•
But what do we mean by a computer?
– Different types: desktop, servers, embedded devices
– Different uses: automobiles, graphics, finance, genomics…
– Different manufacturers: Intel, Apple, IBM, Microsoft, Sun…
– Different underlying technologies and different costs!
2
What is a Computer System?
•
Hardware + Software
•
Hardware
– Physical components making up the computer system
– Things making noises when you drop a computer
•
Software
– Programs controlling the operations of computer
3
What is a Computer System?
•
Hardware Components:
– input (mouse, keyboard, disk drives, network)
– output (display, printer, disk drives, network)
– memory (disk drives, DRAM, SRAM, CD)
– processor (datapath and control)
4
Hardware Components
•
Hardware components diagram
– Interconnected by bus
CPU
Memory
Bus
I/O
Controller
I/O
Controller
5
Software Components
From High-Level Language to
Machine Language
Applications
High Level Languages
Assembly Languages
Hardware
HLL
 Complier
Assembly Language
 Assembler
Machine Language
68000, Intel x86, MIPS
C, JAVA
Web Browsers, Games, Word, Excel
6
Why learn this stuff?
•
You want to call yourself a “computer scientist”
– Computer science is not just about software development
•
Improve software performance
– Understand what’s under the hood helps in many ways
•
Both Hardware and Software affect performance:
– Algorithm determines number of source-level statements
– Language/Compiler/Architecture determine machine instructions
– Processor/Memory determine how fast instructions are executed
•
You need to make a purchasing decision or offer “expert” advice
7
Why learn this stuff?
•
Assess and Understand Performance
•
Understand how software features are supported by hardware
•
Lay the foundation for studying other important subjects in Computer
Science, such as programming languages, complier, operating
system, & computer architecture
8
How do we learn this stuff?
•
As seen earlier:
– Different types, uses, manufacturers, underlying technologies,
and costs!
•
Analogy: Consider a course on “automotive vehicles”
– Many similarities from vehicle to vehicle (e.g., wheels)
– Huge differences from vehicle to vehicle (e.g., gas vs. electric)
•
Best way to learn:
– Focus on a specific instance and learn how it works
– While learning general principles and historical perspectives
9
How do we learn this stuff? Abstraction
•
The computer system and its components are complicated! E.g.,
– The processor is implemented using millions of transistors
– It is impossible to understand by looking at each transistor
– We need ...
•
Abstraction
– A model that renders lower-level details of computer systems
temporarily invisible in order to facilitate design of sophisticated
systems
– Delving into the depths reveals more information
•
An abstraction omits unneeded detail, helps us cope with
complexity
10
How do we learn this stuff? Abstraction
•
Abstraction is one of the most important concepts (BIG IDEAS) and
problem solving techniques a CS major needs to learn and master!
•
Being able to think in multiple levels of abstraction separate
Computer Science from other disciplines!!
11
How do computers work?
•
Need to understand abstractions such as:
– Applications software
– Systems software
– Assembly Language
– Machine Language
– Architectural Issues
– Sequential logic, finite state machines
– Combinational logic, arithmetic circuits
– Boolean logic, 1s and 0s
– Transistors used to build logic gates (CMOS)
– Semiconductors/Silicon used to build transistors
– Properties of atoms, electrons, and quantum dynamics
•
So much to learn!
12
Instruction Set Architecture
•
A very important abstraction
– interface between hardware and low-level software
– standardizes instructions, machine language bit patterns, etc.
– advantage: different implementations of the same architecture
•
Modern instruction set architectures:
– Motorola 68000, PowerPC, Intel x86, IA-32, MIPS, SPARC, ARM,
and others
13
Computer Architecture vs Organization
•
Architecture is those attributes visible to the programmer
– Abstraction of internal organization of a computer
– Defines capabilities of computer and its programming model
– Instruction set, number of bits used for data representation,
I/O mechanisms, addressing techniques.
– e.g. Is there a multiply instruction?
•
Organization is how features are implemented
– Control signals, interfaces, memory technology.
– e.g. Is there a hardware multiply unit or is it done by
repeated addition?
•
More examples can be found as we study along …
– Architecture:
– Organization:
14
Computer Architecture vs Organization
•
All Intel x86 family share the same basic architecture
•
The IBM System/370 family share the same basic architecture
•
This gives code compatibility
– At least backwards
•
Organization differs between different versions
15
Historical Perspective
• ENIAC built in World War II was the first general purpose
computer
– Electronic Numerical Integrator And Computer
– Eckert and Mauchly, University of Pennsylvania
– Used for computing artillery firing tables
– Started 1943, Finished 1946
– Too late for war effort (Quiz: WWII ended in _?)
– Used until 1955
– 80 feet long by 8.5 feet high and several feet wide
– Decimal (not binary)
– Programmed manually by switches
– Each of the twenty 10 digit registers was 2 feet long
– Used 18,000 vacuum tubes, 70,000 resistors, 10,000
capacitors, 6,000 switches
– 30 tons, 15,000 square feet, 140 KW power consumption
– Performed 1900 additions per second
16
Von Neumann Machine
•
•
•
Model of modern general purpose electronic digital computers
Program and data are stored in the common memory system
Pseudocode of operation
DO
BEGIN
Read an instruction from memory (Fetch)
Execute the instruction (Excecute)
END
REPEAT FOREVER
17
Topics of This Class
•
Introduction
•
Data Representation
•
Instruction Set Architecture
•
Assembly Language Programming
•
Structure of CPU
•
Accelerating Performance
•
RISC
•
Interrupts and I/O Techniques
•
Memory Hierarchy
•
Operating System
•
Computer Networking
18