File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
docs/high-performance/message-queue Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -401,7 +401,7 @@ emmm,就两个字—— **幂等** 。在编程中一个*幂等* 操作的特
401401
402402### 传统IO方式
403403
404- ![ 3] (C:\Users\lv jiang er hao\Desktop\图库\3 .png)
404+ ![ 3] ( https://img1.imgtp.com/2023/08/15/9DQUZuL7 .png)
405405
406406传统的IO读写其实就是read + write的操作,整个过程会分为如下几步
407407
@@ -424,7 +424,7 @@ mmap(memory map)是一种内存映射文件的方法,即将一个文件或
424424
425425简单地说就是内核缓冲区和应用缓冲区共享,从而减少了从读缓冲区到用户缓冲区的一次CPU拷贝。基于此上述架构图可变为:
426426
427- ![ 4] (C:\Users\lv jiang er hao\Desktop\图库\4 .png)
427+ ![ 4] ( https://img1.imgtp.com/2023/08/15/CHmGd0II .png)
428428
429429基于mmap IO读写其实就变成mmap + write的操作,也就是用mmap替代传统IO中的read操作。
430430
@@ -441,7 +441,7 @@ MappedByteBuffer mappedByteBuffer = fileChannel.map(FileChannel.MapMode.READ_WRI
441441
442442sendfile()跟mmap()一样,也会减少一次CPU拷贝,但是它同时也会减少两次上下文切换。
443443
444- ![ 5] (C:\Users\lv jiang er hao\Desktop\图库\5 .png)
444+ ![ 5] ( https://img1.imgtp.com/2023/08/15/jqLgCEBY .png)
445445
446446
447447
You can’t perform that action at this time.
0 commit comments