linux-sides-Timers and time management-Introduction
这篇文章 Timers and time management in the Linux kernel. Part 1. 是出自 linux-insides
这篇文章 Timers and time management in the Linux kernel. Part 1. 是出自 linux-insides
sysctl命令可以_实时_(runtime)查看和修改linux 内核参数。这个命令可以在大多数发行版本找到, 另外内核参数,也可以通过procfs 文件系统,在 /proc/sys/kernel下 进行查看和修改。
asm-offset.h 文件 asm-offset.h 文件是在内核编译过程中生成的,生成过程 之前整理了一份笔记 TASK_threadsp的实现及asm-offsets.h, 其中涉及sed处理包含在内核代码 /scripts/Makefile.lib的sed-offsets中,工作是将生成的asm-offset.s转化为asm-offset.h。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 /scripts/Makefile.lib ... # ASM offsets # --------------------------------------------------------------------------- # Default sed regexp - multiline due to syntax constraints # # Use [:space:] because LLVM's integrated assembler inserts <tab> around # the .ascii directive whereas GCC keeps the <space> as-is. define sed-offsets 's:^[[:space:]]*\.ascii[[:space:]]*"\(.*\)".*:\1:; \ /^->/{s:->#\(.*\):/* \1 */:; \ s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ s:->::; p;}' endef ...
Linux 内核的Timer必须要完成两种定时测量(timing measurement)
主动调度与上下文切换
CentOS Linux release 7.5.1804 CoreLinux centosgpt 5.2.0-rc4 1 SMP Sun Jun 16 13:25:49 CST 2019 x86_64 x86_64 x86_64 GNU/Linux
实时进程的调度策略:
本篇主要通过反汇编与GDB两种方式分析函数栈的使用过程。
pid: 进程ID - tid:线程ID - tgid:主线程ID
Linux task_struct 结构中 涉及进程状态的属性有三个,其中进程对应的状态分为两类, 一类是运行中状态, 另一类是进程退出状态。