11/26 OS | |
---|---|
名稱 | OS |
日期 | 11/26 |
課程名稱 | 作業系統 |
指導教師 | 劉艾華 |
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?
ANS :
Web browsers and web servers are examples of processes that communicate by message passing.
Message passing.
-----------------
PROS:The advantage to synchronous message passing is that it is conceptually less complex.
CONS:The buffer required in asynchronous communication can cause problems when it is full. A decision has to be made
whether to block the sender or whether to discard future messages. If the sender is blocked, it may lead to an
unexpected deadlock. If messages are dropped, then communication is no longer reliable. These are all examples of the
kinds of problems that middleware vendors try to address.
---------------------
Shared memory
-------------
PROS:Since both processes can access the shared memory area like regular working memory, this is a very fast way of
communication.
CONS:access time degradation: when several processors try to access the same memory location it causes contention.
Shared memory computers cannot scale very well.Most of them have ten or fewer processors;lack of data
coherence:whenever one cache is updated with information that may be used by other processors, the change needs to be
reflected to the other processors,otherwise the different processors will be working with incoherent data.Such cache
coherence protocols can,when they work well,provide extremely high-performance access to shared information between
multiple processors.On the other hand,they can sometimes become overloaded and become a bottleneck to performance.
----------------------
2. What is “system calls?” Please specify the functions and the purposes of a system call in a computer system.
ANS: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.
-----------------------------------------------
3. Please specify different ways for using the hardware configuration during the system generation (SYSGEN). What are
the major differences between these different ways?
ANS:In computing System generation or sysgen is the process of creating a particular unique instance of an operating
system by combining user-specified options and parameters with manufacturer-supplied general-purpose program code to
produce an operating system tailored for a particular hardware and software environment.[1]
Some other programs have similar processes, although not usually called "sysgen." For example, IBM's Customer
Information Control System (CICS) was installed through a process called CICSGEN.
更新日期:2015/11/26 上午 02:49:30