心得分享

Card image cap

鄧同學 報告/作業 分享經驗 06/11/2015 11/06 OS 作業

06/11/2015 11/06 OS 作業
名稱 11/06 OS 作業
日期 12/11/2015
課程名稱 作業系統
指導教師 劉艾華

1. I think the suitable situation to use message passing is when you are going to exchange smaller amounts of data. The benefits of using message passing are it is easier to implement than shared memory for inter-computer communication. Message can be exchange directly or indirectly through mailbox. Programmer has a complete control, but if you use shared memory, the benefits are it allows maximum speed and convenience of communication. You could be sure about the location you’re writing, because you won’t write to the same location simultaneously.
The disadvantages by using shared memory is there might be a problem between the areas of protection and synchronization in the processes sharing memory, while the disadvantage in using message passing is programmer have to do everything. It might be slower than shared-memory.

2. System calls is provide the interface between a running program and the operating system. The purpose of system calls is system calls allow user-level processes to request services of the operating system.
3. At one extreme, a system administrator can use it to modify a copy of the source code of the operating system. The operating system then is completely compiled. Data declarations, initialization, and constants, along with conditional compilation, produce an output-object version of the operating system that is tailored to the system described.
At a slightly less tailored level, the system description can lead to the creation of tables and the selection of modules form a recompiled library. These modules are linked together to form the generated operating system. Selection allows the library to contain the device drivers for all supported Input or Output devices, but only those needed are linked into the operating system. Because the system is not recompiled, system generation is faster, but the resulting system may be overly general.
At the other extreme, it’s possible to construct a system that is completely table driven. All the code is always part of the system, and selection occurs at execution time, rather than at compile or link time. System generation involves simply creating the appropriate tables to describe the system.
The major differences among these approaches are the size and generality of the generated system and the ease of modifying it as the hardware configuration changes. Consider the cost of modifying the system support a newly acquired graphics terminal or another disk drive. Balanced against that cost, of course is the frequency or infrequency of such changes.

更新日期:2015/11/12 上午 12:18:21