I ntroduction to Programming – Lecture 15
1
Chair of Softw are Engineering
Introduction to Programming
Bertrand Meyer
Last revised 1 December 2003
Introduction to Programming Bertrand Meyer Last revised 1 December - - PowerPoint PPT Presentation
1 Introduction to Programming Bertrand Meyer Last revised 1 December 2003 I ntroduction to Programming Lecture 15 Chair of Softw are Engineering 2 Lecture 15: A glimpse into the hardware I ntroduction to Programming Lecture 15
I ntroduction to Programming – Lecture 15
1
Chair of Softw are Engineering
Last revised 1 December 2003
I ntroduction to Programming – Lecture 15
2
Chair of Softw are Engineering
I ntroduction to Programming – Lecture 15
3
Chair of Softw are Engineering
I ntroduction to Programming – Lecture 15
4
Chair of Softw are Engineering
I ntroduction to Programming – Lecture 15
5
Chair of Softw are Engineering
I ntroduction to Programming – Lecture 15
6
Chair of Softw are Engineering
bit = binary digit (possible values 0 and 1)
I ntroduction to Programming – Lecture 15
7
Chair of Softw are Engineering
I ntroduction to Programming – Lecture 15
8
Chair of Softw are Engineering
I ntroduction to Programming – Lecture 15
9
Chair of Softw are Engineering
(octet)
(32 bits)
values can be represented
representation
7 1 1 1 6 1 1 5 1 1 4 1 3 1 1 2 1 1 1 bit dec. b0 b1 b2
− =
1
n i i i i
I ntroduction to Programming – Lecture 15
10
Chair of Softw are Engineering
I ntroduction to Programming – Lecture 15
11
Chair of Softw are Engineering
00000000 00000000 00000000 00000101
00000000h A18B0003h A18B0002h A18B0001h A18B0000h
addresses memory start address of my_number
I ntroduction to Programming – Lecture 15
12
Chair of Softw are Engineering
Peta ( P) 1 0 1 5 5 0 Tera ( T) 1 0 1 2 4 0 4 x1 0 9 4 ,2 9 4 ,9 6 7 ,2 9 6 3 2 Giga ( G) 1 0 9 ( billion) 1 ,0 7 3 ,7 4 1 ,8 2 4 3 0 Mega ( M) 1 0 6 ( m illion) 1 ,0 4 8 ,5 7 6 2 0 6 5 5 3 6 1 6 Kilo ( K) 1 0 3 ( thousand) 1 0 2 4 1 0 5 1 2 9 2 5 6 8 1 2 8 7 6 4 6 3 2 5 1 6 4 8 3 4 2 2 1 1 Com m on nam e Approxim ation by pow er of 1 0 2 n n
I ntroduction to Programming – Lecture 15
13
Chair of Softw are Engineering
What is the memory?
Relevant parameters of memories:
I ntroduction to Programming – Lecture 15
14
Chair of Softw are Engineering
Registers Cache Main memory Disk Tape
Capacity Access tim e Bandw idth
< 1 KB < 0 .5 ns 2 0 -1 0 0 GB/ s 1 6 MB < 0 .5 -2 5 ns 5 -1 0 GB/ s < 8 GB < 6 0 -2 5 0 ns 1 -5 GB/ s > 1 0 0 GB < 5 -1 0 m s ~ 1 0 0 MB/ s infinite sec-m in < 0 .0 1 GB/ s faster sm aller slow er bigger
I ntroduction to Programming – Lecture 15
15
Chair of Softw are Engineering
I ntroduction to Programming – Lecture 15
16
Chair of Softw are Engineering
memory
(Random Access Memory), core memory
I ntroduction to Programming – Lecture 15
17
Chair of Softw are Engineering
extension for the main memory attached to a computer disk device (HDD) a pile of magnetized disks, with several reading heads rotation speed, capacity, average access time, latency
devices for data backup connected to a computer only episodically disk devices, USB memory sticks, ZIP drives
I ntroduction to Programming – Lecture 15
18
Chair of Softw are Engineering
I ntroduction to Programming – Lecture 15
19
Chair of Softw are Engineering
price, every eighteen months
2000
1 MHz 10 MHz 1 GHz 100 MHz
1990 1980 1970
8008: < 1 MHz 80386: 33 MHz 80486: 50 MHz Pentium: 133 MHz Pentium IV: 1.3 GHz
to 1 GHz: 26 years from 1 to 2 GHz: 8 months
Speed of Intel processors
(1 Hertz = 1 clock cycle per second)
I ntroduction to Programming – Lecture 15
20
Chair of Softw are Engineering