- 194
- 0
- 约1.31万字
- 约 5页
- 2016-10-16 发布于贵州
- 举报
操作系统练习题全)
答案仅供参考
1.How does the distinction between kernel mode and user mode function as a rudimentary form of protection (security) system? (内核态和用户态作为保护系统有什么区别)
答:内核态和用户态的区别有以下方式,某些指令只有当CPU处于内核态时才可以执行。同样地,某些硬件设备只有当程序在内核态下执行才能够被访问。只有在CPU处于内核态时,才能够控制中断。因此,CPU处于用户态时的能力有限,从而强制保护关键资源。Which of the following instructions should be privileged? (下列哪个指令是受保护的)
a. Set value of timer.设置计时器的值
b. Read the clock.读时钟
c. Clear memory.清除内存
d. Issue a trap instruction.解决一个陷阱指令
e. Turn off interrupts.关中断
f. Modify entries in device-status table.修改设备状态表中的条目
g. Switch from user to kernel mode.从用户态转到内核态
h. Access I/O device.访问I/O设备
答:受保护的:a、c、e、f、h,剩下的可以在用户态执行。
3.Why should an application programmer prefer programming according to an API rather than invoking actual system call? (为什么应用程序设计者更喜欢根据API编程)
答:使用AP的一个好处可以支持相同API系统实际系统比API更加API调用和与其关的着很强的相关性
4. What resources are used when a thread is created? How do they differ from those used when a process is created? (当线程创建时需要哪些资源,当进程创建时又需要哪些)
答:因为一个线程小于一个创建线程资源一般比创建进程少。创建一个需要分配控制块(PCB)一个相当大的数据结构包括了内存文件和变量。分配和管理通常是最费时的活动。一个用户或内核线程包括小的数据结构来堆栈优先。
Suppose that the following processes arrive for execution at the times indicated. Each process will run the listed amount of time. In answering the questions, use preemptive scheduling and base all decisions on the information you have at the time the decision must be made?(考点:调度算法)
Process Arrival Time Burst Time
P1 0 8
P2 1 4
P3 2 9
P4 3 5
What is the average turnaround time for these processes with the preemptive SJF scheduling algorithm(抢占、最短作业优先调度算法)?
答:甘特图:
P1 P2 P4 P1 P3 0 1 5 10 17 26
平均等待时间=((10-1)+ 0 +(17-2)+(5-3))/4=6.5ms
6. Consider the following snapshot(快照)of a system:(考察银行家算法)
allocation max available Need P1 (0,0,1,2) (0,0,1,2) (2,1,0,0) (0,0,0,0) P2 (2,0,0,0) (2,7,5,0) (0,7,5,0) P3 (0,0,3,4) (6,6,5,6) (6,6,2,2) P4 (2,3,5,4) (4,3,5,6) (2
您可能关注的文档
- 执业医师操作考内容.doc
- 执业药师中药综考试试题.doc
- 执信2013高语文期中测试.doc
- 扶持人口较少民发展规划.doc
- 扭曲的几何:球上的世界观.doc
- 扎头发近100-非常漂亮.doc
- 承台施工技术交(卡羊大桥).doc
- 承德医学院200年工作任务分解二○一○年四月.doc
- 托福词汇词根整之secut, sequ跟随.docx
- 承台、系梁施工术交底.doc
- 2025-2026学年天津市和平区高三(上)期末数学试卷(含解析).pdf
- 2025-2026学年云南省楚雄州高三(上)期末数学试卷(含答案).pdf
- 2025-2026学年甘肃省天水市张家川实验中学高三(上)期末数学试卷(含答案).docx
- 2025-2026学年福建省厦门市松柏中学高二(上)期末数学试卷(含答案).docx
- 2025-2026学年广西钦州市高一(上)期末物理试卷(含答案).docx
- 2025-2026学年河北省邯郸市临漳县九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省石家庄二十三中七年级(上)期末历史试卷(含答案).docx
- 2025-2026学年海南省五指山市九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省唐山市玉田县九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省邢台市市区九年级(上)期末化学试卷(含答案).docx
原创力文档

文档评论(0)