Wouter van Ooijen Mail: [email protected] Sheets en info: voti.nl/hvu/D4ECPT1
-
Upload
sasha-owens -
Category
Documents
-
view
31 -
download
0
description
Transcript of Wouter van Ooijen Mail: [email protected] Sheets en info: voti.nl/hvu/D4ECPT1
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
1Computertechniek
Wouter van Ooijen
Mail: [email protected]
Sheets en info:
www.voti.nl/hvu/D4ECPT1
Onderwerp: Computersystemen (deel 2)Literatuur: Computersystemen en embedded systemen
Leo van Moergestel
let op: deze sheets zijn (deels) behandeld maar zijn geen onderdeel van de te tentamineren stof (komt alsnog in
deel 2).
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
2Computertechniek
soorten geheugens caching harde schijven RAID
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
3Computertechniek
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
4Computertechniek
CD rom, tape, internet
harde schijf
hoofdgeheugen (DRAM)
externe cache
on-chip cache
registers
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
5Computertechniek
processors worden steeds sneller
geheugen wordt ook wel wat snellerhet geheugen wordt de beperking
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
6Computertechniek
de oplosing: caching!
neem een klein stukje sneller geheugen,
zorg dat dit transparant
het langzamere geheugen vervangt
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
7Computertechniek
een separate RAM cache
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
8Computertechniek
associatieve adressering
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
9Computertechniek
1 associatieve geheugen cel
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
10Computertechniek
een cache met adressen en data
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
11Computertechniek
fully associative cache:
iedere geheugencel heeft
comparators voor het
volledige adres
- veel hardware- veel stroom- dus lage integratie
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
12Computertechniek
veel minder hardware: een direct
mapped cache heeft maar 1 comparator!
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
13Computertechniek
het compromis: een
set-associative cache
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
14Computertechniek
zoals altijd: een compromis tussen performance en
prijs...
in de praktijk is een cachemeestal 2 .. 16-way set-associatief
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
15Computertechniek
maar wat bewaar je in een cache?
dat wat je snel weer nodig hebt,
je wil dus eigenlijk voorspellen...
caching berust op localiteit
of eigenlijk: wat gooi je weg?
LRU, LFU, FIFO,
MRU (!), random (!), ...
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
16Computertechniek
wat lees je in bij een misser?
RAM geheugen is meestal sneller
in sequential accessaccess is vaak sequentieel, dus ...
sommige processor/cache
combinaties hebben een speciale
pre-fetch instructie!
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
17Computertechniek
separate data / instruction cachescombined (unified) cache
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
18Computertechniek
wat te doen bij schrijven?
write-trough
write-back
let op bij multiprocessor
systemen!
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
19Computertechniek
een probleem bij real-time systemen:
onvoorspelbaarheidbenchmarking is lastig
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
20Computertechniek
omgedraaide cache: virtueel geheugen!
maak (schijnbaar) meer geheugen
door (transparant) een lager deel
van de hierargie te gebruiken
‘t is maar hoe je het ziet...
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
21Computertechniek
oefening
neem aan dat de cache
initieel leeg is
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
22Computertechniek
A 1 6 34 23 9 34 6 1 9 41
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
23Computertechniek
A 1 6 34 23 9 34 6 1 9 41
A % 8
1 6 2 7 1 2 6 1 1 1
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
24Computertechniek
A 1 6 34 23 9 34 6 1 9 41
A % 8
1 6 2 7 1 2 6 1 1 1
C - - - - 1 34 6 9 1 9
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
25Computertechniek
A 1 6 34 23 9 34 6 1 9 41
A % 8
1 6 2 7 1 2 6 1 1 1
C - - - - 1 34 6 9 1 9
H? - - - - N Y Y N N N
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
26Computertechniek
indeling van een harde schijf
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
27Computertechniek
een verzameling tracks vormt
een cylinder
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
28Computertechniek
data ophalen (of wegschrijven) op een harde schijf:
1 selecteer de juiste kop (niet altijd)
2 beweeg de kop(pen) naar de juiste track (ttt)
3 wacht tot de juiste sector langskomt (latency)
4 lees (of schrijf) de data (transfer)
2 is meestal de langzaamste stap
(tenminste: bij random access!)
elevator algorithm
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
29Computertechniek
adresseren van gegevens op een harde schijf:
vroeger door expliciet head, track (cylinder) en sector te specificeren
tegenvoordig vaak nog met zo’n drietal, maar er is meestal geen relatie meer met de fysieke schijf (address translation)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
30Computertechniek
als de processor langzaam is: interlaving
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
31Computertechniek
IDE
‘domme’ schijven (goedkoop)
korte kabel, max 2 schijven,
1 operatie tegelijk
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
32Computertechniek
SCSI
‘intelligente’ schijven (duurder)
kabel kan langer zijn, meerdere
schijven, meerdere operaties
tegelijk (zinning?)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
33Computertechniek
Trend: van parallel naar serieel
Bij ‘lagere’ snelheden: meer draadjes meer bits (per tijdseenheid) meer throughput!
(IDE, SCSI, HP-GPIB, CPU-RAM interface)
Bij ‘hogere’ snelheden: meer draadjes looptijdverschillen probleem!
(USB, FireWire, serial-ATAPI,
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
34Computertechniek
harde schijf organisatie
• ruimteverlies bij kleine files• fragmentatie• FAT• page file
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
35Computertechniek
DAS: Direct Attached Storage
File opslag in een netwerk (1)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
36Computertechniek
NAS: Network Attached Storage
File opslag in een netwerk (2)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
37Computertechniek
SAN: Storage Area Network
File opslag in een netwerk (3)
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
38Computertechniek
Redundant Array of Independent (or Inexpensive) Disks
waarom?
schijven zijn tegenwoordig goedkoop
(micro) controllers zijn (veel) sneller dan schijven
betrouwbaarheid en snelheid zijn belangrijk
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
39Computertechniek
RAID 0 = striping : informatie
verdelen,meerdere schijven “zien”
als 1 grotere, + geen overhead,
+ snellere random access, - geen
winst in betrouwbaarheid
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
40Computertechniek
RAID 1 = shadowing / mirroring:
2 copien van alle informatie
+ simpel, + leest snel,
- verspilling van ruimte
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
41Computertechniek
RAID 3 = striping + parity
+ lage overhead, + hoge lees-
snelheid, + 1 fout bestendig,
- write bottleneck
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
42Computertechniek
RAID 5 = store distributed parity
code, + lage overhead, + hoge lees
snelheid, + 1 fout bestendig,
multiple writes!
Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology
43Computertechniek
doen 1
lees hoofdstukken 11 en 12
(12: alleen caching, dus t/m 12.1.3)