首页 » cs代写 » 操作系统代写 | Final Exam Spring 2020

操作系统代写 | Final Exam Spring 2020

本次香港代写主要为操作系统相关的限时测试

1. [30 points] Multiple Choices
1. Which statement about deadlock is true?
(A) Every deadlocked process must be part of a cycle in the resource allocation graph.
(B) Even a graph contains no cycles, deadlock could still happen.
(C) We cannot break the deadlock cycle by aborting all deadlocked processes.
(D) Deadlock can never occur if no process is allowed to hold a resource while
requesting another resource.
Answer: D

2. There are 4 processes (P1 to P4) and 2 resources(A and B). Consider the following 2
resource availability situations X and Y, can the request be granted under X and Y?
Current allocation: Current request:
A B A B
P1 1 3 P1 1 2
P2 4 1 P2 4 3
P3 1 2 P3 1 7
P4 2 0 P4 5 1

Availability X:
A B
1 4
Availability Y:
A B
2 4
(A) X can, Y can.
(B) X can, Y cannot.
(C) X cannot, Y can.
(D) X cannot, Y cannot.
Answer: C

3. For single instance per resource type, what happens if the wait-for graph contains a
cycle?
(A) A deadlock might not exist
(B) A deadlock must exists
(C) The system is in a safe state
(D) Either deadlock exists or system is in a safe state
Answer: B

4. Which one of the following is the address generated by the user program?
(A) Virtual address
(B) Physical address
(C) Absolute address
(D) None of the mentioned
Answer: A

5. Thrashing occurs when ______.

(A) when page fault happens
(B) processes frequently access pages not in memory
(C) processes are in waiting state
(D) processes get allocated memory that larger than they request
Answer: B

6. Consider a paging hardware with a TLB. Assume that the entire page table and all the
pages are in the physical memory. It takes 10 nanoseconds to search the TLB and 80
nanoseconds to access the physical memory. If the TLB hit ratio is 0.8, the effective
access time (in nanoseconds) is _________.
(A) 106
(B) 124
(C) 122
(D) 116
Answer: A

7. Which technique can avoid external fragmentation?
(A) Best-fit
(B) Paging
(C) Compaction
(D) None of the mentioned
Answer: B

8. If there are 64 pages, each of size 1Kb (Kilobit), then the logical address should have
______.
(A) 13 bits
(B) 14 bits
(C) 15 bits
(D) 16 bits
Answer: D

9. In the page table, the ______ works as an index.
(A) page number
(B) page offset
(C) frame bit
(D) frame offset
Answer: A

10. Consider this case in page replacement: a program loops over n + 1 pages with a frame
size of n. Which page replacement algorithm performs better?
(A) LRU
(B) FIFO
(C) Randomly select one as victim
(D) All are the same
Answer: C


程序辅导定制C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB


本网站支持 Alipay WeChatPay PayPal等支付方式

E-mail: vipdue@outlook.com  微信号:vipnxx


如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。

blank