ImageVerifierCode 换一换
格式:DOC , 页数:49 ,大小:103.50KB ,
资源ID:14567091      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/14567091.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(操作系统课程设计试验报告格式Word下载.doc)为本站会员(b****2)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

操作系统课程设计试验报告格式Word下载.doc

1、. . . . .指导教师评阅成绩:XXX1: 实验项目一项目名称:实验目的:实验时间:人员分工:实验环境:实验环境的搭建过程、选用的操作系统、机器配置、编译器等。实验内容:对实践过程的详细说明,针对已经满足的实践要求,采用了何种算法或思想,对Nachos平台的哪些代码进行了什么样的修改。实验结果:对实践要求的满足程度,代码是否编写完成,是否调试通过,能否正常运行,本项目的要求中共满足了哪几项。参考文献:实验项目二实验项目名称:Nachos中的线程管理实验项目目的:1.最多能够同时存在128个用户线程 2.改变为遵循“优先级调度”的抢占式调度 参与人员及分工:乔心轲,何赵平,康小芳完成主要代码

2、编写;崔蓉,张文进行程序的测试及维护。n Nachos: Not Another Completely Heuristic Operating Systemn Linuxn Gcc n Windows1.对于最多能够同时存在128个用户线程,我们在Thread.cc中声明了一个static变量numOfThreads;具体代码如下:static int numOfThreads = 0;/the count of the threads在Thread的构造函数中对其值进行加1;即每创建一个线程时,都会把numOfThreads加1;+numOfThreads; 并在SimpleThread()

3、中进行了如下修改,完成了最多能够同时存在128个用户线程。static voidSimpleThread(int which) if(numOfThreads128) for(inti=0;icurrentThread-Time()-(kernel-executeTime)+2;i+) cout * thread whichexecuteTime times.n;coutpriority Priority()Yield(); elseif(count = 0) printf(The number of the threads can not be larger than 128!);kerne

4、l- count+; 为了实现遵循“优先级调度”的抢占式调度策略,首先为Thread增加了三个变量:executeTime;time;priority在Thread.h中对它们的声明:public: Thread(char* debugName);/ initialize a Thread Thread(); / deallocate a Thread/ NOTE - thread being deleted/ must not be running when delete / is called int executeTime;/The time that this thread has e

5、xecuted / basic thread operation void setExTime(int exT);/set the executeTime of the thread to exT int Time();/return the time that the thread should be served void setTime(int t);/set the time that the thread should be served to t void setPriority(int pri); /set the priority of the thread to priint

6、 Priority(); /return the priority of the thread private: / some of the private data for this class is listed above int time; / the time that the thread should be served int priority; /the priority of each thread在Thread.cc中的实现:Thread:Thread(char* threadName) name = threadName; stackTop = NULL; stack

7、= NULL; status = JUST_CREATED; for (int i = 0; i interrupt;Scheduler *scheduler = kernel-scheduler;IntStatus oldLevel;DEBUG(dbgThread, Forking thread: name f(a): (int) func SetLevel(IntOff); scheduler-ReadyToRun(this);/ ReadyToRun assumes that interrupts / are disabled! (void) interrupt-SetLevel(old

8、Level); +numOfThreads; /-/Thread:setExTime/ set the executeTime of the thread to exTvoidsetExTime(int exT) executeTime = exT;setPriority/ set the priority of the thread to prisetPriority(int pri) priority=pri;Priority/ return the priority of the threadintPriority() return priority;/ set the time of the thread to t

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1