File tree 1 file changed +21
-4
lines changed
1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -456,7 +456,13 @@ Child: read msg:test
456
456
- 不足:需要同步机制协调数据访问
457
457
458
458
![ w:550] ( figs/shmem.png )
459
-
459
+
460
+
461
+ ---
462
+ #### 共享内存实现机制
463
+
464
+ ![ w:900] ( figs/shm-imp.jpg )
465
+
460
466
461
467
---
462
468
#### 共享内存的系统调用
@@ -468,10 +474,7 @@ Child: read msg:test
468
474
469
475
注:需要信号量等同步机制协调共享内存的访问冲突
470
476
471
- ---
472
- #### 共享内存实现机制
473
477
474
- ![ w:900] ( figs/shm-imp.jpg )
475
478
476
479
477
480
@@ -668,8 +671,22 @@ Signals and Inter-Process Communication https://compas.cs.stonybrook.edu/~nhona
668
671
---
669
672
#### 信号实现机制
670
673
674
+ 为什么需要通过sigreturn切换到用户态正常执行流程?
675
+
676
+ ![ bg right:70% 60%] ( figs/signal-2.png )
677
+
678
+
679
+ ---
680
+ #### 信号实现机制
681
+
682
+ 为什么需要通过sigreturn切换到用户态正常执行流程?
683
+
684
+ - 权限需求:只有内核能安全操作硬件上下文。
685
+ - 安全校验:防止用户态篡改攻击。
686
+
671
687
![ bg right:70% 60%] ( figs/signal-2.png )
672
688
689
+
673
690
---
674
691
675
692
#### 信号应用编程
You can’t perform that action at this time.
0 commit comments