ERTL Embedded and Real-Time systems Lab.
Nagoya University
Takuya ¡Ishikawa, ¡Toshikazu ¡Kato, ¡ Shinya ¡Honda ¡and ¡Hiroaki ¡Takada ¡
Nagoya ¡University, ¡Japan ¡
Investigation ¡and ¡Improvement ¡
- n ¡the ¡Impact ¡of ¡TLB ¡misses ¡
Investigation and Improvement on the Impact of TLB misses in - - PowerPoint PPT Presentation
Investigation and Improvement on the Impact of TLB misses in Real-Time Systems Takuya Ishikawa, Toshikazu Kato, Shinya Honda and Hiroaki Takada Nagoya University, Japan
ERTL Embedded and Real-Time systems Lab.
Nagoya University
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l Memory ¡protection ¡for ¡real-‐‑–time ¡systems ¡is ¡
l detects ¡illegal ¡memory ¡access l requires ¡hardware ¡support
l Memory ¡Management ¡Unit ¡(MMU)
l performs ¡address ¡translation ¡with ¡a ¡page ¡table
l Translation ¡Lookaside ¡Buffer ¡(TLB)
➔ to ¡improve ¡address ¡translation ¡speed ¡ ➔ a ¡page ¡table ¡is ¡in ¡main ¡memory
➔ a ¡required ¡entry ¡is ¡obtained ¡from ¡a ¡page ¡table ¡(page ¡ table ¡walk) ¡and ¡loaded ¡it ¡to ¡a ¡TLB ¡entry
2
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l In ¡real-‐‑–time ¡systems
l worst ¡case ¡execution ¡time ¡(WCET) ¡is ¡important ¡for ¡
l WCET ¡is ¡pessimistically ¡estimated
l TLB ¡have ¡the ¡potential ¡to ¡make ¡WCET ¡more ¡
l it ¡is ¡difficult ¡to ¡predict ¡the ¡occurrence ¡of ¡TLB ¡misses
l Impact ¡of ¡TLB ¡misses ¡on ¡WCETs ¡should ¡be ¡studied l predictability ¡of ¡WCETs ¡with ¡TLB ¡should ¡be ¡improved
3
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l execution ¡time ¡distribution ¡of ¡a ¡real-‐‑–time ¡task ¡in ¡a ¡
l take ¡advantage ¡of ¡TLB ¡locking
l 2 ¡types ¡of ¡methods: ¡static ¡one ¡and ¡dynamic ¡one
4
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l target ¡processor: ¡SH7750R(235MHz)
l MMU ¡with ¡TLB ¡which ¡has ¡64 ¡entries ¡for ¡instruction ¡and ¡data
➔ TLB ¡needs ¡not ¡to ¡be ¡flushed ¡with ¡context ¡switch
l TLB ¡miss ¡exception ¡is ¡handled ¡by ¡software ¡(RTOS)
➔ ASID ¡identifies ¡a ¡currently ¡running ¡application ➔ each ¡application ¡has ¡its ¡own ¡address ¡space ➔ HRP2 ¡changes ¡ASID ¡with ¡context ¡switch
l to ¡make ¡it ¡easier ¡to ¡evaluate ¡an ¡impact ¡of ¡TLB ¡misses
l cache ¡is ¡disabled ¡(turned ¡off) l interrupts ¡are ¡occurred ¡by ¡only ¡a ¡timer, ¡and ¡the ¡result ¡of ¡
5
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l includes ¡automotive ¡application ¡software ¡and ¡
l consideration ¡of ¡automotive ¡software ¡integration
l automotive ¡software ¡is ¡real-‐‑–time ¡application l multimedia ¡software ¡is ¡non-‐‑–real-‐‑–time ¡application
l benchmark ¡software ¡is ¡included ¡in ¡EEMBC ¡benchmark*
l automotive ¡software ¡is ¡AutoBench l multimedia ¡software ¡is ¡DENBench
、http://www.eembc.org/ 6
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l There ¡are ¡5 ¡real-‐‑–time ¡tasks ¡(RT_̳TASK1,2,...5) ¡and ¡1 ¡
l each ¡task ¡has ¡different ¡ASIDs ¡(is ¡allocated ¡different ¡
application)
l Execution ¡flow
l NR_̳TASK ¡is ¡activated ¡firstly l RT_̳TASK1 ¡is ¡activated ¡periodically l RT_̳TASKn ¡executes ¡the ¡own ¡benchmark, ¡and ¡activates ¡
next ¡RT_̳TASKn+1 ¡ ü RT_̳TASKs ¡are ¡activated ¡10,000 ¡times
7 RT_TASK1 RT_TASK2 ! RT_TASK3 ! RT_TASK4 ! RT_TASK5 ! NR_TASK ! time
50ms !
task ID benchmark name memory size (bytes) RT_TASK1 ttsprk01 58,164 RT_TASK2 a2time01 6,564 RT_TASK3 rspeed01 4,088 RT_TASK4 puwmod01 13,392 RT_TASK5 canrdr01 9,360 NR_TASK djpegv2data4 535,332
real- time ! non- real- time !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l evaluation ¡metrics:
l EH ¡: ¡execution ¡time ¡of ¡TLB ¡miss ¡exception ¡handlers l ET ¡: ¡execution ¡time ¡of ¡an ¡evaluated ¡task l a ¡ratio ¡of ¡the ¡execution ¡time ¡of ¡TLB ¡miss ¡exception ¡
l evaluate ¡the ¡average ¡and ¡maximum ¡value
l evaluated ¡task
l RT_̳TASK1(ttsprk01)
ü constant ¡input ¡value, ¡which ¡maximizes ¡the ¡execution ¡time
l RT_̳TASK1 ¡with ¡random ¡input ¡value ¡and ¡RT_̳TASK1 ¡to ¡RT_̳TASK5 ¡with ¡
random ¡input ¡value ¡(omitted ¡in ¡this ¡paper...)
l average ¡execution ¡time ¡of ¡each ¡TLB ¡miss ¡
l 16.9 ¡microseconds 8
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l execution ¡time ¡distribution ¡and ¡metrics ¡value
9
1 10 100 1000 10000 3130 3150 3170 3190 3210 3230 3250 3270 3290 3310 3330 3350 3370 3390 発 生 頻 度 実行時間 ( 回) ( μ秒)
each TLB miss exception: about 17 microsecond ! no TLB miss ! measured WCET : 15 TLB misses ! maximum metrics value : 8.13 % ! average metrics value : 2.91 % !
Execution time ! Frequency !
(microseconds) ! (times) !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l TLB ¡locking
l makes ¡a ¡specified ¡TLB ¡entry ¡not ¡to ¡be ¡replaced
ü inhibits ¡the ¡occurrence ¡of ¡TLB ¡misses
l assigns ¡a ¡normal ¡entry ¡of ¡TLB ¡as ¡a ¡locked ¡entry
ü after ¡locked ¡entry ¡is ¡released, ¡that ¡can ¡be ¡used ¡as ¡normal ¡one
l implemented ¡in ¡an ¡RTOS ¡(on ¡SH7750R ¡processors)
ü some ¡of ¡ARM ¡processors ¡implement ¡in ¡hardware
l proposed ¡TLB ¡locking ¡methods
l reduce ¡TLB ¡misses ¡while ¡a ¡real-‐‑–time ¡task ¡is ¡running ¡ l improve ¡the ¡WCET ¡of ¡a ¡real-‐‑–time ¡task 10
TLB ! can not be replaced ! can be replaced ! normal entry ! locked entry !
ASID ! virtual page ! attribute ! physical page ! 1 ! 0x80100 RX, Non-Shared ! 0x80100 … ! … ! … ! … 2 ! 0xc0200 RW, Non-Shared ! 0xc0200 1 ! 0xc0f00 RW, Shared ! 0xc0f00 … ! … … ! … 1 ! 0x80108 RX, Non-Shared ! 0x80108
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l locks ¡the ¡target ¡TLB ¡entries ¡during ¡system ¡
l these ¡entries ¡remain ¡locked ¡while ¡system ¡is ¡running
11
RT_TASK ! NR_TASK !
time ! TLB !
Normal Entry ! Locked Entry for RT_TASK !
used only RT_TASK !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l locks ¡the ¡target ¡TLB ¡entries ¡when ¡a ¡job ¡of ¡a ¡
l released ¡entries ¡can ¡be ¡used ¡as ¡normal ¡entries
TLB ¡misses ¡while ¡NR_̳TASK ¡is ¡running ¡can ¡be ¡less ¡than ¡static ¡ locking ¡method execution ¡time ¡of ¡RT_̳TASK ¡can ¡be ¡increased, ¡because ¡of ¡TLB ¡ locking ¡and ¡releasing ü prepare ¡a ¡table ¡for ¡locked ¡TLB ¡entries ¡instead ¡of ¡a ¡page ¡ table ¡walk
12 RT_TASK ! NR_TASK ! time ! TLB ! Normal Entry ! Locked Entry for RT_TASK ! TLB lock, or release lock TLB entries ! release locked entries ! NR_TASK can use all TLB entries !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l an ¡entry ¡which ¡indicates ¡the ¡same ¡virtual ¡page ¡as ¡
l different ¡TLB ¡entries ¡indicates ¡the ¡same ¡virtual ¡page: ¡exception
l static ¡locking ¡method: ¡invalidate ¡all ¡TLB ¡entries
l invalidation ¡has ¡little ¡impact ¡on ¡subsequent ¡TLB ¡misses l invalidate ¡all ¡entries ¡by ¡one ¡memory ¡access ¡(to ¡memory ¡
l Dynamic ¡locking ¡method: ¡invalidate ¡not ¡all ¡TLB ¡
l invalidation ¡has ¡much ¡impact ¡on ¡entire ¡TLB ¡misses 13
Normal Entry ! Locked Entry ! ASID ! 1 ! … ! 2 ! virtual page ! … ! 0x80100 … ! … … ! 0xc0200 ! … ! 1 ! 0xc0100 … ! TLB ! 1 ! 0x80f00 … !
if not invalidate ... !
ASID ! 1 ! … ! 2 ! virtual page ! … ! 0x80100 … ! … … ! 0xc0200 ! … ! 1 ! 0x80100 … ! TLB ! 1 ! 0x80f00 … !
different entries indicates the same virtual page ! lock VP = 0x80100 (ASID = 1) ! exception occurs !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l invalidates ¡only ¡TLB ¡entries ¡related ¡to ¡locked ¡
l does ¡not ¡invalidate ¡unrelated ¡entries ¡ l invalidation ¡processes ¡are ¡increased ¡by ¡the ¡number ¡of ¡
14
Normal Entry ! Locked Entry ! ASID ! 1 ! … ! 2 ! virtual page ! … ! 0x80100 … ! … … ! 0xc0200 ! … ! 1 ! 0xc0100 … ! TLB ! 1 ! 0x80f00 … ! invalidation ! ASID ! … ! 2 ! virtual page ! … ! … … ! 0xc0200 ! … ! 1 ! 0x80100 … ! TLB ! 1 ! 0x80f00 … ! ASID ! … ! 2 ! virtual page ! … ! … … ! 0xc0200 ! … ! 1 ! 0xc0100 … ! TLB ! 1 ! 0x80f00 … ! TLB locking !
iterate this process for each locked entry ! lock VP = 0x80100 (ASID = 1) ! search and invalidate entry for VP = 0x80100 (ASID = 1) !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l invalidate ¡all ¡TLB ¡entries
l saves ¡all ¡TLB ¡entries ¡to ¡memory ¡before ¡invalidation l restores ¡all ¡TLB ¡entries ¡from ¡memory ¡when ¡locked ¡entries ¡are ¡
ü TLB ¡entries ¡for ¡NR_̳TASK ¡are ¡not ¡expired ü saving ¡and ¡restoring ¡all ¡entries ¡can ¡be ¡increase ¡the ¡response ¡time
15 Normal Entry ! ASID ! 2 ! … ! 2 ! virtual page ! … ! 0x80200 … ! … … ! 0xc0200 ! … ! 1 ! 0xc0100 … ! TLB ! 2 ! 0x80202 … ! invalidate all entries ! ASID ! virtual pgae ! … ! 1 ! 0x80100 … ! TLB ! 1 ! 0x80f00 … ! ASID ! virtual page ! … ! TLB ! TLB locking ! Locked Entry ! Normal Entry !
ASI D ! 2 ! … ! 2 ! 仮想ページ番号 ! … 0x80200 … … … 0xc0200 ! … 1 ! 0xc0100 … 2 ! 0x80202 …copy of entries ! ! save entries ! restore entries ! TLB locking ! ! TLB releasing ! ! ASID ! 2 ! … ! 2 ! virtual page ! … ! 0x80200 … ! … … ! 0xc0200 ! … ! 1 ! 0xc0100 … ! 2 ! 0x80202 … ! in main memory !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l apply ¡proposed ¡methods ¡to ¡the ¡micro-‐‑–benchmark l evaluation ¡items
1.
2.
3.
l apply ¡TLB ¡locking ¡to
➔ 16 ¡pages ¡are ¡locked
➔ 49pages ¡are ¡locked
16
ERTL Embedded and Real-Time systems Lab.
Nagoya University
1 10 100 1000 10000 3130 3150 3170 3190 3210 3230 3250 3270 3290 3310 3330 3350 3370 3390 発 生 頻 度
数 目 盛
TLBロッ ク 未適用 TLBロッ ク 適用
( 回) ( μ秒)
l execution ¡time ¡distribution ¡and ¡metrics ¡value
l all ¡TLB ¡locking ¡methods ¡can ¡get ¡rid ¡of ¡TLB ¡misses ¡for ¡RT_̳TASK
17
improve the impact of TLB misses: 8.13 % !
Execution time ! Frequency !
(microseconds) ! (times) !
average and maximum metrics value: 0 %
w/o TLB locking ! w/ TLB locking !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l dynamic ¡method ¡II ¡is ¡effective ¡if ¡locked ¡pages ¡are ¡more
ü threshold ¡is ¡52 、 、 、 、
18
200 400 600 800 1000 1200 1 6 11 16 21 26 31 36 41 46 51 56 61 66 処 理 時 間 ページ数
TLBミ ス例外処理 動的ロッ ク 手法① 動的ロッ ク 手法②
( μ秒)
save and restore all entries: 268 microseconds ! gradients: increase 9.6 microseconds / page ! gradients: increase 4.2 microseconds / page ! gradients: increase 17 microseconds / page !
Execution time !
(microseconds) ! TLB miss exception ! dynamic method I ! dynamic method II !
Number of pages !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
19
2 4 6 8 10 12 14 16 0.96 0.97 0.98 0.99 1 1.01 1.02 1.03 1.04 1.05 1.06 1.07 なし 静的 動的① 動的② 相 対 比
ス 回 数
対 比
間
ク 手法
TLBミ ス回数 応答時間 実行時間
− static ¡locking ¡method
ü decrease ¡response ¡time ¡because ¡decrease ¡execution ¡time ¡of ¡RT_̳TASK1
locked ¡page ¡is ¡more
− dynamic ¡locking ¡method
、 、saving ¡and ¡restoring ¡TLB ¡entries ¡are ¡effective ¡for ¡execution ¡of ¡NR_̳TASK
0.2 0.4 0.6 0.8 1 1.2 0.995 0.996 0.997 0.998 0.999 1 1.001 1.002 1.003 1.004 なし 静的 動的① 動的② 相 対 比
ス 回 数
対 比
間
ク 手法
apply to RT_TASK1 (lock 16 pages) ! apply to all RT_TASKs (lock 49 pages) ! * vertical axis indicates ratio to w/o TLB locking ! relative time ratio ! relative time ratio ! relative TLB miss ratio ! relative TLB miss ratio !
Number of TLB misses ! response time ! execution time !
TLB locking method !
w/o lock ! w/ static method ! w/ dynamic method I ! w/ dynamic method II !
TLB locking method !
w/o lock ! w/ static method ! w/ dynamic method I ! w/ dynamic method II !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l evaluate ¡the ¡impact ¡of ¡TLB ¡misses ¡on ¡WCETs
l TLB ¡misses ¡can ¡have ¡a ¡considerable ¡impact ¡on ¡WCETs ¡
l propose ¡the ¡TLB ¡locking ¡methods
l improve ¡WCETs ¡of ¡real-‐‑–time ¡tasks
l static ¡method ¡and ¡2 ¡dynamic ¡methods ¡are ¡proposed
l Future ¡Works
l the ¡impact ¡of ¡TLB ¡misses ¡and ¡proposed ¡methods ¡should ¡
l methods ¡to ¡select ¡locked ¡entries ¡should ¡be ¡considered
20
21
ERTL Embedded and Real-Time systems Lab.
Nagoya University
22
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l implementation ¡in ¡hardware
l a ¡TLB ¡miss ¡is ¡handled ¡by ¡hardware
l format ¡of ¡page ¡table ¡is ¡defined ¡by ¡hardware
l TLB ¡controls ¡by ¡software ¡are ¡limited
l adopted ¡by ¡ARM, ¡SPARC ¡V8 ¡architecture
l implementation ¡in ¡software
l a ¡TLB ¡miss ¡is ¡handled ¡by ¡software
l format ¡of ¡page ¡table ¡is ¡freedom, ¡and ¡TLB ¡can ¡be ¡
l adopted ¡by ¡SH, ¡MIPS ¡architechture 23
ERTL Embedded and Real-Time systems Lab.
Nagoya University
24
.data_app1 .bss_app1 ! .data_app2 .bss_app2 ! .text_app1 .rodata_app1 ! .text_shared .rodata_shared ! application 1 ! application 2 ! RW, Non-Shared ! RX, Shared ! RW, Non-Shared ! RX, Non-Shared ! RX, Shared !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l paging ¡virtual ¡address ¡space ¡(32 ¡bit)
l page ¡size ¡is ¡1KB, ¡4KB, ¡64KB ¡or ¡1MB
l TLB
l instruction ¡TLB ¡(ITLB) ¡: ¡4 ¡entries, ¡fully ¡associative
l shared ¡TLB ¡(UTLB): ¡64 ¡entries, ¡fully ¡associative
l UTLB ¡controlled ¡by ¡
l LDTLB ¡instruction
➔ each ¡memory ¡access ¡increments
l access ¡to ¡memory ¡mapped ¡TLB
25 MMUCR ! 0 ! 63 ! PTEH ! PTEL ! URC ! LDTLB ! n ! : ! : ! UTLB !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l TLB ¡locking ¡process
l invalidate ¡the ¡same ¡virtual ¡page ¡entry ¡in ¡TLB
ü stop ¡CPU ¡exception
l modify ¡MMUCR
ü MMUCR.URB ¡configures ¡area ¡where ¡URC ¡is ¡ranged
l load ¡page ¡table ¡entry ¡to ¡UTLB
ü set ¡PTEH, ¡PTEL ¡and ¡MMUCR.URC ¡and ¡issue ¡LDTLB ¡ instruction
l data ¡and ¡code ¡for ¡TLB ¡locking ¡are ¡in ¡TLB-‐‑–
l special ¡virtual ¡address ¡space
l interrupt ¡and ¡exception ¡is ¡
26
UTLB ! URB !
0 ! ! : ! (n-1) ! ! n ! ! : !63 ! !
URC is ranged in this area ! Locked Entry ! Normal Entry !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
27
ERTL Embedded and Real-Time systems Lab.
Nagoya University
28
entry ! TLB flush ! exit ! complete TLB locking ? ! disable int ! enable int ! save ASID ! restore ASID and set MMUCR.URC to 0 YES ! set a page table entry to PTEH and PTEL ! set MMUCR.URB and MMUCR.URC LDTLB instruction NO !
modify locked area !
the target page ! invalidate all TLB entries !
critical section !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l lock l release
29
entry ! invalidate TLB entry ! exit ! complete TLB lock ? ! disable int ! enable int ! save ASID ! restore ASID and set MMUCR.URC to 0 YES ! set a page table entry to PTEH and PTEL ! set MMUCR.URB and MMUCR.URC LDTLB instruction NO ! entry ! disable int ! enable int ! exit ! set MMUCR.URB to 0 !
each entry for locked page is invalidated ! release all locked entries !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l lock l release
30
entry ! disable int ! enable int ! exit ! set MMUCR.URB to 0 ! restore all TLB entries ! entry ! TLB flush ! exit ! complete TLB lock ? ! disable int ! enable int ! save ASID ! restore ASID and set MMUCR.URC to 0 YES ! set a page table entry to PTEH and PTEL ! set MMUCR.URB and MMUCR.URC LDTLB instruction NO ! save all TLB entries !
invalidate all TLB entries ! saving TLB ! restoring TLB !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l measure ¡execution ¡time ¡from ¡entry ¡of ¡TLB ¡miss ¡
31
500 1000 1500 2000 2500 16.5 17.0 17.5 18.0 18.5 19.0 発 生 頻 度 実行時間 ( 回) ( μ秒)
Execution time ! Frequency !
(microseconds) ! (times) !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l RT_̳TASK1 ¡with ¡random ¡inputs
l average: ¡10.21%, ¡maximum: ¡36.91% 32
10 20 30 40 50 60 70 80 90 6 12 18 24 30 36 42 48 54 60 影 響 度 入力値セッ ト 番号 平均影響度 最大影響度 ( %)
average: 11.01 % maximum: 76.28 %
execution time is several hundreds microseconds ! ID of execution ! metrics value !
(%) !
execution time is several thousand microseconds !
average value ! maximum value !
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l Conclusion ¡in ¡this ¡evaluation
l TLB ¡locking ¡is ¡efficient ¡for ¡improvement ¡on ¡WCETs l static ¡locking ¡method ¡is ¡effective ¡if ¡the ¡number ¡of ¡locked ¡
l dynamic ¡locking ¡method ¡II ¡is ¡effective ¡if ¡the ¡number ¡of ¡
33 method WCET
execution efficiency less pages more pages less pages more pages static locking ○ ○ ○ △ × dynamic locking I ○ ○ △ △ △ dynamic locking II ○ × △ ○ ○
ERTL Embedded and Real-Time systems Lab.
Nagoya University
l Cache ¡miss ¡and ¡cache ¡lock ¡[1][2][3][4][5] l Page ¡fault ¡[6] l TLB ¡miss ¡[7]
34
[1] Isabelle Puaut and David Decotigny. Low-Complexity Algorithms for Static Cache Locking in Multitasking Hard Real-Time Systems. [2] Antonio Marti Campoy, Isabelle Puaut, Angel Perles Ivars, and Jose Vicente Busquets Mataix. Cache Contents Selection for Statically-Locked Instruction Caches: An Algorithm Comparison. [3] Heiko Falk, Sascha Plazar, and Henrik Theiling. Compile-time decided instruction cache locking using worst-case execution paths. [4] Tiantian Liu, Minming Li, and Chun Jason Xue. Minimizing WCET for Real-Time Embedded Systems via Static Instruction Cache Locking. [5] Antonio Marti Campoy, Angel Perles Ivars, Francisco Rodriguez, and Jose Vicente Busquets
[6] Isabelle Puaut and Damien Hardy. Predictable Paging in Real-Time Systems: A Compiler Approach. [7] CHEN Chang-Jiu and CHENG Wei-Min. Reducing the TLB Context Switching Miss Ratio With Banked and Prefetching Mechanism.