可以首先安装里面的README.txt复制文件后使用
2024-04-18 19:20:49 1.28MB
1
Linux内核完全注释》,作者:赵烔 PDF格式,非扫描版,可搜索。 免费,欢迎下载!
2024-04-18 17:13:31 5.38MB linux内核 完全注释
1
Linux内核完全注释V3 0 pdf》 + Linux 0 11注释源码 + Linux 0 12 源码 这是由赵炯所写的 是Linux 内核开发来说相当不错的书籍 附带有注释的0 11源码 还有原生没注释的0 12源码 可以在source inside中对照查看 方便查找 对于学习内核是相当有帮助的 参考源码示例: 0 11注释 "schedule " is the scheduler function This is GOOD CODE There probably won"t be any reason to change this as it should work well in all circumstances ie gives IO bound processes good response etc The one thing you might take a look at is the signal handler code here NOTE Task 0 is the "idle" task which gets called when no other tasks can run It can not be killed and it cannot sleep The "state" information in task[0] is never used "schedule "是调度函数 这是个很好的代码 没有任何理由对它进行修改 因为它可以在所有的 环境下工作(比如能够对IO 边界处理很好的响应等) 只有一件事值得留意 那就是这里的信号 处理代码 注意 任务0 是个闲置 "idle" 任务 只有当没有其它任务可以运行时才调用它 它不能被杀 死 也不能睡眠 任务0 中的状态信息"state"是从来不用的 void schedule void { int i next c; struct task struct p; 任务结构指针的指针 check alarm wake up any interruptible tasks that have got a signal 检测alarm(进程的报警定时值) 唤醒任何已得到信号的可中断任务 从任务数组中最后一个任务开始检测alarm for p &LAST; TASK; p > &FIRST; TASK; p if p { 如果任务的alarm 时间已经过期 alarm<jiffies 则在信号位图中置SIGALRM 信号 然后清alarm jiffies 是系统从开机开始算起的滴答数(10ms 滴答) 定义在sched h 第139 行 if p >alarm && p >alarm < jiffies { p >signal | 1 << SIGALRM 1 ; p >alarm 0; } 如果信号位图中除被阻塞的信号外还有其它信号 并且任务处于可中断状态 则置任务为就绪状态 其中" BLOCKABLE & p >blocked "用于忽略被阻塞的信号 但SIGKILL 和SIGSTOP 不能被阻塞 if p >signal & BLOCKABLE & p >blocked && p >state TASK INTERRUPTIBLE p >state TASK RUNNING; 置为就绪(可执行)状态 } this is the scheduler proper: 这里是调度程序的主要部分 while 1 { c 1; next 0; i NR TASKS; p &task;[NR TASKS]; 这段代码也是从任务数组的最后一个任务开始循环处理 并跳过不含任务的数组槽 比较每个就绪 状态任务的counter(任务运行时间的递减滴答计数)值 哪一个值大 运行时间还不长 next 就 指向哪个的任务号 while i { if p continue; if p >state TASK RUNNING && p >counter > c c p >counter next i; } 如果比较得出有counter 值大于0 的结果 则退出124 行开始的循环 执行任务切换(141 行) if c break; 否则就根据每个任务的优先权值 更新每一个任务的counter 值 然后回到125 行重新比较 counter 值的计算方式为counter counter 2 + priority [右边counter 0 ] for p &LAST; TASK; p > &FIRST; TASK; p if p p >counter p >counter >> 1 + p >priority; } switch to next ; 切换到任务号为next 的任务 并运行之 } 0 12 "schedule " is the scheduler function This is GOOD CODE There probably won"t be any reason to change this as it should work well in all circumstances ie gives IO bound processes good response etc The one thing you might take a look at is the signal handler code here NOTE Task 0 is the "idle" task which gets called when no other tasks can run It can not be killed and it cannot sleep The "state" information in task[0] is never used void schedule void { int i next c; struct task struct p; check alarm wake up any interruptible tasks that have got a signal for p &LAST; TASK ; p > &FIRST; TASK ; p if p { if p >timeout && p >timeout < jiffies { p >timeout 0; if p >state TASK INTERRUPTIBLE p >state TASK RUNNING; } if p >alarm && p >alarm < jiffies { p >signal | 1<< SIGALRM 1 ; p >alarm 0; } if p >signal & BLOCKABLE & p >blocked && p >state TASK INTERRUPTIBLE p >state TASK RUNNING; } this is the scheduler proper: while 1 { c 1; next 0; i NR TASKS; p &task;[NR TASKS]; while i { if p continue; if p >state TASK RUNNING && p >counter > c c p >counter next i; } if c break; for p &LAST; TASK ; p > &FIRST; TASK ; p if p p >counter p >counter >> 1 + p >priority; } switch to next ; }">《Linux内核完全注释V3 0 pdf》 + Linux 0 11注释源码 + Linux 0 12 源码 这是由赵炯所写的 是Linux 内核开发来说相当不错的书籍 附带有注释的0 11源码 还有原生没注释的0 12源码 可以在source inside中对照查看 方便查找 对于学习 [更多]
2024-04-18 17:11:19 7.5MB V0.12 Linux
1
直接在目录下加入这个包就可以解决 直接在目录下加入这个包就可以解决 直接在目录下加入这个包就可以解决
2024-04-18 15:37:30 14.27MB linux
1
linux 上tuexdo 开启tux_snmpd
2024-04-18 11:59:10 57KB linux tux_snmpd
1
【汇编作业】使用寄存器操作从外部存储器地址0x4000 3000处开始依次存放48个字数据(数值为0,1,2,3…47),之后将保存的数据复制至地址0x4000 4000处,自行设计汇编代码并提交实验报告(需包含运行时寄存器与存储器关键截图与汇编代码)。
2024-04-17 17:09:00 23KB linux 课程资源
1
Linux的lvm2磁盘管理工具,所有依赖包的离线包。亲测可用,已在生产环境安装,并配置管理数据盘。压缩包内包含自动化执行脚本,执行可以格式化/dev/vdc磁盘,并自动挂载到/data目录,服务器重启不掉线
2024-04-17 15:42:42 3.14MB lvm2 Ubuntu 离线安装包 磁盘管理工具
1
httpd 2.4.57 相关的所有rpm包
2024-04-17 15:18:25 9.53MB linux
1
Linux下打包发布QT程序,并运行在其他没有安装QT环境或多个QT环境的linux系统上
2024-04-17 10:53:11 2KB linux
1
在ARM平台上移植linux操作系统--论文.doc
2024-04-17 07:18:15 576KB
1