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?
When packets of information in predefined formats are moved between processes by the operating system,you can use message passing.
Pros of the Message Passing Model: One of the biggest semantic advantages of the message-passing communication model is the fact that it is, by nature, interrupt driven. Messages combine both data and synchronization in a single unit.
Cons of Message Passing: In addition to 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.
Pros of the Shared Memory Model:. One of the primary reasons for this is that shared memory shelters programmers from the details of interprocessor communication: the location-independent semantics of shared memory allow programmers to focus on issues of parallelism and correctness while completely ignoring issues of where data is and how to access it. This can allow the “quick construction” of algorithms that communicate implicitly through data structures. In some sense, the shared-memory communication model offers one of the simplest extensions of the uni-processor programming paradigm to multiprocessors
Cons of Shared Memory: One of the deficiencies of the shared-memory communication model is the fact that it is, by nature, a polling interface. While this can make for extremely efficient communication under some circumstances, it can have a negative impact on synchronization operations.
2. What is “system calls?” Please specify the functions and the purposes of a system call in a computer system.
System calls provide the interface between a running program and the operating system. Typically written in a high-level language (C or C++). May need to be written in low-level assembly language.
System programs provide basic functioning to users so that they do not need to write their own environment for program development (editors, compilers) and program execution (shells). In some sense, they are bundles of useful system calls.
System calls allow user-level processes to request services of
the operating system.
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?
Hardware configuration information can be used in several ways:
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.
COPYRIGHT (c) 2016 ePortfolio ALL RIGHTS RESERVED.