《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
STM32F103设置为I2C从机,通过中断方式实现I2C数据读写。
2024-04-18 17:06:21 249KB stm32
1
里面包含AVPro Video插件以及使用方法和Video Player组件的使用方法
2024-04-18 16:52:55 52.89MB Video
1
以一个双输入单输出温度控制系统为例,详细叙述应用系统辨识工具箱进行建模、仿真和设计控制系统的过程,包括控制对象的辨识数据采集、模型估算、控制器设计和系统仿真等。重点介绍了系统辨识工具箱图形用户界面的使用方法。
2024-04-18 16:52:53 357KB 自然科学 论文
1
基于STM32F103C8T6的LoRa模块通信,使用ZLG的SX1276方案,SX1276/77/78 收发器主要采用LoRaTM 远程调制解调器,用于超长距离扩频通信,抗干扰性强,能够最大限度降低电流消耗。借助升特的LoRaTM 专利调制技术,SX1276/77/78 采用低成本的晶体和物料即可获得超过-148dBm 的高灵敏度。此外,高灵敏度与+20dBm 功率放大器的集成使这些器件的链路预算达到了行业领先水平,成为远距离传输和对可靠性要求极高的应用的最佳选择。相较传统调制技术,LoRaTM调制技术在抗阻塞和选择性方面也具有明显优势,解决了传统设计方案无法同时兼顾距离、抗干扰和功耗的问题。
2024-04-18 16:52:12 5.65MB stm32 网络 网络
1
emu8086,4.08版,内含注册机和汉化补丁。补丁不完美,亲测会导致win7下退出程序时出错,不过不影响使用过程。xp用户可直接使用debug调试。
2024-04-18 16:51:22 3.7MB emu8086 4.08
1
仿造梦幻西游做的界面,通过java实现,简单易懂
2024-04-18 16:40:31 6.89MB java 梦幻西游
1
车险理赔数据:包含了6w+样本 veh_value: 车辆价值 exposure: 保险时间 clm: 是否发生过索赔(1代表发生过,0代表未发生过) numclaims: 索赔次数 claimcst0: 第一次索赔的费用 veh_body: 车辆类型 veh_age: 车辆年龄 gender: 被保险人性别 area: 地区 agecat: 年龄类别
2024-04-18 16:35:26 2.47MB 数据集
1
本文主要对交流异步电动机SPWM变频调速矢量控制系统进行建模与仿真。变频调速系统在异步电动机的各种调速方式中效率最高、性能最好,因此有着极其重要的地位。电气传动控制系统计算机仿真是应用现代软件工具对其工作特性进行研究的一种十分重要的方法。通过仿真试验,可以比较各种策略与方案,优化并确定相关参数。因此进行系统仿真是不可或缺的,为科学决策提供了可靠的依据。 本文介绍了交流调速系统概况、矢量控制的基本概念以及异步电动机变频调速系统在 MATLAB/Simulink仿真工具中模型建立以及特性研究。一方面,本文通过对交流异步电动机矢量控制调速系统各部分仿真,得出该系统各部分的运行特性;另一方面,通过对转矩内环的转速、磁链闭环矢量控制系统和转差频率控制的异步电动机矢量控制系统的仿真,熟悉了矢量控制系统的参数设置和工作特性。 本文通过仿真实验不仅了解和掌握了异步电动机运行特性,更重要的是得出的仿真数据,为新的实验设备的引进和进一步开发打下了坚实的基础。
2024-04-18 16:33:35 1.34MB matlab 异步电机
1