SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
Maths is not everything

Embedded Systems
4 - Hardware Architecture

CPU
Input/Output mechanisms
Memory
Buses and Aux
Input/Output interfaces
RMR©2012

Power Management
Maths is not everything

Memory Organization
Caches

RMR©2012
Caches and CPUs

address

cache
controller

CPU

RMR©2012

© 2008 Wayne Wolf

data

Maths is not everything

data

cache
address
data

main
memory
Cache operation

Many main memory locations are mapped
onto one cache entry.
May have caches for:
instructions;
data;

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

data + instructions (unified).

Memory access time is no longer
deterministic.
Terms

Cache hit: required location is in cache.
Cache miss: required location is not in
cache.
Compulsory (cold): location has never been accessed.
Capacity: working set is too large.

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Conflict: multiple locations in working set map to
same cache entry.

Working set: set of locations used by
program in a time interval.
Memory system performance

h = cache hit rate.
tcache = cache access time,
tmain = main memory access time.

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Average memory access time:
tav = htcache + (1-h)tmain
Multiple levels of cache

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

CPU

L1 cache

L2 cache
Multi-level cache access time

h1 = cache hit rate.
h2 = rate for miss on L1, hit on L2.
Average memory access time:

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

tav = h1tL1 + (h2-h1)tL2 + (1- h2-h1)tmain
Replacement policies

Replacement policy: strategy for choosing
which cache entry to throw out to make
room for a new memory location.
Two popular strategies:

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Random.
Least-recently used (LRU).
Cache organizations

Fully-associative: any memory location can
be stored anywhere in the cache (almost
never implemented).

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Direct-mapped: each memory location
maps onto exactly one cache entry.
N-way set-associative: each memory
location can go into one of n sets.
Cache performance benefits

Keep frequently-accessed locations in
fast cache.
Cache retrieves more than one word at a
time.

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Sequential accesses are faster after first access.
Direct-mapped cache

1

0xabcd

byte byte byte ...

valid

tag

data
cache block

address
tag

index

offset

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

=
hit

value
byte
Write operations

Write-through: immediately copy write to
main memory.

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Write-back: write to main memory only
when location is removed from cache.
Direct-mapped cache locations

Many locations map onto the same cache
block.
Conflict misses are easy to generate:
Array a[ ] uses locations 0, 1, 2, …

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Array b[ ] uses locations 1024, 1025, 1026, …
Operation a[i] + b[i] generates conflict misses.
Set-associative cache

A set of direct-mapped caches:

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Set 1

Set 2

hit

...

data

Set n
Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Example: direct-mapped vs. set-associative
Direct-mapped cache behavior

After 001 access:

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

block	

tag	

00	

 	

 -	

01	

 	

 0	

10	

 	

 -	

11	

 	

 -	


data
1111
-

After 010 access:
block	

tag	

00	

 	

 -	

01	

 	

 0	

10	

 	

 0	

11	

 	

 -	


data
1111
0000
-
Direct-mapped cache behavior, cont’d.

After 011 access:

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

block	

tag	

00	

 	

 -	

01	

 	

 0	

10	

 	

 0	

11	

 	

 0	


data
1111
0000
0110

After 100 access:
block	

tag	

00	

 	

 1	

01	

 	

 0	

10	

 	

 0	

11	

 	

 0	


data
1000
1111
0000
0110
Direct-mapped cache behavior, cont’d.

After 101 access:

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

block	

tag	

00	

 	

 1	

01	

 	

 1	

10	

 	

 0	

11	

 	

 0	


data
1000
0001
0000
0110

After 111 access:
block	

tag	

00	

 	

 1	

01	

 	

 1	

10	

 	

 0	

11	

 	

 1	


data
1000
0001
0000
0100
2-way set-associtive cache behavior

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Final state of cache (twice as big as directmapped):
set	

blk 0 tag	

00	

 1	

 	

01	

 0	

 	

10	

 0	

 	

11	

 0	

 	


blk 0 data	

 blk 1 tag	

1000	

	

-	

 	

1111	

	

1	

	

0000	

	

-	

 	

0110	

	

1	

	


blk 1 data
0001
0100
2-way set-associative cache behavior

Final state of cache (same size as directmapped):

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

set	

blk 0 tag	

 blk 0 data	

blk 1 tag	

 blk 1 data
0	

 	

 01	

	

0000	

	

10	

 	

1000
1	

 	

 10	

	

0111	

	

11	

 	

0100
Maths is not everything

Memory Organization
MMU

RMR©2012
Memory management units

Memory management unit (MMU)
translates addresses:
logical
address

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

CPU

memory
management
unit

physical
address

main
memory
Memory management tasks

Allows programs to move in physical
memory during execution.
Allows virtual memory:
memory images kept in secondary storage;

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

images returned to main memory on demand during
execution.

Page fault: request for location not
resident in memory.
Address translation

Requires some sort of register/table to
allow arbitrary mappings of logical to
physical addresses.
Two basic schemes:
segmented;

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

paged.

Segmentation and paging can be combined
(x86).
Segments and pages

page 1
page 2
segment 1

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

memory

segment 2
Segment address translation

segment base address

logical address

+
segment lower bound

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

segment upper bound

range
check

physical address

range
error
Page address translation

page

offset

page i base

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

concatenate

page

offset
Page table organizations

page
descriptor

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

page descriptor

flat

tree
Caching address translations

Large translation tables require main
memory access.
TLB: cache for address translation.

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

Typically small.
ARM memory management

Memory region types:
section: 1 Mbyte block;
large page: 64 kbytes;
small page: 4 kbytes.

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

An address is marked as section-mapped
or page-mapped.
Two-level translation scheme.
ARM address translation

Translation table
base register

descriptor
1st level table

1st index

2nd index

offset

concatenate
concatenate

Maths is not everything

RMR©2012

© 2008 Wayne Wolf

descriptor
2nd level table

physical address

Contenu connexe

Tendances

Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linuxKyle Hailey
 
Full Table Scan: friend or foe
Full Table Scan: friend or foeFull Table Scan: friend or foe
Full Table Scan: friend or foeMauro Pagano
 
Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Kyle Hailey
 
Whitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and VisualizationWhitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and VisualizationKristofferson A
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Kristofferson A
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by exampleMauro Pagano
 
Adapting to Adaptive Plans on 12c
Adapting to Adaptive Plans on 12cAdapting to Adaptive Plans on 12c
Adapting to Adaptive Plans on 12cMauro Pagano
 
AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015Yury Velikanov
 
Whitepaper: Where did my CPU go?
Whitepaper: Where did my CPU go?Whitepaper: Where did my CPU go?
Whitepaper: Where did my CPU go?Kristofferson A
 
12c SQL Plan Directives
12c SQL Plan Directives12c SQL Plan Directives
12c SQL Plan DirectivesFranck Pachot
 
Whitepaper: Exadata Consolidation Success Story
Whitepaper: Exadata Consolidation Success StoryWhitepaper: Exadata Consolidation Success Story
Whitepaper: Exadata Consolidation Success StoryKristofferson A
 
Oracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersOracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersKyle Hailey
 
Adaptive Query Optimization in 12c
Adaptive Query Optimization in 12cAdaptive Query Optimization in 12c
Adaptive Query Optimization in 12cAnju Garg
 
Create your oracle_apps_r12_lab_with_less_than_us1000
Create your oracle_apps_r12_lab_with_less_than_us1000Create your oracle_apps_r12_lab_with_less_than_us1000
Create your oracle_apps_r12_lab_with_less_than_us1000Ajith Narayanan
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresPractical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresEDB
 
All types of backups and restore
All types of backups and restoreAll types of backups and restore
All types of backups and restoreVasudeva Rao
 
Adaptive Query Optimization
Adaptive Query OptimizationAdaptive Query Optimization
Adaptive Query OptimizationAnju Garg
 

Tendances (20)

Christo kutrovsky oracle, memory & linux
Christo kutrovsky   oracle, memory & linuxChristo kutrovsky   oracle, memory & linux
Christo kutrovsky oracle, memory & linux
 
Full Table Scan: friend or foe
Full Table Scan: friend or foeFull Table Scan: friend or foe
Full Table Scan: friend or foe
 
Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle
 
Whitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and VisualizationWhitepaper: Mining the AWR repository for Capacity Planning and Visualization
Whitepaper: Mining the AWR repository for Capacity Planning and Visualization
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
 
Oracle statistics by example
Oracle statistics by exampleOracle statistics by example
Oracle statistics by example
 
Adapting to Adaptive Plans on 12c
Adapting to Adaptive Plans on 12cAdapting to Adaptive Plans on 12c
Adapting to Adaptive Plans on 12c
 
cache
cachecache
cache
 
AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015AWR DB performance Data Mining - Collaborate 2015
AWR DB performance Data Mining - Collaborate 2015
 
Whitepaper: Where did my CPU go?
Whitepaper: Where did my CPU go?Whitepaper: Where did my CPU go?
Whitepaper: Where did my CPU go?
 
12c SQL Plan Directives
12c SQL Plan Directives12c SQL Plan Directives
12c SQL Plan Directives
 
Whitepaper: Exadata Consolidation Success Story
Whitepaper: Exadata Consolidation Success StoryWhitepaper: Exadata Consolidation Success Story
Whitepaper: Exadata Consolidation Success Story
 
Oracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmastersOracle Open World Thursday 230 ashmasters
Oracle Open World Thursday 230 ashmasters
 
Adaptive Query Optimization in 12c
Adaptive Query Optimization in 12cAdaptive Query Optimization in 12c
Adaptive Query Optimization in 12c
 
Create your oracle_apps_r12_lab_with_less_than_us1000
Create your oracle_apps_r12_lab_with_less_than_us1000Create your oracle_apps_r12_lab_with_less_than_us1000
Create your oracle_apps_r12_lab_with_less_than_us1000
 
OS_Ch9
OS_Ch9OS_Ch9
OS_Ch9
 
Practical Partitioning in Production with Postgres
Practical Partitioning in Production with PostgresPractical Partitioning in Production with Postgres
Practical Partitioning in Production with Postgres
 
Intro to ASH
Intro to ASHIntro to ASH
Intro to ASH
 
All types of backups and restore
All types of backups and restoreAll types of backups and restore
All types of backups and restore
 
Adaptive Query Optimization
Adaptive Query OptimizationAdaptive Query Optimization
Adaptive Query Optimization
 

En vedette

Pedia anubhutidave21grp
Pedia anubhutidave21grpPedia anubhutidave21grp
Pedia anubhutidave21grpAnubhuti Dave
 
S emb t9-arch_power (1)
S emb t9-arch_power (1)S emb t9-arch_power (1)
S emb t9-arch_power (1)João Moreira
 
pathanatomy Reproductive system
pathanatomy Reproductive systempathanatomy Reproductive system
pathanatomy Reproductive systemAnubhuti Dave
 
S emb t1-introduction
S emb t1-introductionS emb t1-introduction
S emb t1-introductionJoão Moreira
 
S emb t10-development
S emb t10-developmentS emb t10-development
S emb t10-developmentJoão Moreira
 
Gastrointestinal System USMLE Pretest
Gastrointestinal System USMLE PretestGastrointestinal System USMLE Pretest
Gastrointestinal System USMLE PretestAnubhuti Dave
 
musculoskeletal system USMLE
musculoskeletal system  USMLEmusculoskeletal system  USMLE
musculoskeletal system USMLEAnubhuti Dave
 
RMAN backup Oracle
RMAN backup OracleRMAN backup Oracle
RMAN backup OracleAlfan Dya
 

En vedette (16)

Pedia anubhutidave21grp
Pedia anubhutidave21grpPedia anubhutidave21grp
Pedia anubhutidave21grp
 
S emb t9-arch_power (1)
S emb t9-arch_power (1)S emb t9-arch_power (1)
S emb t9-arch_power (1)
 
pathanatomy Reproductive system
pathanatomy Reproductive systempathanatomy Reproductive system
pathanatomy Reproductive system
 
S emb t1-introduction
S emb t1-introductionS emb t1-introduction
S emb t1-introduction
 
S emb t10-development
S emb t10-developmentS emb t10-development
S emb t10-development
 
S emb t9-arch_power
S emb t9-arch_powerS emb t9-arch_power
S emb t9-arch_power
 
Herramientas unetenet
Herramientas unetenetHerramientas unetenet
Herramientas unetenet
 
S emb t4-arch_cpu
S emb t4-arch_cpuS emb t4-arch_cpu
S emb t4-arch_cpu
 
S emb t12-os
S emb t12-osS emb t12-os
S emb t12-os
 
Gastrointestinal System USMLE Pretest
Gastrointestinal System USMLE PretestGastrointestinal System USMLE Pretest
Gastrointestinal System USMLE Pretest
 
S emb t11-processes
S emb t11-processesS emb t11-processes
S emb t11-processes
 
S emb t7-arch_bus
S emb t7-arch_busS emb t7-arch_bus
S emb t7-arch_bus
 
musculoskeletal system USMLE
musculoskeletal system  USMLEmusculoskeletal system  USMLE
musculoskeletal system USMLE
 
S emb t5-arch_io
S emb t5-arch_ioS emb t5-arch_io
S emb t5-arch_io
 
S emb t13-freertos
S emb t13-freertosS emb t13-freertos
S emb t13-freertos
 
RMAN backup Oracle
RMAN backup OracleRMAN backup Oracle
RMAN backup Oracle
 

Similaire à S emb t6-arch_mem

[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』
[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』
[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』Insight Technology, Inc.
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalabilityWim Godden
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Wim Godden
 
EMC Multisite DR for SQL Server 2012
EMC Multisite DR for SQL Server 2012EMC Multisite DR for SQL Server 2012
EMC Multisite DR for SQL Server 2012xKinAnx
 
Seamless replication and disaster recovery for Apache Hive Warehouse
Seamless replication and disaster recovery for Apache Hive WarehouseSeamless replication and disaster recovery for Apache Hive Warehouse
Seamless replication and disaster recovery for Apache Hive WarehouseDataWorks Summit
 
Seamless Replication and Disaster Recovery for Apache Hive Warehouse
Seamless Replication and Disaster Recovery for Apache Hive WarehouseSeamless Replication and Disaster Recovery for Apache Hive Warehouse
Seamless Replication and Disaster Recovery for Apache Hive WarehouseSankar H
 
High-Performance Physics Solver Design for Next Generation Consoles
High-Performance Physics Solver Design for Next Generation ConsolesHigh-Performance Physics Solver Design for Next Generation Consoles
High-Performance Physics Solver Design for Next Generation ConsolesSlide_N
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalabilityWim Godden
 
70-410 Practice Test
70-410 Practice Test70-410 Practice Test
70-410 Practice Testwrailebo
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
Fundamentals of Complete Crash and Hang Memory Dump Analysis (Revision 2)
Fundamentals of Complete Crash and Hang Memory Dump Analysis (Revision 2)Fundamentals of Complete Crash and Hang Memory Dump Analysis (Revision 2)
Fundamentals of Complete Crash and Hang Memory Dump Analysis (Revision 2)Dmitry Vostokov
 
Vx Rack : L'hyperconvergence avec l'experience VCE
Vx Rack : L'hyperconvergence avec l'experience VCEVx Rack : L'hyperconvergence avec l'experience VCE
Vx Rack : L'hyperconvergence avec l'experience VCERSD
 
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Wim Godden
 
Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011Wim Godden
 
phptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorialphptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorialWim Godden
 
Chapter 8 1 Digital Design and Computer Architecture, 2n.docx
Chapter 8 1 Digital Design and Computer Architecture, 2n.docxChapter 8 1 Digital Design and Computer Architecture, 2n.docx
Chapter 8 1 Digital Design and Computer Architecture, 2n.docxchristinemaritza
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalabilityWim Godden
 
Hitachi whitepaper-protect-ucp-hc-v240-with-vmware-vsphere-hdid
Hitachi whitepaper-protect-ucp-hc-v240-with-vmware-vsphere-hdidHitachi whitepaper-protect-ucp-hc-v240-with-vmware-vsphere-hdid
Hitachi whitepaper-protect-ucp-hc-v240-with-vmware-vsphere-hdidChetan Gabhane
 

Similaire à S emb t6-arch_mem (20)

[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』
[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』
[db tech showcase Tokyo 2018] #dbts2018 #B17 『オラクル パフォーマンス チューニング - 神話、伝説と解決策』
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
 
EMC Multisite DR for SQL Server 2012
EMC Multisite DR for SQL Server 2012EMC Multisite DR for SQL Server 2012
EMC Multisite DR for SQL Server 2012
 
Seamless replication and disaster recovery for Apache Hive Warehouse
Seamless replication and disaster recovery for Apache Hive WarehouseSeamless replication and disaster recovery for Apache Hive Warehouse
Seamless replication and disaster recovery for Apache Hive Warehouse
 
Seamless Replication and Disaster Recovery for Apache Hive Warehouse
Seamless Replication and Disaster Recovery for Apache Hive WarehouseSeamless Replication and Disaster Recovery for Apache Hive Warehouse
Seamless Replication and Disaster Recovery for Apache Hive Warehouse
 
High-Performance Physics Solver Design for Next Generation Consoles
High-Performance Physics Solver Design for Next Generation ConsolesHigh-Performance Physics Solver Design for Next Generation Consoles
High-Performance Physics Solver Design for Next Generation Consoles
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
70-410 Practice Test
70-410 Practice Test70-410 Practice Test
70-410 Practice Test
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Fundamentals of Complete Crash and Hang Memory Dump Analysis (Revision 2)
Fundamentals of Complete Crash and Hang Memory Dump Analysis (Revision 2)Fundamentals of Complete Crash and Hang Memory Dump Analysis (Revision 2)
Fundamentals of Complete Crash and Hang Memory Dump Analysis (Revision 2)
 
Vx Rack : L'hyperconvergence avec l'experience VCE
Vx Rack : L'hyperconvergence avec l'experience VCEVx Rack : L'hyperconvergence avec l'experience VCE
Vx Rack : L'hyperconvergence avec l'experience VCE
 
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012
 
Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011
 
phptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorialphptek13 - Caching and tuning fun tutorial
phptek13 - Caching and tuning fun tutorial
 
No sql presentation
No sql presentationNo sql presentation
No sql presentation
 
Chapter 8 1 Digital Design and Computer Architecture, 2n.docx
Chapter 8 1 Digital Design and Computer Architecture, 2n.docxChapter 8 1 Digital Design and Computer Architecture, 2n.docx
Chapter 8 1 Digital Design and Computer Architecture, 2n.docx
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
Hitachi whitepaper-protect-ucp-hc-v240-with-vmware-vsphere-hdid
Hitachi whitepaper-protect-ucp-hc-v240-with-vmware-vsphere-hdidHitachi whitepaper-protect-ucp-hc-v240-with-vmware-vsphere-hdid
Hitachi whitepaper-protect-ucp-hc-v240-with-vmware-vsphere-hdid
 
memory.ppt
memory.pptmemory.ppt
memory.ppt
 

Dernier

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Dernier (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

S emb t6-arch_mem

  • 1. Maths is not everything Embedded Systems 4 - Hardware Architecture CPU Input/Output mechanisms Memory Buses and Aux Input/Output interfaces RMR©2012 Power Management
  • 2. Maths is not everything Memory Organization Caches RMR©2012
  • 3. Caches and CPUs address cache controller CPU RMR©2012 © 2008 Wayne Wolf data Maths is not everything data cache address data main memory
  • 4. Cache operation Many main memory locations are mapped onto one cache entry. May have caches for: instructions; data; Maths is not everything RMR©2012 © 2008 Wayne Wolf data + instructions (unified). Memory access time is no longer deterministic.
  • 5. Terms Cache hit: required location is in cache. Cache miss: required location is not in cache. Compulsory (cold): location has never been accessed. Capacity: working set is too large. Maths is not everything RMR©2012 © 2008 Wayne Wolf Conflict: multiple locations in working set map to same cache entry. Working set: set of locations used by program in a time interval.
  • 6. Memory system performance h = cache hit rate. tcache = cache access time, tmain = main memory access time. Maths is not everything RMR©2012 © 2008 Wayne Wolf Average memory access time: tav = htcache + (1-h)tmain
  • 7. Multiple levels of cache Maths is not everything RMR©2012 © 2008 Wayne Wolf CPU L1 cache L2 cache
  • 8. Multi-level cache access time h1 = cache hit rate. h2 = rate for miss on L1, hit on L2. Average memory access time: Maths is not everything RMR©2012 © 2008 Wayne Wolf tav = h1tL1 + (h2-h1)tL2 + (1- h2-h1)tmain
  • 9. Replacement policies Replacement policy: strategy for choosing which cache entry to throw out to make room for a new memory location. Two popular strategies: Maths is not everything RMR©2012 © 2008 Wayne Wolf Random. Least-recently used (LRU).
  • 10. Cache organizations Fully-associative: any memory location can be stored anywhere in the cache (almost never implemented). Maths is not everything RMR©2012 © 2008 Wayne Wolf Direct-mapped: each memory location maps onto exactly one cache entry. N-way set-associative: each memory location can go into one of n sets.
  • 11. Cache performance benefits Keep frequently-accessed locations in fast cache. Cache retrieves more than one word at a time. Maths is not everything RMR©2012 © 2008 Wayne Wolf Sequential accesses are faster after first access.
  • 12. Direct-mapped cache 1 0xabcd byte byte byte ... valid tag data cache block address tag index offset Maths is not everything RMR©2012 © 2008 Wayne Wolf = hit value byte
  • 13. Write operations Write-through: immediately copy write to main memory. Maths is not everything RMR©2012 © 2008 Wayne Wolf Write-back: write to main memory only when location is removed from cache.
  • 14. Direct-mapped cache locations Many locations map onto the same cache block. Conflict misses are easy to generate: Array a[ ] uses locations 0, 1, 2, … Maths is not everything RMR©2012 © 2008 Wayne Wolf Array b[ ] uses locations 1024, 1025, 1026, … Operation a[i] + b[i] generates conflict misses.
  • 15. Set-associative cache A set of direct-mapped caches: Maths is not everything RMR©2012 © 2008 Wayne Wolf Set 1 Set 2 hit ... data Set n
  • 16. Maths is not everything RMR©2012 © 2008 Wayne Wolf Example: direct-mapped vs. set-associative
  • 17. Direct-mapped cache behavior After 001 access: Maths is not everything RMR©2012 © 2008 Wayne Wolf block tag 00 - 01 0 10 - 11 - data 1111 - After 010 access: block tag 00 - 01 0 10 0 11 - data 1111 0000 -
  • 18. Direct-mapped cache behavior, cont’d. After 011 access: Maths is not everything RMR©2012 © 2008 Wayne Wolf block tag 00 - 01 0 10 0 11 0 data 1111 0000 0110 After 100 access: block tag 00 1 01 0 10 0 11 0 data 1000 1111 0000 0110
  • 19. Direct-mapped cache behavior, cont’d. After 101 access: Maths is not everything RMR©2012 © 2008 Wayne Wolf block tag 00 1 01 1 10 0 11 0 data 1000 0001 0000 0110 After 111 access: block tag 00 1 01 1 10 0 11 1 data 1000 0001 0000 0100
  • 20. 2-way set-associtive cache behavior Maths is not everything RMR©2012 © 2008 Wayne Wolf Final state of cache (twice as big as directmapped): set blk 0 tag 00 1 01 0 10 0 11 0 blk 0 data blk 1 tag 1000 - 1111 1 0000 - 0110 1 blk 1 data 0001 0100
  • 21. 2-way set-associative cache behavior Final state of cache (same size as directmapped): Maths is not everything RMR©2012 © 2008 Wayne Wolf set blk 0 tag blk 0 data blk 1 tag blk 1 data 0 01 0000 10 1000 1 10 0111 11 0100
  • 22. Maths is not everything Memory Organization MMU RMR©2012
  • 23. Memory management units Memory management unit (MMU) translates addresses: logical address Maths is not everything RMR©2012 © 2008 Wayne Wolf CPU memory management unit physical address main memory
  • 24. Memory management tasks Allows programs to move in physical memory during execution. Allows virtual memory: memory images kept in secondary storage; Maths is not everything RMR©2012 © 2008 Wayne Wolf images returned to main memory on demand during execution. Page fault: request for location not resident in memory.
  • 25. Address translation Requires some sort of register/table to allow arbitrary mappings of logical to physical addresses. Two basic schemes: segmented; Maths is not everything RMR©2012 © 2008 Wayne Wolf paged. Segmentation and paging can be combined (x86).
  • 26. Segments and pages page 1 page 2 segment 1 Maths is not everything RMR©2012 © 2008 Wayne Wolf memory segment 2
  • 27. Segment address translation segment base address logical address + segment lower bound Maths is not everything RMR©2012 © 2008 Wayne Wolf segment upper bound range check physical address range error
  • 28. Page address translation page offset page i base Maths is not everything RMR©2012 © 2008 Wayne Wolf concatenate page offset
  • 29. Page table organizations page descriptor Maths is not everything RMR©2012 © 2008 Wayne Wolf page descriptor flat tree
  • 30. Caching address translations Large translation tables require main memory access. TLB: cache for address translation. Maths is not everything RMR©2012 © 2008 Wayne Wolf Typically small.
  • 31. ARM memory management Memory region types: section: 1 Mbyte block; large page: 64 kbytes; small page: 4 kbytes. Maths is not everything RMR©2012 © 2008 Wayne Wolf An address is marked as section-mapped or page-mapped. Two-level translation scheme.
  • 32. ARM address translation Translation table base register descriptor 1st level table 1st index 2nd index offset concatenate concatenate Maths is not everything RMR©2012 © 2008 Wayne Wolf descriptor 2nd level table physical address