心得分享

Card image cap

柯同學 報告/作業 分享經驗 11/12 10/8 OS作業

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

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?

(I)Message passing is useful when smaller numbers of data need to be exchanged,because no conflicts need to be avoided.

(II)The advantage of message passing is that it is easier to build massively parallel hardware. Message passing programming models tend to be more tolerant of higher communication latencies.

The disadvantage of message passing is requiring the explicit management of data and communication, the message passing paradigm has one intrinsic disadvantage that can be mitigated but not eliminated by good interface design: the presence of higher endpoint costs in message passing models as compared to shared memory.

The advantage of shared memory model is that the programming for IPC becomes simple in the sense that we simply write and read to an address pointer available in the our process address space. We need not use system calls like write and read. The updations to the kernel resident shared memory object is done by the kernel asynchronously. It saves lot of time compared to write and read because in write and read lot of switching should take place between user mode to kernel mode vice versa.

The disadvantages of shared memory for computer graphics include slower speeds and reduced availability of resources. This is used by the on-board video card in many computers as a way of lowering costs.



2. What is “system calls?” Please specify the functions and the purposes of a system call in a computer system

A: In computing, a system call is how a program requests a service from an operating system's kernel. This may include hardware-related services (for example, accessing a hard disk drive), creation and execution of new processes, and communication with integral kernel services such as process scheduling. System calls provide an essential interface between a process and the operating system. In most systems, system calls are possible to be made only from user space processes, while in some systems, OS/360 and successors for example, privileged system code also issues system calls.


3.Please specify different ways for using the hardware configuration during the system generation (SYSGEN).What are the major differences between these different ways?

(I)Hardware configuration information can be used in different ways. First, construct a system that is completely table driven. All the code is always part of the system, and selection occurs at execution time. Second , used to create tables and modules from a precompiled library. The needed modules are linked together to form the generated OS. Third, used to modify a copy of the source code of the OS and have it re-compiled. Hardware configuration references the details and system resource settings allotted for a specific device.

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

更新日期:2015/11/12 下午 10:15:25