Professional Documents
Culture Documents
Architecture CM1
Architecture CM1
ARCHITECTURE
CHAPTER 1
INTRODUCTION
1
Course aims
Why?
2
Some courses and related issues
▪ Operating systems
▪ How does an operating system manage to run several programs "all at once"?
▪ Concurrent programming
▪ My two threads each increment the grandTotal variable 1000 times, but I get
1,534 in the end. Why?
▪ Parallel programming
▪ I've gone from a single to a quadruple processor machine, and my prime number
calculation doesn't go any faster!?
3
Some courses and related issues
▪ Network programming
▪ I copy my measurement table from the Jupiter machine to the Venus machine
and the values are no longer the same!?
▪ Compilation
▪ Which machine instruction sequence to generate for copying a character string?
▪ Algorithmic
▪ Why the quick sort is generally better than the heap sort when they have the
same average algorithmic complexity O(n log2 n)?
4
Some general problems and solutions
▪ Reduce access latency:
▪ to memory, hard disk, server, etc.
▪ solution: use a cache, i.e. a local memory with quick access
▪ Etc.
5
References
▪ Books:
▪ Structured Computer Organization. Andrew S. Tanenbaum
▪ Computer Organization and Design. John Hennessy, David Patterson
▪ Manufacturer's documentation:
▪ ® 64 and IA-32 Intel processor architectures
▪ Motorola 68000 Developer's Manual
6
Evaluation methods
Final DE
(correction : TD/TP tutors))
CHAPTER PLAN
3
Von
Neumann's
machine
8
CHAPTER PLAN
3
Von
Neumann's
machine
9
Before our era
▪ - 3000: period of the Chinese emperor Fou-Hi whose magic symbol, the
trigram octagon contains the first 8 numbers represented in binary form by
lines interrupted or not: 000 001 010 011 etc ...
▪ -2000: appearance in the Middle East of the first calculation "tool": the
abacus
▪ -300: the Greek philosopher Aristotle defines in his work what logic is (or
Organon)
1
First mechanical calculators
▪ 1623: Wilhelm Schickard invents a calculating clock
▪ 1632: The Englishman Oughtred invents the slide rule
▪ 1642: In order to help his father, a tax collector in Rouen, Pascal
develops the Pascaline
11
The big names
▪ 1854: George Boole publishes a book in which he demonstrates that
any logical process can be decomposed into a sequence of logical
operations applied to two states
▪ 1904: Invention of the first vacuum tube, the diode by John Ambrose
Fleming
▪ 1937: Alan M. Turing publishes a paper on calculable numbers and
invents the Turing Machine (followed by the Turing Test in 1950)
▪ 1938: Thesis by Claude E. Shannon who first draws a parallel
between electrical circuits and Boolean algebra. He defines the binary
digit: bit (BInary digiT)
12
The first computers
▪ 1941: Creation of the ABC binary calculator by John Atanasoff
and Clifford Berry - first calculator to use Boolean algebra
▪ 1941: Konrad Zuse develops the Z3, the first computer with
stored program (first real computer)
13
The first programming languages
14
Other important dates and people
▪ 1964: Creation of the ASCII code (American Standard Code for
Information Interchange), standardized in 1966 by ISO
▪ 1965: Gordon Moore writes the first "Moore's Law" saying that the
complexity of integrated circuits will double every year
▪ 1969 : Ken Thompson and Dennis Ritchie develop UNIX on Dec PDP 7
▪ ...
15
CHAPTER PLAN
3
Von
Neumann's
machine
16
Types of computers
▪ Visible computers:
▪ Personal computers and workstations (laptops and desktops),
▪ Server computers,
▪ Process control computers,
▪ Supercomputers.
▪ Invisible computers:
▪ Vehicles (cars, trains, boats, planes, rockets, ...),
▪ Telecommunications, By far the most
numerous!
▪ Household appliances,
▪ Watchmaking,
▪…
17
The machine as perceived by the user
18
Services rendered by a computer
Data exchange
Data Data
storage Control transfer
Data processing
19
Hardware decomposition of a computer
▪ A computer consists of several parts:
▪ mouse,
▪ screen,
▪ keyboard,
▪ CPU,
▪ floppy drive ...
▪ On the motherboard:
▪ a microprocessor,
▪ memory (ROM, RAM) ...
20
Architecture and organisation
21
Five generations of computers
22
Architecture and organisation
23
1945-1958 Period
24
1958-1964 Period
25
1965-1971 Period
26
Moore's Law
27
Period 1972 to present day
▪ 1971: INTEL's first 4004 microprocessor, all the components of the CPU are
combined on a single chip.
▪ 1981: IBM computer capable of executing 240,000 sums / second.
▪ 1984: first PC running under a different OS from Windows (Apple Macintosh).
▪ 1996: Intel processor capable of executing 400 million sums / second.
28
Functional decomposition of a computer
Memory
Central Process
Interconnections Unit
ALU CU
Input/Output Interconnections
Registers
29
CHAPTER PLAN
3
Von
Neumann's
machine
30
Von Neumann's machine
31
Schematic operation
32
Von Neumann's machine
33
Overview
34
Signal and chronogram
Status
Time
35
Clock
36
Registers
Memory cells
CPU. Registers
37
Bus
38
Memory
Address Value
39
How it works
Read Write
AR ← address WR ← value
WR ← memory[AR] AR ← address
memory[AR]← WR
40
ALU
▪ 3-parameter function:
▪ 1 operation
▪ 2 arguments
▪ 1 result
41
Inputs / Outputs unit
42
Control unit
Addresses bus
INSTRUCTION ORDINAL
registers : REGISTER COUNTER
different parts.
43
The whole machine
44
CHAPTER PLAN
3
Von
Neumann's
machine
45
Binary information
5V 1 Vrai 1
0V 0 Faux 0
1 0 1 0
Logical
Gate open or Electrical Voltage Magnetization
proposal
closed
46
Why binary?
47
Size measurement units
48
Size measurement units
▪ Caution :
▪ 1 KB = 1 kilobyte ≠ 1 Kb = 1 kilobit
▪ 1 MB = 1 megabyte ≠ 1 Mb = 1 megabit
▪ 1 GB = 1 gigabyte ≠ 1 Gb = 1 gigabit
49
CHAPTER PLAN
3
Von
Neumann's
machine
50
Instruction set
51
Example of instructions in "1 address" format
readPeriph PeriphName
writePeriph PeriphName
loadAcc adMemory
memoAcc adMemory
add adMemory
substract adMemory
multiply adMemory
divide adMemory
testZero adMemory
stop
52
Another example
H0 : AR ← PC
H1 : IR ← MR, PC ← PC +1
4 phase clock (1 per CPU cycle): H2 : SPR ← IRp
H3 : ACC ← ER
▪ keyboard acquisition readPeriph keyboard
H0 : AR ← PC
▪ addition of the read value add 163
H1 : IR ← MR, PC ← PC +1
with a data in memory
H2 : AR ← IRp
▪ display of the result on the screen writePeriph screen
H3 : ACC ← ACC + MR
H0 : AR ← PC
H1 : IR ← MR, PC ← PC +1
H2 : SPR ← IRp
H3 : ER ← ACC
53
Loading
▪ Loader = program that reads a Loading into memory, addresses and pointers
54
Physically …
55
56
A perpetual race for performance
57
The solutions
58
Performance measures
Measure Relevance
Clock frequency Objective for the same architecture
Number of instructions/s (MIPS, MFLOPS) Objective for the same set of instructions
Program execution time (benchmarks) The most objective
59
60