Linux进程调度
wiki上的关于scheduler的定义:
wiki上的关于scheduler的定义:
Linux2.6.23版本引入了CFS调度器,通过sched_child_runs_first设置是否子进程优先运行, 下面是 SUSE Documentation
近期在进行AIX到Linux迁移,发现从windows终端ftp时,客户端设置ASCII传输模式, 服务端并不能自动转换换行符号,脚本出现^M,需要手工删除。 Linux环境为RedHat7.3+vsftpd3.0.2,vsftpd.conf中ascii_download_enable/ascii_upload_enable 注释
以fork函数为例,看下Linux进程创建具体工作流程:
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)
主动调度与上下文切换
实时进程的调度策略:
本篇主要通过反汇编与GDB两种方式分析函数栈的使用过程。
Linux task_struct 结构中 涉及进程状态的属性有三个,其中进程对应的状态分为两类, 一类是运行中状态, 另一类是进程退出状态。