III
目录
摘要… ……………………………………………………….…………………………..I
ABSTRACT………………….……………………………….. ……………………… .II
第一章 绪论 .....................................................................................................................1
§1.1 选题背景 ...........................................................................................................1
§1.2 国内外研究现状 ...............................................................................................3
§1.2.1 Linux 发展现状 .................................................................................... 3
§1.2.2 VxWorks 发展现状 ...............................................................................4
§1.3 论文组织结构 ..................................................................................................6
第二章 操作系统简介 .....................................................................................................7
§2.1 Linux 操作系统 ................................................................................................ 7
§2.1.1 CSF 算法 ................................................................................................7
§2.1.2 O(1) 调度算法 ...................................................................................... 9
§2.1.3 对内核态抢占的支持 .........................................................................10
§2.1.4 新的锁机制——RCU .........................................................................10
§2.2 VxWorks 操作系统 .........................................................................................12
§2.2.1 调度控制 .............................................................................................12
§2.2.2 互斥操作 .............................................................................................14
§2.2.3 队列库 .................................................................................................15
第三章 实时性指标 .......................................................................................................16
§3.1 实时性能指标简介 ........................................................................................16
§3.1.1 任务切换时间 ......................................................................................16
§3.1.2 任务抢占时间 .....................................................................................17
§3.1.3 信号量混洗时间 .................................................................................17
§3.2 Linux 和VxWorks 的调度机制对比 .............................................................18
§3.2.1 任务调度时机 ......................................................................................19
§3.2.2 任务调度策略 .....................................................................................20
§3.2.3 POSlX 调度接口 ................................................................................. 21
第四章 测试环境的构建 ...............................................................................................22
§4.1 编译内核与内核模块 ....................................................................................22
§4.2 测试工具介绍 ................................................................................................23
§4.3 测试函数的选择 ............................................................................................26
第五章 Linux 信号量的改进 ........................................................................................ 28
§5.1 信号量简介 .....................................................................................................28
§5.2 优先级逆转 ....................................................................................................29
§5.2.1 优先级置顶 .........................................................................................30
§5.2.2 优先级继承 .........................................................................................30
§5.3 信号量的改进 ................................................................................................31
§5.3.1 信号量的创建过程 ..............................................................................32
§5.3.2 信号量的加锁过程 .............................................................................34
§5.4 结果测试 .........................................................................................................40