东南大学《操作系统》课程作业 第二章

1 - The services and functions provided by an operating system can be divided into two main categories. Briefly describe the two categories, and discuss how they differ.
操作系统有一组服务,用于提供用户功能:例如用户界面、程序执行、文件系统操作;另外,还有一组操作系统服务来确保系统本身运行高效:例如资源分配、保护与安全。

2 - Describe three general methods for passing parameters to the operating system.
最简单的是通过寄存器来传递参数;也可以将参数存在内存的块或者表中,而块或表的地址通过寄存器来传递;参数也可以通过程序放在堆栈,并通过操作系统弹出。

3 - What are the major activities of an operating system with regard to file management?
创建和删除文件;对文件进行打开、读写、重定位、关闭;目录的创建和删除;文件和目录属性的设置和获取;文件的移动和复制;等等。

4 - Would it be possible for the user to develop a new command interpreter using the system-call interface provided by the operating system?
可以。用户可以将命令脚本的功能自行使用系统调用实现。这些功能均可以被用户级的程序进行系统调用完成。

5 - What are the two models of inter-process communication? What are the strengths and weaknesses of the two approaches?
进程间通信有两种基本模型:共享内存和消息传递。共享内存可以快于消息传递,因为消息传递的实现经常采用系统调用,因此需要消耗更多时间以便内核介入。但消息传递对于交换较少数量的数据很有用,因为无需避免冲突。

6 - Why is the separation of mechanism and policy desirable?
对于灵活性,策略与机制的分离至关重要。策略可随时间或地点而改变,若采用了对策略改变不敏感的通用机制,则策略的改变只需要重新定义一些系统参数,增加系统的灵活性。

7 - What is the main advantage of the microkernel approach to system design? How do user programs and system services interact in a microkernel architecture? What are the disadvantages of using the microkernel approach?
微内核系统设计的优点是便于扩展操作系统,所有新服务可在用户空间内增加,不需要修改内核;微内核也提供了更好的安全性和可靠性,因为大多数服务是作为用户进程而不是内核进程来运行的。
微内核的客户端程序和服务之间是通过消息传递来通信的,通信进程通过相互交换消息来传递信息。
遗憾的是,由于增加的系统功能的开销,微内核的性能会受损。

原文地址:https://www.cnblogs.com/zxuuu/p/15628507.html