北京邮电大学2009年操作系统期末试卷

合集下载

全国2009年4月高等教育自学考试 操作系统试题 课程代码02326

全国2009年4月高等教育自学考试 操作系统试题 课程代码02326

全国2009年4月高等教育自学考试操作系统试题课程代码:02326一、单项选择题(本大题共20小题,每小题1分,共20分)在每小题列出的四个备选项中只有一个是符合题目要求的,请将其代码填写在题后的括号内。

错选、多选或未选均无分。

1.使用户能按名存取辅助存储器上的信息主要是由操作系统中______实现的。

()A.文件管理B.处理器管理C.设备管理D.存储管理2.操作系统在结构设计时追求的目标之一是:应尽量减少与硬件直接有关的程序量,且将其独立封装。

这个目标称为()A.正确性B.高效性C.维护性D.移植性3.下面有关安全保护措施的叙述中,不正确...的是()A.系统启动时,硬件置中央处理器的初态为管态B.如程序占用一个连续的主存空间,则硬件设置“基址寄存器”和“限长寄存器”以实现存储保护C.允许用户修改“基址寄存器”和“限长寄存器”的值D.在目态下执行用户程序时,对访问主存的地址要进行核查4.系统调用的目的是()A.请求系统服务B.终止系统服务C.申请系统资源D.释放系统资源5.进程具有三个特性,不属于...进程特性的是()A.动态性B.同步性C.并发性D.异步性6.中断优先级是按中断事件的重要性和紧迫程度来确定的,是在硬件设计时固定的。

一般情况下优先级最高的是()A.自愿中断B.外部中断C.输入/输出中断D.硬件故障中断7.不属于...批处理作业调度原则的是()浙02326#操作系统试题第 1 页共7 页A.公平性B.极大的流量C.使某类作业先调度D.平衡资源使用8.在实时系统中采用的进程调度算法是()A.时问片轮转调度算法B.最高优先级调度算法C.先来先服务调度算法D.分级调度算法9.在采用多道程序设计技术的系统中,用户编写程序时使用的地址是()A.相对地址B.物理地址C.绝对地址D.主存地址10.让多个用户作业轮流进入内存执行的技术称为()A.覆盖技术B.对换技术C.移动技术D.虚存技术11.采用页式存储管理的系统中,若地址用16位表示,其中7位表示页号,则页的大小为()A.0.5KB B.1KBC.2KB D.4KB12.虚拟存储器的最大容量()A.由内存和外存容量之和决定B.由虚拟地址结构的位数决定C.由计算机地址总线的位数决定D.由作业的地址空间决定13.在操作系统提供的文件系统中,用户把信息组织成文件并对其操作时,关于文件存储位置和如何组织输入/输出等工作,正确的说法是()A.用户需要考虑文件存储的物理位置,并组织输入输出工作B.用户不需要考虑文件存储的物理位置,也不需要组织输入输出工作C.用户需要考虑文件存储的物理位置,但不需要组织输入输出工作D.用户不需要考虑文件存储的物理位置,但需要组织输入输出工作14.在UNIX中,目录本身也是文件,对目录文件的存取权限有()A.执行、增删、读B.增删、读、写C.读、写、执行D.写、执行、增删15.假设读写磁头正在55号柱面上操作,现有依次请求访问的柱面号为100、185、39、124、16。

09下操作系统试参考答案(A卷)

09下操作系统试参考答案(A卷)

西华大学课程考核参考答案(A卷)评分标准:选对一项得1分,不选或选错得0分,本大题共20小题,每小题1分,总计20分参考答案:1、B2、A3、C4、A5、D6、C7、B8、D9、D 10、A11、C 12、C 13、A14、D 15、D 16、D 17、C 18、B 19、B 20、C二、判断题(正确的划“√”,错误的划“×”,每小题1分,共10分)评分标准:答对一项得1分,不答或答错得0分,参考答案:1、×2、×3、√4、√5、×6、×7、×8、×9、×10、√三、填空题(每空1分,共20分)评分标准:答对一项得1分,不答或答错得0分,参考答案:1、进程2、PCB或进程控制块3、临界资源,临界区4、还有可用资源,等待进程5、碎片6、最坏适应7、起始地址,段表,段内地址8、资源不足,进程推进不合理9、SPOOLing技术,独占设备10、核心态或管态,用户态或目态11、抖动现象或颠簸现象12、页号,页内地址四、简答题(共20分)参考答案及评分标准:1、(共6分)(1)作业调度是宏观调度,它决定了哪一个作业能进入主存。

进程调度是微观调度,它决定各作业中的哪一个进程占有中央处理机。

(3分)(2)作业调度是选符合条件的收容态作业装入内存。

进程调度是从就绪态进程中选一个占用处理机。

(3分)2、(共4分)资源静态分配策略要求每个进程在开始执行前申请所需的全部资源,仅在系统为之分配了所需的全部资源后,该进程才开始执行。

(2分)这样,进程在执行过程中不再申请资源,从而破坏了死锁的四个必要条件之一“占有并等待条件”,从而防止死锁的发生。

(2分)3、(共5分)常用的文件物理结构有顺序结构,链接结构,索引结构和I节点结构(每个1分),顺序结构不适于随机存取。

(1分)4、(共5分)进程管理(处理机管理)、存储管理、文件管理、作业管理和设备管理(每个1分)五、综合题(30分)答题要点及评分标准:第一小题共有5个要点,答对一个得2分,答错或未答得0分,参考答案:1、(共10分)响应比=1+作业等待时间/运行时间9:10时,作业1运行完成,其它作业也到达。

2009上学期操作系统考试试卷A(参考答案)

2009上学期操作系统考试试卷A(参考答案)

操作系统考试试卷参考答案一、单项选择题(每小题1分,共15分)1.A 2.B 3.D 4.D 5、B6.B 7.A 8.A 9.B 10.D11.D 12.A 13.D 14.C 15.D二、判断题(认为正确的叙述填T,认为错误的填F。

每题1分,共10分)1.T 2.F 3.F 4.F 5、T6.F 7.F 8.F 9.F 10、F三、填空题(每空1分,共15分)1.字节多路通道、数组选择通道、数组多路通道2.分时、实时、批处理3.并发,共享4.记录式,字符流式5.计算时间短,等待时间长。

6. 成组链接法7.程序,命令四、简答题(每小题小分见对应题头,共30分)1.(4分)答:资源静态分配策略要求每个进程在开始执行前申请所需的全部资源,仅在系统为之分配了所需的全部资源后,该进程才开始执行。

(2分)这样,进程在执行过程中不再申请资源,从而破坏了死锁的四个必要条件之一"占有并等待条件",从而防止死锁的发生。

(2分)2.(4分)答:可抢占式会引起系统的开销更大。

(2分)可抢占式调度是严格保证任何时刻,让具有最高优先数(权)的进程占有处理机运行,因此增加了处理机调度的时机,引起为退出处理机的进程保留现场,为占有处理机的进程恢复现场等时间(和空间)开销增大。

(2分)(注:不写空间开销也可。

)3.(4分)答:系统能为进程P3分配二台打印机。

因为尽管此时10台打印机已分配给进程P1 4台,P22台和P34台,全部分配完,但P3已分配到所需要的全部4台打印机,它不会对打印机再提出申请,所以它能顺利运行下去,能释放占用的4台打印机,使进程P1,P2均可能获得乘余的要求4台和5台,按银行家算法是安全的。

4.(4分)答:内零头是指分区内无法利用的内存碎片;外零头是指分区间无法被利用的小分区;5.(6分)以上4分以上分析2分6.(8分)答:(每答对一小问给2分)1):50〉段长40,故发生越界中断。

计算机操作系统期末测试题及答案解析(两套)

计算机操作系统期末测试题及答案解析(两套)

操作系统期末试题1一、单项选择题(每题2分,共20分)1.在操作系统中,进程的最基本的特征是( A )。

A. 动态性和并发性 B.顺序性和可再现性C.与程序的对应性 D.执行过程的封闭性2.为了使系统中各部分资源得到均衡使用,就必须选择对资源需求不同的作业进行合理搭配。

这项工作是由( A )完成的。

A.作业调度 B. 进程调度C.用户自己D.管理人员3.虚拟存储器给用户提供了特大的地址空间。

实际上它是( C )。

A. 扩大物理内存容量 B.扩大物理外存容量C. 扩大逻辑内存容量 D.扩大逻辑外存容量4.引入缓冲技术的主要目的是( C )。

A. 改善用户编程环境 B.提高CPU的处理速度C.提高CPU与设备之间的并行程度 D.降低计算机的硬件成本5.在微内核结构的现代操作系统中,进程( A )。

A. 只是资源分配的单位 B.只是调度运行的单位C.既是资源分配的单位,又是调度运行的单位 D.失去作用6. (A)没有多道程序设计的特点。

A.dosB.unixB.windows D.os/27. 下列四个操作系统中,是分时系统的为(C)。

A.cp/mB.ms-dosC.unixD.windows nt8. 在分时系统中,时间片一定,(B),响应时间越长。

A.内存越多B.用户数越多C.后备队列D.用户数越少9. 用户要在程序一级获得系统帮助,必须通过(D)。

A.进程调度B.作业调度C.键盘命令D.系统调用10. 操作系统是一组(C)。

A.文件管理程序B.中断处理程序C.资源管理程序D.设备管理程序二、判断题(选择你认为正确的叙述划√,认为错误的划×并说明原因。

每题2分,共10分)1.用户程序应与实际使用的物理设备无关,这种特性就称作与设备无关性。

( )2.处理机调度可分为三级:高级、中级和低级。

在所有的系统中,都必须具备这三级调度。

( )3.信号量机制是一种有效的实现进程同步与互斥的工具。

信号量只能由PV 操作来改变。

2009年4月全国高等教育考试网络操作系统试题

2009年4月全国高等教育考试网络操作系统试题

2009年4月全国高等教育考试网络操作系统试题一、单项选择题(本大题共20小题,每小题2分,共40分)在每小题列出的四个选项中1.操作系统是【B】A.对应用程序进行管理的软件B.对计算机资源进行管理的软件C.对硬件进行管理的软件D.对信息进行管理的软件解析:(P1)操作系统是控制和管理计算机系统的硬件和软件资源、合理地组织计算机工作流程以及方便用户的程序集合。

2.下列不属于程序中断原因的是【A】A.执行访管指令B.非法指令C.浮点运算溢出D.地址越界解析:(P4)在计算机系统中,中断可分为如下几类:(1)I/O中断。

这是外部设备完成了预定的I/O操作或在I/O操作中出错引起的中断。

(2)程序中断。

这是由程序中的错误引起的中断。

例如程序中使用了非法指令、浮点运算溢出、地址越界等。

(3)硬件故障中断,或称机器检验中断。

这是因为机器故障或机器故障导致出错引起的中断。

例如电源失效、内存奇偶校验错、通道故障以及处理机硬件出错等。

(4)外中断。

外中断来自外部信号,这些信号可能来自其它机器。

外中断还包括时钟中断、来自键盘的中断键.(5)访管中断。

在机器指令中一般都包含一条或几条访管指令,当机器执行到访管指令时会产生访管中断。

3.按Flynn分类法,多处理机系统属于【A】A. MIMD系统B. MISD系统C. SIMD系统D. SISD系统解析:(P23)Flynn分类法把计算机分为四类:(1)单指令流单数据流(SISD)。

它是传统的单处理器计算机。

(2)单指令流多数据流(SIMD)。

其代表性的例子是阵列处理机。

(3)多指令流单数据流(MISD)。

这类系统很少见。

(4)多指令流多数据流(MIMD)。

它是实现作业、任务、指令、数据各级全面并行的多处理机系统。

紧耦合的、松耦合的多处理机系统以及多计算机系统都属于MIMD。

4.下面不是多计算机操作系统结构设计主要模式的是【C】A.对象B.对称多处理C.管理D.客户/服务器解析:(P34)多计算机操作系统结构设计的主要模式有:(1)客户/服务器模式;(2)对象模式;(3)对称多处理模式。

统考操作系统(2009-2012)试题及精心解析

统考操作系统(2009-2012)试题及精心解析
2362H:P=2,访问快表 10ns,因初始为空,访问页表 100ns 得到页框号,合成物理地
5 / 21
王道论坛()组织名校高手精心解析,请珍惜我们的劳动成果! 址后访问主存 100ns,共计 10ns+100ns+100ns=210ns。
1565H:P=1,访问快表 10ns,落空,访问页表 100ns 落空,进行缺页中断处理 108ns, 访问快表 10ns,合成物理地址后访问主存 100ns,共计 10ns+100ns+108ns+10ns+100ns=100 000 220ns。
(1)依次访问上述三个虚地址,各需多少时间?给出计算过程。 (2)基于上述访问序列,虚地址 1565H 的物理地址是多少?请说明理由。
3 / 21
王道论坛()组织名校高手精心解析,请珍惜我们的劳动成果!
2009 年计算机统考——操作系统部分解析
一、单项选择题
23.D。考查并行性的限定。 单处理器系统中只有一条指令流水线,一个多功能的操作部件,每个时钟周期只能完成 一条指令,故进程与进程显然不可以并行。 24.D。考查几种基本的调度算法概念。 高响应比优先调度算法,同时考虑每个进程的等待时间和需要的执行时间,从中选出响 应比最高的进程投入执行。响应比 R 定义如下:响应比 R=(等待时间+执行时间)/执行时间。 25.C。考查死锁的条件。 这种题用到组合数学中鸽巢原理的思想,考虑最极端情况,因为每个进程最多需要 3 台打印机,如果每个进程已经占有了 2 台打印机,那么只要还有多的打印机,那么总能满足 达到 3 台的条件,所以,将 8 台打印机分给 K 个进程,每个进程有 2 台打印机,这个情况 就是极端情况,K 为 4。 26.A。考查分区分配存储管理方式的保护措施。 分区分配存储管理方式的保护措施是设置界地址寄存器。每个进程都有自己独立的进程 空间,如果一个进程在运行时所产生的地址在其地址空间之外,则发生地址越界,即当程序 要访问某个内存单元时,由硬件检查是否允许,如果允许则执行,否则产生地址越界中断, 由操作系统进行相应处理。 27.C。考查分段存储管理系统。 段地址为 32 位二进制数,其中 8 位表示段号,则段内位移占用 32 位-8 位=24 位二进 制数,故最大段长为 224B。 28.B。考查文件物理结构的特性。 随机访问是索引结构的特性。 29.A。考查磁盘的调度算法。 类似于电梯调度的思想。首先,磁头选择与当前磁头所在磁道距离最近的请求作为首次 服务的对象(110),当磁头沿途相应访问请求序列直到达到一端末(110,170,180,195), 再反向移动响应另一端的访问请求(68,45,35,12)。 30.A。考查文件控制块的内容。 在文件控制块中,通常含有以下三类信息,即基本信息、存取控制信息及使用信息。 31.B。考查软/硬链接建立的属性。 建立符号链接(软链接)时,引用计数值直接复制;建立硬链接时,引用计数值加 1。 删除文件时,删除操作对于符号链接是不可见的,这并不影响文件系统,当以后再通过符号 链接访问时,发现文件不存在,直接删除符号链接;但是对于硬链接则不可以直接删除,引 用计数值减 1,若值不为 0,则不能删除此文件,因为还有其他硬链接指向此文件。 32.A。考查系统调用的设备标识。 用户程序对 I/O 设备的请求采用逻辑设备名,而在程序实际执行时使用物理设备名。

北邮2009信号与系统期末试题及答案

北邮2009信号与系统期末试题及答案

——4 分
= 2e−tu(t) − δ (t) + e−tu(t) = 3e−tu(t) − δ (t)
解法二:
(1)
R1 ( s )
=
Rzi (s) +
E1(s)H (s)
=
s
2 +1
——2
分,
R2 (s) = Rzi (s) + E2 (s)H (s) = 1 ——2 分,
E1 ( s )
=
1 s
πt 2.(6 分)
共 4 页第 1 页
⎧⎪⎪⎨λλ12
= =
−3λ1 −2λ2
+ +
2λ2 λ3
+
λ3
⎪⎪⎩λ3 = −λ3 + e ( t )
每个 1 分,共 3 分
r
(
t
)
=
[1,
0,
0]
⎡ ⎢ ⎢
λ1 λ2
⎤ ⎥ ⎥
——1 分
⎢⎣λ3 ⎥⎦
3、(6 分)
H
(
s)
=
⎛ ⎝⎜
s
1 +
1
⎞ ⎠⎟
共 4 页第 3 页
r3(t ) = 3e−tu(t ) − δ (t ) ——2 分
试题六:(10 分)
( ) (1)Y (z) 1 + z−1 = X (z) ——2 分 H (z) = Y (z) = z ——1 分 X(z) z +1
h(n) = ( −1)n u(n) ——1 分 不稳定——1 分
4
h(n) = 1 [δ (n) + δ (n − 1) + δ (n − 2) + δ (n − 3)] ——1 分,

操作系统期末试卷A(05民本)1

操作系统期末试卷A(05民本)1

第 1 页 共 4 页 计算机工程系 2008—2009学年第一学期期末考试 《操作系统原理》试卷考试时间:120分钟 考试方式:闭卷 班级 专业 姓名 学号一、单选题(本大题共15题,每小题2分,共30分。

) 1、在分页存储管理系统中,从页号到物理块号的地址映射是通过( )实现的。

A.段表B.页表C.PCBD.JCB 2、文件的保密是指防止文件被( ) A.篡改 B.破坏 C.窃取 D.删除 3、在以下的文件物理存储组织形式中,( )常用于存放大型的系统文件。

A.连续文件 B.串连文件 C.索引文件 D.多重索引文件 4、设备的打开、关闭、读、写等操作是由( )完成的。

A.用户程序 B.编译程序 C.设备分配程序 D.设备驱动程序 5、在计算机系统中,控制和管理各种资源、有效地组织多道程序运行的系统软件称作( )。

A.文件系统 B. 操作系统 C. 网络管理系统 D. 数据库管理系统 6、多个进程的实体能存在于同一内存中,在一段时间内都得到运行。

这种性质称作进程的( )。

A. 动态性 B. 并发性 C. 调度性 D. 异步性 7、进程控制块是描述进程状态和特性的数据结构,一个进程( )。

A.可以有多个进程控制块 B.可以和其他进程共用一个进程控制块 C. 可以没有进程控制块 D.只能有惟一的进程控制块8、通常,用户编写的程序中所使用的地址是()。

A.逻辑地址B.物理地址C.绝对地址D.内存地址9、引入缓冲技术的主要目的是()。

A.改善用户编程环境B.提高CPU的处理速度C.提高CPU与设备之间的并行程度D.降低计算机的硬件成本10、产生系统死锁的原因可能是由于()A.进程释放资源B.一个进程进入死循环C.多个进程竞争,资源出现了循环等待D.多个进程竞争共享型设备11、请求分页存储管理中,若把页面尺寸增加一倍,在程序顺序执行时,则一般缺页中断次数会()。

A.增加B.减少C.不变D.可能增加也可能减少12、死锁有四个必要条件,预先分配策略是使其中的()。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

北京邮电大学2008——2009学年第一学期《操作系统》期末考试试题(A)1.FILL IN BLANKS (10 points)1.1 A _trap___ is a software-generated interrupt caused either by an error or by a specific request from a user program that an operating-system services be performed.1.2 A ______ is used in Unix systems to notify a process that a particular event has occurred.1.3 To manage the process executing, OS records the state and other information (e.g. the priority) of the process in .1.4 The scheduling criteria include CPU utilization, throughput, turnaround time, waiting time, and response time .1.5 For n concurrent processes that mutual exclusively use some resources, the code segmentations, in which the processes access the resources, are called deadlock .1.6. The ___visual memory___ scheme enables users to run programs that are larger than actual physical memory, this allows the execution of a process that is not completely in memory.1.7. The __FIFO___ page replacement algorithm associates with each page the time when that page was brought into memory. When a page must be replaced, the oldest page is chosen.1.8The file system resides permanently on , which is designed to hold a large amount of data permanently.1.9The file system itself is generally composed of many different levels, including the logical file system, the file-organization module, theand the I/O control.1.10 T he kernel’s I/O subsystem provides numero us services. Among these are I/O scheduling, , caching, spooling, device reservation, and error handling, and name translation.2.CHOICE ( 10 points )2.1 _____ operating systems have well defined, fixed time constraints. Processing must be done within the defined constrains, or the system will fail.A. MultimediaB. Real-timeC. ClusteredD. Network2.2 Which one of the following OS is implemented based on microkernel structure? _____A. Ms-DOSB. UNIXC. MachD. Linux2.3Considering m processes, which mutual exclusively use the resource type A of n instances (m>n). A semaphore S is designed to synchronize these processes. The maximum and minimal values are respectively.A. n, -m + nB. m, -m + nC. m, nD. n, -m2.4Here are some statements about processes and threads,i)The thread is the basic unit of memory allocation for program execution in computer systems.ii) For process state transitions, the migration from waiting to running is impossibleiii) When CPU switch from process to process, the contents of CPU registers are not saved in PCBiv) An I/O-bound process spends more of its time doing I/O operation than it spends doing computation., the correct descriptions are :A. i), ii)B. ii), iv)C. i), iii)D. iii), iv)2.5With respect to the following descriptions about CPU scheduling,i) the Round Robin scheduling is fit for the interactive systems.ii) with respect to the throughput for a given set of processes, SJF is optimal.iii) the preemptive priority algorithm is starvation-free, guaranteeing that no process waits indefinitely for service.iv) medium-term scheduling is responsible for process swapping., the wrong statements areA. i), ii)B. iii), iv)C. i), iv)D. ii), iii)2.6Considering the following statements,i) the Banker Algorithm is used for deadlock prevention, applicable to thesystems with multiple instances of each resources.ii) the monitor is the high-level construct for process synchronization, and is characterized by shared variables and a set of programmer-defined operations on the shared variables.iii) the current value of a counting semaphore S is -3, then there are 3 process waiting in the queue relevant to S.iv) denying the mutual-exclusion condition is a good choice for deadlock prevention., the correct descriptions are :A. i), ii) , iv)B. ii), iii), iv)C. ii), iii)D. i), iii)2.7 There are many solutions to satisfy a request of size n from a list of free holes. One way is _____. It allocates the first hole that is big enough. Searching can start either at the beginning of the set of holes or where the previous search ended.A. best fitB. worst fitC. last fitD. first fit2.8 Which of the following structures is in memory_____A. The boot control blockB. The per file FCBC. The system open-file tableD. The directory structure per file system2.9 Which of the following operations does not deal with the data block ofa file? _____A. readB. writeC. closeD. delete2.10 I/O Buffering is used for the following reason except_______A. cope with a speed mismatch between the producer and consumer of a data stream.B. adapt between devices that have different data-transfer size.C. support copy semantics for application I/O.D. improve the transfer rate of I/O devices.3ESSAY QUESTIONS (20 points)3.1 List the five basic functions of OS. (5 points)3.2 Consider the following page table:(5 points)The page size is 1024 bytes. What are the physical addresses for the following logical addresses?(1) 230 (2) 40943.3 Consider a paging system with the page table stored in memory.a. If a memory reference takes 500 time unit, how long does it take to access an instruction or data in a page that has been paged into memory?b. If we add TLB (translation look-aside buffers), and 70 percent of all page-table entries can be found in the TLB, what is the effective memory access time?(Assume that finding a page-table entry in the associative registers takes 20 time unit, if the entry is there.) (5 points)3.4 According to the following figure, answer the following questions:(1) How many blocks are there in the file test?(2) How to access the 100th byte in block 2 (A logical block number is an index relative to the beginning of the file, so the first logical block is block 0)?(5 points)4. Consider the following page-reference string:1,2,3,6,4,7,3,2,1,4,7,5,6,5,2,1How many page faults would occur for the LRU replacement algorithms,assuming that there are four frames available for each process in the system, and all frames are initially empty. (10 Points)5. 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 selects 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, J i and P i.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 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 J i , the length of the CPU burst time of each process P i, and the priority number for each J i/P i are given as below, and a smaller priority number implies a higher priority.Job Arrival Time Burst Time Priority Number(minute)J114:00 40 4J214:20 30.01 2J314:30 50.01 3J414:50 20.01 5J515:05 10.01 5(1)Illustrate the execution of each job/process by charts.(2)What is the turnaround time of each job?(3)What is the waiting time of each job?Note: The waiting time of a job includes the time it waits on the disk and that it waits in memory.(20 Points)6. As illustrated in the figure, on two sides of a one-plank bridge(独木桥), there are two groups of soldiers that are composed of m and n people respectively need to cross the bridge, but the narrow bridge allows only one group of the soldiers in the same direction to cross at the same time. One group of the soldiers is permitted to cross as long as there are no people on the bridge. Once one group of the soldiers begins walking on the bridge, the other group should be waiting to start crossing until all members of the first group have passed the bridge.Please design two semaphore-based processes to describe the crossing actions of the soldiers in the two groups. It is required(1) to define the semaphores and variables needed, explain their roles?, andgive their initial values; and(2) to illustrate the structures of processes for the soldiers in each group. (15 Points)7. Consider the following snapshot of a system(1) Fill in the contents of the matrix Need for each process in the space above.(2) Is the system in a safe state? If it is safe, give the safe sequence.(3) If both P1 and P2 make resource requests of <1, 0, 1>, how should we grant the requests while keeping the system in a safe state?(15 Points)。

相关文档
最新文档