下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、中山大学软件学院2010级软件工程专业(2011春季学期)SE-223操作系统期末试题试卷(B)警 示(考试形式:闭 卷 考试时间: 2小时)中山大学授予学士学位工作细则第六条考试作弊不授予学士学位方向: 姓名: _ 学号: 出卷: 常会友、刘宁、凌应标 复核: 一、 Explain following terms (15pts)1.Interrupt, 2. Process, 3.Virtual Memory, 4.MMU(Memory Management Unit), 5.Thrashing二、 Short Answer(25pts)(1) What is virtual memory?
2、 What is the maximum capacity of the virtual memory?(2) What is address space and storage space?(3) What is file directory and directory file?(4) What is the difference between job scheduling and process scheduling?(5) What is the difference between process and thread?三、 (10 pts)Consider five job A,
3、 B, C, D, E, they almost reach at the same time. Their expected running time is 10min, 6min, 2min, 4min, 8min, respectively. And their corresponding priorities are 3, 5, 2, 1, 4(5 is the highest priority). Foreach of the followingscheduling algorithm,to calculate the turnaround time of each process(
4、Never mind process switching)(1) FCFS with a queue A, B, C, D, E.(5 pts)(2) RR. Time splice is 2min.(5 pts)四、 (13 pts)With the bankers algorithm, consider the following snapshot of a system:resourcesprocessesAllocationA B C DNeedA B C DAvailableA B C DP00 0 3 20 0 1 21 6 2 2P11 0 0 01 7 5 0P21 3 5 4
5、2 3 5 6P30 3 3 20 6 5 2P40 0 1 40 6 5 61. Is the system in a safe state?(6 pts)2. If a request from process P2 arrives for(1, 2, 2, 2), can the request be granted immediately?(7 pts)五、 (10 pts)A system has a demand-page storage management schemes. 1MB main memory is divided into 256 blocks. Each blo
6、ck is 4KB. Consider a job with a following page table:Page numberBlock numberState0240126023203141(State 0 means that the corresponding page is in the memory. State 1 means that not.)1. Given a logical address, 9016(in decimal), to translate into a physical address.(5 pts)2. Given a logical address,
7、 12300(in decimal), to translate into a physical address.(5 pts)六、 (12 pts)In a demand-page storage management system, consider a reference string: 4, 3, 2, 1, 4, 3, 5, 4, 3, 2, 1, 5.(1) Calculate page fault queue and page fault ratio using FIFO with 4 frames.(6 pts)(2) Calculate page fault queue an
8、d page fault ratio using LRU with 4 frames.(6 pts)七、 Please select and answer ONE of the following two questions1. (15 pts)Consider a file system using direct index and indirect index. There are 10 pointers of disk blocks in a files inode. The first 8 of these pointers are the direct block pointers,
9、 and the next 2 pointers point to the indirect blocks (a single indirect block and a double indirect block). Each pointer is 4 bytes size. Each block is 2KB size.(1) How many bytes does the largest file in this file system occupy under this method (excluding the block of the inode of the file)?(5 pt
10、s)(2) Give a file with 128MB size, calculate how many bytes does this file occupy actually (excluding the block of the inode of the file)?(10 pts)2. (15 pts) Consider some processes share a data area. Some processes (reader) of them just read this data area, and the others of processes update this d
11、ata area. A solution for synchronizing tthese processes is shown as below.void writer() while(true) P(wsem); WRITEUNIT(); V(wsem); void main() readcount=0; parbegin(reader(), writer();/* program reader_and_writer */int readcount; semaphore x=1,wsem=1; void reader() while(true) P(x); readcount+; if (readcount=1) P(wsem); v(x); READUNIT(); P(x); readcount-; if (readcount=0) V(wsem); V(x); (1) Demostrat
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024-2030年全球与中国空调压缩机电机行业发展现状及趋势预测分析研究报告
- 2024-2030年全球与中国油份浓度计行业发展现状及趋势预测分析研究报告
- 2024-2030年全球与中国振动沥青压实机行业应用态势及盈利前景预测报告
- 2024-2030年全球与中国化学抛光液行业竞争态势与供需前景预测研究报告
- 2024-2030年全氟酮行业市场现状供需分析及市场深度研究发展前景及规划投资研究报告
- 2024年色浆基体树脂项目发展计划
- 2024-2030年光学和听觉信号设备行业市场现状供需分析及市场深度研究发展前景及规划投资研究报告
- 2024-2030年储水箱行业市场现状供需分析及重点企业投资评估规划分析研究报告
- 2024-2030年信息技术行业市场深度分析及竞争格局与投资价值研究报告
- 2024-2030年保健旅游产业市场深度分析及发展趋势与投资战略研究报告
- 《呼吸衰竭的诊治》课件
- 传媒公司与艺人协议
- 单位廉洁自律培训课件
- 血液透析过敏反应的护理查房课件
- 健身房发展研究报告
- 安全宣传合同
- 手术操作技能培训的系统化与评估
- 2023生技CNC培训教案内容课件
- 第三单元一《伐檀》公开课一等奖创新教案-【中职专用】(中职语文高教版2023-2024-基础模块上册)
- 腰椎骨折护理查房护士长总结发言
- 在竞争中成长-关于合理竞争主题班会课件
评论
0/150
提交评论