心得分享

Card image cap

李同學 報告/作業 分享經驗 11/12 11/06 作業系統

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

1.
Message passing models (Erlang, for example) do not have any shared state; all synchronization and communication is done by exchanging messages.

Shared memory models communicate by reading/writing to shared memory blocks, which are protected by semaphores or similar.

Message passing's pros and cons:
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.
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’s pros and cons: Shared memory segments permit fast bidirectional communication among any number of processes. Each user can both read and write, but a program must establish and follow some protocol for preventing race conditions such as overwriting information before it is read.

2.
System calls provide an interface between the process an the operating system. System calls allow user-level processes to request some services from the operating system which process itself is not allowed to do.

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.
At a slightly less tailored level,the system description can lead to the creation of tables and the selection of modules from a precompiled library.these modules are linked together to form the generated operating system.
At the other extreme,it is possible to contrust 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.

更新日期:2015/11/12 下午 10:07:40