SlideShare una empresa de Scribd logo
1 de 32
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

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
 

Destacado (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
 

Similar a 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
 

Similar a 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
 

Último

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 

Último (20)

[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 

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