心得分享

Card image cap

沈同學 報告/作業 分享經驗 11/12 11/06 OS作業

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

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?
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.

2):Message-Passing Model
Pros:
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.
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
Pros:
Fast bidirectional communicating among any number of process
Saves Resources.
Cons:
Needs concurrency control (lead to data inconsistencies like “Lost update”)
Lack of data protection from Operating System


2. What is “system calls?” Please specify the functions and the purposes of a system call in a computer system.
1):system calls provide the interface between a running program and the operating system.Typically written in a high-level language.

2):purpose:System calls allow user-level processes to request services of
the operating system.

3):Process Control
File Manipulation
Device Manipulation
Information Maintenance
Communication
Protection


3. Please specify different ways for using the hardware configuration during the system generation (SYSGEN). What are the major differences between these different ways?
1):a:Used to modify a copy of the source code of the OS and have it re-complied.
b:Used to create tables and modes from a precompiled library.The needed modules are linked together to form the generated OS.
c: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.

2):The size and generality of the generated system and the ease of modification as the hardware configuration changes.

更新日期:2015/11/12 下午 11:21:28