当前位置:网站首页>MMAP learning
MMAP learning
2022-07-05 21:40:00 【51CTO】
MMAP

Virtual process address space (vm_area_struct) And virtual kernel address space (vm_struct) All mapped to the same physical memory space . When Client End and Server When the client sends data ,Client( As a data sender ) Start with your own process space IPC Communication data copy_from_user Copy to kernel space , and Server End ( As a data receiver ) Share data with the kernel , No longer need to copy data , It's through the offset of the memory address space , You can get the memory address , The whole process only takes place one memory copy . In general , need Client Copy the end process space to the kernel space , Then copy from kernel space to Server Process space , There will be two copies .
For process and kernel virtual address mapping to the same physical memory operation occurs at the data receiving end , The data sender still needs to copy the data in user mode to kernel mode . Here we are , Why not map the sender and receiver directly to the same physical space , That way, even one copy operation is not needed ,0 The second copy operation is related to Linux Shared memory of standard kernel IPC There's no difference in mechanism , For shared memory, though efficient , However, the problem of multi process synchronization is complex , And the pipes / Message queuing, etc IPC It needs to be copied 2 two , Low efficiency .
Here is a rough flow chart :
边栏推荐
- Clickhouse copy paste multi line SQL statement error
- Efficiency difference between row first and column first traversal of mat data types in opencv
- Realize the function of verifying whether the user has completed login when browsing the page
- Objects in the list, sorted by a field
- Incentive mechanism of Ethereum eth
- How to send samples when applying for BS 476-7 display? Is it the same as the display??
- Golang(1)|从环境准备到快速上手
- Yolov5 training custom data set (pycharm ultra detailed version)
- Cold violence -- another perspective of objective function setting
- 场景化面试:关于分布式锁的十问十答
猜你喜欢

2.2.5 basic sentences of R language drawing

MySQL 千万数据量深分页优化, 拒绝线上故障!

让开发效率飞速提升的跨端方案

How to prepare for the algorithm interview and answer the algorithm interview questions

Making global exception handling classes with aspect

Li Kou ----- the maximum profit of operating Ferris wheel

2022-07-03-cka- latest feedback from fans

Sorting out the problems encountered in MySQL built by pycharm connecting virtual machines

R language learning notes

Add ICO icon to clion MinGW compiled EXE file
随机推荐
123456
Sorting out the problems encountered in MySQL built by pycharm connecting virtual machines
Environment configuration problem record
资深电感厂家告诉你电感什么情况会有噪音电感噪音是比较常见的一种电感故障情况,如果使用的电感出现了噪音大家也不用着急,只需要准确查找分析出什么何原因,其实还是有具体的方法来解决的。作为一家拥有18年品牌
2.2.5 basic sentences of R language drawing
Which securities company is better and which platform is safer for stock account opening
Yolov5 training custom data set (pycharm ultra detailed version)
QML reported an error expected token ";", expected a qualified name ID
[case] Application of element display and hiding -- element mask
Kingbasees v8r3 cluster maintenance case -- online addition of standby database management node
Robot framework setting variables
[daily training] 729 My schedule I
办公遇到的问题--
华为快游戏调用登录接口失败,返回错误码 -1
SQL knowledge leak detection
DBeaver同时执行多条insert into报错处理
Analysis and test of ModbusRTU communication protocol
Huawei fast game failed to call the login interface, and returned error code -1
Realize the function of verifying whether the user has completed login when browsing the page
leetcode:1139. The largest square bounded by 1