作者Nexus5566 (Nexus5566)
看板TransCSI
标题[问题] Privileged instruction、Deadlock
时间Mon Feb 1 11:12:21 2016
这两题出自中兴103年资管所计概考题,不知道是自己基本功差还是题目含糊
总有些不确定...
a privileged instruction may be executed only while the hardware is
in kernel mode. Which of the following statments is LEAST likely to
be a privileged instruction?
(A) An instruction that sends output to a printer
(B) An instruction that modifies a memory management register
(C) An instruction that halts the CPU
(D) An instruction that resets the computer's time-of-day clock
(E) An instruction that reads the computer's time-of-day clock
据我所知privileged instruction是指那些容易造成系统危险的指令,
因此要在kernel mode执行,通常对硬体进行操作的指令都是特权指令
这题我是猜E,不知道判断有无错误
-----------------------------------------------------------
which of the following statements is not the method to remove a deadlock:
(A) Resource-allocation graph algorithm can be used to detect the deadlock
(B) Require each process to requect all its resoureces at one time.
(C) Convert nonsharable resources into sharable resources.
(D) Terminate all processes involved in the deadlock.
(E) Terminate processes one by one until the deadlock is broken.
这题D、E是移除死结的方法,而B、C则是预防的方法,A为避免死结的方法之一
某补教名师在鼎茂卖的解答写(B),说明是写"允许每一行程申请其所有需要资源,
则可能发生deadlock",据我所知(B)不会发生死结,只有可能发生starvation
如果要我选的话,可能会选(A),这演算法好像只用於single instance的情况
不知道有无错误,烦请各位指点
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 39.8.4.123
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/TransCSI/M.1454296343.A.B1D.html
※ 编辑: Nexus5566 (39.8.4.123), 02/01/2016 14:25:01
1F:推 ccpz: 第一题你的想法应该没错,只有那个不会改变系统状态 02/02 08:56