1. Which situation is suitable to use message passing instead of shared-memory model for communication between processes? What are the pros and cons of using these two models?
Message passing is useful when smaller numbers of data need to be exchanged, because no conflicts need to be avoided. It is also easier to implement than is shared memory for intercomputer communication.
The pros and cons of message passing are listed below.
Memory is scalable with the number of processors. Increase the number of processors and the size of memory increases proportionately.
Each processor can rapidly access its own memory without interference and without the overhead incurred with trying to maintain global cache coherency.
Cost effectiveness: can use commodity, off-the-shelf processors and networking.
The pros and cons of shared memory are listed below.
Shared memory allows maximum speed and convenience of communication, as it can be done at memory speeds when within a computer. However, problem exist in the areas of protection and synchronization.
2. What is “system calls?” Please specify the functions and the purposes of a system call in a computer system.
System calls are written in a high-level language and it may need to be written in low-level assembly language.
System calls request the OS to perform certain services that use the resources controlled by the OS. It provide the interface between a running program and the operating system.
3. Please specify different ways for using the hardware configuration during the system generation (SYSGEN). What are the major differences between these different ways?
Used to modify a copy of the source code of the OS and have it re-compiled. Data declarations, initializations, and constants, along with conditional compilation, produce an output-object version of the operating system that is tailored to the system decribed.
Used to create tables and the selection modules from a precompiled library. The needed modules are linked together to form the generated OS. The selection allows the library to contain the device drivers for all supported I/O devices, but only those needed are linked into the operating system.
Construct a system that is completely table driven. All the code is always part of the system, and selection occurs at execution time. System generation involves simply creating the appropriate tables to describe the system.
The size and generality of the generated hardware configuration changes.