11/6 OS作業

名稱
11/6 OS作業
日期
11/10
課程名稱
作業系統
指導教師
劉艾華
心得
1.
Concurrent components communicate by exchanging messages .The exchange of messages may be carried out asynchronously, or may use a synchronous "rendezvous" style in which the sender blocks until the message is received. Message-passing concurrency tends to be far easier to reason about than shared-memory concurrency, and is typically considered a more robust form of concurrent programming. A wide variety of mathematical theories for understanding and analyzing message-passing systems are available, including the Actor model, and various process calculi.
shared-memory:
An advantage of shared-memory model from the programmer’s point of view is that the notion of data “ownership” is lacking, so there is no need to specify explicitly the communication of data between tasks. Program development can often be simplified.
An important disadvantage in terms of performance is that it becomes more difficult to understand and manage data locality.
message passing:
Advantages: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.
Disadvantages: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.

2.
In computing, a system call is how a program requests a service from an operating system's kernel. This may include hardware-related services, 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 userspace processes, while in some systems, OS/360 and successors for example, privileged system code also issues system calls.
While a procedure call can usually be performed in a few machine instructions, a system call requires the computer to save its state, let the operating system take control of the CPU, have the operating system perform some function, have the operating system save its state, and then have the operating system give control of the CPU back to you. This concept is important, and will be seen time and time again in this class.

3.
Used to modify a copy of the source code of the OS and have it re-compiled.
Used to create tables and modules from a precompiled library. The needed modules are linked together to form the generated OS.
Construct a system that is completely table driven. All the code is always part of the system, and selection occurs at execution time.
The size and generality of the generated system and the ease of modification as the hardware configuration changes.