File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 38
38
(tips:和读写锁相同,多个读者之间可以并行访问,但有读者时,写者不用阻塞等待,可以新申请空间,
39
39
更新后再将原指针替换,具体做法依赖于优雅周期的判断,多个写者之间的同步? TODO)
40
40
41
- 16、解释下uptime命令的输出?具体的计算依据是什么?(CPU run queue中 runnable进程和处于D状态的进程数量)
41
+ 16、解释下uptime命令的输出?具体的计算依据是什么?
42
+ (CPU run queue中 runnable进程和处于D状态的进程数量)
42
43
(tips:计算方式类似于统计时间段内平均值)
43
44
44
45
17、nice命令的作用有哪些?
268
269
91、为什么CPU访问寄存器快于访问内存,因为访问寄存器只需要一个时钟周期,
269
270
而访存需要多个时钟周期才能拿到数据
270
271
272
+ 92、系统级的load数据从哪里来?
273
+ (tips:uptime等工具可以查看当前系统的load,这个数值正比于
274
+ active process 和 处于 uninterruptable状态的进程,
275
+ load = old * e + (1-e)*processes,即也会参考前一次的load数据)
276
+
271
277
// 内存管理 mm
272
278
273
279
1、malloc的实现
632
638
后续访问时,有可能触发缺页中断,进而引发OOM,一个可取的方法就是malloc之后,
633
639
memset
634
640
641
+ 112、共享内存的实现方式有哪几种?
642
+ (tips:
643
+ 1、SYS V 方式 调用 shmget 等方法,接口不友好,
644
+ 使用ipcs命令行工具查看具体mem address
645
+ 2、shmget + mmap
646
+ 3、memcreate_fd)
647
+
635
648
636
649
// 其他
637
650
You can’t perform that action at this time.
0 commit comments