当前位置:网站首页>Network equipment hard core technology insider router Chapter 18 dpdk and its prequel (III)
Network equipment hard core technology insider router Chapter 18 dpdk and its prequel (III)
2022-07-27 15:28:00 【User 8289326】
We found that , In these issues , We mentioned repeatedly cache.
Cache refer to CPU Internal cache . This concept is a combination of DRAM At the same time .
Let's review 《 Fundamentals of digital electronic technology 》 in , About RAM Chapter of ——
SRAM Of S, Is static (static) It means , It's also synchronous (Sync) It means . Synchronization refers to ,CPU adopt WR or RD Line direction RAM Send a read-write signal ,RAM Immediately according to Address The address of the line , and Data Line data , Write content to the inside , Or change the internal content from data Line feedback to CPU.SRAM Inside each bit from 6 Transistor composition , As shown in the figure below :
Another kind RAM be called DRAM,D by Dymanic Abbreviation .DRAM Each bit It only needs 1 A transistor , As shown in the figure below :
obviously ,DRAM Than SRAM The cost is low , Low power consumption , High integration .
Mr. Lu Xun pointed out : There are no two sweet sugarcane in the world .DRAM The cost of saving costs and power consumption is ,CPU visit DRAM Time for , About to visit SRAM The time of the 10-100 times .
To make up for it CPU and DRAM Performance loss caused by working speed difference , Engineers are again CPU and DRAM A layer is designed between SRAM, It's called cache (cache).SRAM Its working principle is to use temporal locality and spatial locality .
What is temporal locality ? In short , After a piece of memory is accessed , In the near future , It has a high probability of being visited again , The probability of being visited decreases with time .
such as ,XX Students let A After the technician pinches his feet , Next time, come to the pedicure shop , Still looking A Technicians have a high probability of pinching their feet ……
such as , My little sister let Tony After the teacher does the hairstyle , Next time, come to the barber shop , Still looking Tony The probability of teachers is relatively high ……
What is spatial locality ? In short , After a piece of memory is accessed , Its adjacent memory area also has a relatively high probability of being accessed again , The probability of being visited decreases as the offset increases .
such as ,XX After my classmates went to the foot shop , The probability of going to the health care products store next door is relatively high ……
such as , Little sister has been to Tony After the teacher's barber shop , The probability of going to the milk tea shop next door is relatively high ……
Get down to business . Time locality determines Cache The effectiveness of the mechanism : If the low-speed memory , Just visited the content , Temporarily stored in high-speed memory , that , Because the system has a high probability of accessing these contents next time , This can greatly improve the performance of the system .
And spatial locality determines cache Organization style : If the contents in the low-speed memory , In blocks of a certain size , Stored in high-speed memory , And the storage order is the same , that , Because the system has a high probability of accessing adjacent content , This can also greatly improve the performance of the system .
In red “ In blocks of a certain size ”, It refers to the cache organization we have repeatedly mentioned ——Cacheline.
Cacheline And primary storage through fully associative mapping 、 Direct mapping or group associative mapping .
Fully associative mapping refers to , Any main memory block can be mapped to any cacheline, However, due to the need to introduce CAM The mechanism of , The cost rises sharply .
Direct mapping refers to , Any main memory block , Can only be mapped to one cacheline, If two main memory blocks are mapped to the same cache line, And frequently used , It's going to happen cache ping-pong The phenomenon of .
Group associative mapping is a balanced design mechanism , A main memory block can be stored in a unique Cache Any line in the group . In practice , This method is more common .
Let's get back to the point , stay DPDK in , in the light of Cache Optimization of is the highlight . Starting tomorrow , We are right. DPDK Make a comprehensive introduction .
边栏推荐
- Network equipment hard core technology insider router Chapter 5 tompkinson roaming the network world (Part 1)
- IJCAI 2022杰出论文公布,大陆作者中稿298篇拿下两项第一
- Four kinds of relay schemes driven by single chip microcomputer
- 网络设备硬核技术内幕 路由器篇 19 DPDK(四)
- Tools - common methods of markdown editor
- Leetcode 456.132 mode monotone stack /medium
- Network equipment hard core technology insider router chapter Cisco asr9900 disassembly (I)
- 魔塔项目中的问题解决
- 微信公众平台开发概述
- EMC design scheme of RS485 interface
猜你喜欢
Principle of MOS tube to prevent reverse connection of power supply

Basic usage of kotlin

工具 - markdown编辑器常用方法

Watermelon book machine learning reading notes Chapter 1 Introduction

CAN总线的EMC设计方案

Introduction of the connecting circuit between ad7606 and stm32

Adaptation verification new occupation is coming! Huayun data participated in the preparation of the national vocational skill standard for information system adaptation verifiers

The mobile terminal uses the list component of vantui. When multiple tab items are switched back and forth, the list is loaded many times, resulting in the failure of normal display of data
Comparison of advantages and disadvantages between instrument amplifier and operational amplifier

JUC(JMM、Volatile)
随机推荐
资本频频加码,急于上市的和府捞面有多“疯狂”?
Network equipment hard core technology insider router Chapter 5 tompkinson roaming the network world (Part 1)
After configuring corswebfilter in grain mall, an error is reported: resource sharing error:multiplealloworiginvalues
IJCAI 2022杰出论文公布,大陆作者中稿298篇拿下两项第一
网络设备硬核技术内幕 路由器篇 7 汤普金森漫游网络世界(下)
Network equipment hard core technology insider router Chapter 11 Cisco asr9900 disassembly (V)
JMeter recording interface automation
The first common node of the two linked lists of "Jianzhi offer"
华为鸿蒙模拟器去除顶部导航栏方法
TCC
Notice on printing and distributing the Interim Measures for the administration of green manufacturing pilot demonstration of Shenzhen Bureau of industry and information technology
STM32F10x_ Hardware I2C read / write EEPROM (standard peripheral library version)
RS485接口的EMC设计方案
《剑指Offer》 合并两个排序的链表
Tools - common methods of markdown editor
多线程环境下CountDownLatch的用法
STM32学习之CAN控制器简介
3.3-5v conversion
3D相关的简单数学知识
Reading notes of lifelong growth (I)