1-1
Message passing is useful for exchanging smaller amounts of data, because conflicts need be avoided. It is also easier to implement than is shared memory for inter computer communication.
1-2
①. Message passing:
a. Prons:
* 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.
b. Cons:
* The programmer is responsible for many of the details associated with data communication between processors.
* It may be difficult to map existing data structures, based on global memory, to this memory organization.
* Non-uniform memory access times - data residing on a remote node takes longer to access than node local data.
②. Shared-memory:
a. Prons:
* Fast bidirectional communicating among any number of process.
* Saves Resources.
b. Cons:
* Needs concurrency control (lead to data inconsistencies like “Lost update”).
* Lack of data protection from Operating System.
2-1
System calls are written in a high-level language and it may need to be written in low-level assembly language.
2-2
System calls request the operating system to perform certain services that use the resources controlled by the operating system. It provide the interface between a running program and the operating system.
3-1
* Used to modify a copy of the source code of the operating system and have it re-complied.
* Used to create tables and modes from a precompiled library. The needed modules are linked together to form the generated 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, rather than at compile or link time.
3-2
The size and generality of the generated system and the ease of modification as the hardware configuration changes.