2011年2009级《操作系统》-Test1-试题及答案.doc

2011年2009级《操作系统》-Test1-试题及答案.doc

  1. 1、本文档共10页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
2011年2009级《操作系统》-Test1-试题及答案

北京邮电大学2011--2012学年第一学期 计算机科学与技术学院(09405-08408) “Operating Systems” Test(1) 1. (10 points) Describe the principle of signals Answers: Unix、Linux等操作系统提供的一种基于事件驱动的进程间通信机制。 当系统内发生某种特定事件时,OS将产生1个信号,并以信号方式通知特定进程;当进程收到信号后,将转入内核态下的信号处理程序,以响应所发生的事件,对其进行处理。 2. (10 points) Describe the principle of pipe-based inter-process communications. Answer: 是一种OS提供的基于共享文件的进程间通信方式。 2个需要进行通信的进程共享1个称为管道的文件,发送方通过执行“写文件”系统调用向管道中写入数据,接收方通过“读文件”系统调用从管道中读取数据,传递的数据为无格式字节流,由此实现2个进程间数据量通信。 OS提供了管道的创建/打开/关闭/读写等原语。 或(书上):相互通信进程由1个共享文件——管道连接。 管道是用于连接读进程和写进程、实现它们之间通信的软件,向管道提供输入的发送进程以字符流形式将数据批量写入管道,接收进程从管道中读取数据。 3. (25 points) In a computer system, the users submit to the system their computational tasks as jobs, and all these jobs are then stored as the standby jobs on the disk. The job scheduler (also known as long-term scheduler) selects the standby jobs on the disk, creates new processes in memory for them, and then starts executing these processes. Each job’s ID is the same as that of the process created for it, for example, Ji and Pi. When the number of concurrent processes in memory is lower than three, the job scheduler takes the FCFS algorithm to select a standby job on the disk to create a new process. Otherwise, the processes should wait in the disk. For the processes in memory, the process scheduler (also known as short-term scheduler) takes the non-preemptive priority-based algorithm to select a process and allocates the CPU to it. It is assumed the system costs resulting from job and process scheduling are omitted. Consider the following set of Jobs J1, J2, J3 , J4 and J5. For 1≤ i ≤5, the arrival time of each Ji , the length of the CPU burst time of each process Pi, and the priority number for each Ji/Pi are given as below, and a smaller priority number implies a higher priority. Job Arrival Time Burst Time Priority Number (minute) J1 14:00 40 4 J2 14:20 30.01 2

文档评论(0)

yan698698 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档