操作系统课程设计

22
操操操 操操操操 操操 2012 操 8 操

Upload: elvis-yates

Post on 01-Jan-2016

36 views

Category:

Documents


11 download

DESCRIPTION

操作系统课程设计. 汪芸 2012 年 8 月. 课程设计内容. WRK 平台的安装和调试 基于 WRK 平台 的 同步 / 互斥 实验 基于 WRK 平台的进程工作集实验. 实验时间. 共三周 第 2 周:周一、周三、周五晚 6:30—9:30 第 3 周:周一、周三晚 6:30—9:30 , 周五上午 1-4 节 第 4 周:周一、周三、周五下午 6-9 节. 助教信息. 袁飞飞. WRK 平台的安装和调试. 安装配置 WRK 平台 实现 WRK 平台的联机调试. WRK(1). - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 操作系统课程设计

操作系统课程设计

汪芸2012 年 8 月

Page 2: 操作系统课程设计

课程设计内容

• WRK 平台的安装和调试• 基于 WRK 平台的同步 / 互斥实验• 基于 WRK 平台的进程工作集实验

Page 3: 操作系统课程设计

实验时间

• 共三周• 第 2 周:周一、周三、周五晚 6:30—9:30• 第 3 周:周一、周三晚 6:30—9:30 , 周五上午 1-4 节• 第 4 周:周一、周三、周五下午 6-9 节

Page 4: 操作系统课程设计

助教信息

• 袁飞飞

Page 5: 操作系统课程设计

WRK 平台的安装和调试

• 安装配置 WRK 平台• 实现 WRK 平台的联机调试

Page 6: 操作系统课程设计

WRK(1)

• Windows Research Kernel (WRK)– The WRK packages core Windows XP x64

and Windows Server 2003 SP1 kernel source code with an environment for building and testing experimental versions of the Windows kernel for use in teaching and research.

-6-

Page 7: 操作系统课程设计

WRK(2)

We can use it to:

--- Explore operating system (OS) principles

--- Modify, build, run and test the Windows kernel

--- Better understand the Windows architecture and implementation.

Including:

--- Windows XP x64/Server 2003 SP1 kernel sources

--- An environment for building and testing

-7-

Page 8: 操作系统课程设计

WRK(3)

• Windows XP x64/Server 2003 SP1 kernel sources– Contains the sources for the core Windows (NTOS) kernel:

• Processes• Threads• Virtual memory and cache managers• I/O management• The registry• Executive functions, such as the kernel heap and synchronization• Object manager• Local procedure call mechanism• Security reference monitor• Low-level CPU management (thread scheduling, Asynchronous and

Deferred Procedure calls, interrupt/trap handling, exceptions)

-8-

Page 9: 操作系统课程设计

WRK(4)

– Not include (loaded into kernel mode as dynamic libraries):• The NT Hardware Abstraction Layer• File systems• Network stacks• Device drivers

-9-

Page 10: 操作系统课程设计

WRK(5)

• Use and Restrictions– The WRK, and all the components of the

Windows Academic Program, are for academic, non-commercial use only.

– Users must accept the terms and conditions of the “Microsoft Windows Research Kernel Source Code License” (http://www.microsoft.com/resources/sharedsource/licensing/basics/wrklicense.mspx)

-10-

Page 11: 操作系统课程设计

实验一:基于 WRK 平台的进程同步 / 互斥实验

• 第一部分-- 阅读 WRK 代码,理解 WRK 中同步 / 互斥

的对象管理-- 分析同步对象的释放和 WRK 的调度机制

Page 12: 操作系统课程设计

WRK 中的同步对象

• Dispatcher Object• Signaled state and non-signaled state

Page 13: 操作系统课程设计

同步数据之间的关系

Page 14: 操作系统课程设计

基于 WRK 平台的同步 / 互斥实验

• 第二部分-- 了解 WinDbg 的一些常用命令-- 联机查看一个线程等待的所有同步对象-- 联机查看等待一个同步对象的所有线程

Page 15: 操作系统课程设计

基于 WRK 平台的同步 / 互斥实验

• 第三部分-- 编写“生产者 - 消费者”程序-- 该程序在 WRK 平台下的调试-- 修改 WRK 代码,增加同步 / 互斥数据结构

的输出

Page 16: 操作系统课程设计

实验二:基于 WRK 的进程工作集实验

• 阅读 Windows 源码中工作集管理相关部分• 深入理解工作集和页面置换算法• 修改 Windows 内核中页面置换算法

Page 17: 操作系统课程设计

Windows 系统中的工作集

• 工作集:一个进程当前正在使用的页面的集合

• 进程工作集和系统工作集• Windows 内核对工作集页面的操作 -- 工作集管理器的页面修剪算法 -- 进程的页面置换算法

Page 18: 操作系统课程设计

修改页面置换算法

• 采用碰到有效页面即替换的策略

Page 19: 操作系统课程设计

实验内容

• 搭建实验环境• 源码阅读及算法验证 -- 编写测试程序 -- 查看工作集 -- 验证页面置换算法

Page 20: 操作系统课程设计

评分标准

• 基本要求(占 70% )-- 完成 WRK 系统的安装-- 完成实验一,即进程同步 / 互斥实验• 提高要求(占 22% )-- 完成实验二,即进程工作集实验• 卓越要求(占 8% )-- 完成通过添加系统调用来执行页面置换算

Page 21: 操作系统课程设计

操作系统实验报告规范

• 基本信息:完成人姓名、学号、报告日期• 实验内容• 实验目的• 设计思路和流程图• 主要数据结构及其说明• 源程序并附上注释• 程序运行时的初值和运行结果

Page 22: 操作系统课程设计

操作系统实验报告规范

• 实验体会:实验中遇到的问题及解决过程、实验中产生的错误及原因分析、实验的体会及收获、对做好今后实验提出建设性建议等。

• 实验报告应以书面方式提交,要求做到内容翔实、清晰,层次分明,标题突出。