SHOULD BE AN OWN ANSWER SHOULD NOT CONTAIN ANY PLAGARISED ANSWER(Operating Syste
ID: 3757728 • Letter: S
Question
SHOULD BE AN OWN ANSWER SHOULD NOT CONTAIN ANY PLAGARISED ANSWER(Operating Systems)
1.a. Does virtualization impact the design of programs on behalf of the process/threading model?
b. With respect to a programmer, a system call looks the same as a call to a library procedure. Is a programmer required to identify which library procedures issue system calls? Explain your answer.
c. Discuss the design and use of an operating system locking primitive. Include how it either uses or replaces the basic mutex lock.
Explanation / Answer
A) Virtualization is the process whereby the system hardware is virtualized, thus providing the appearance to guest operating systems and applications that they are running on native hardware. In many virtualized environments, virtualization software runs at near native speeds. Simulation is the approach whereby the actual system is running on one set of hardware, but the guess system is compiled for a different set of hardware. Simulation software must simulate — or emulate — the hardware that the guest system is expecting. Because each instruction for 6 the guest system must be simulated in software rather than hardware, simulation is typically much slower than virtualization.
B) . when the programmer would like to port the library procedures to another platform, he must be aware whether the platform to which the programmer is going to port the procedures has the equivalent system calls that are needed or not. If not, the programmer must determine what library procedures he should hack so that the programmer can port the procedures successfully.
C) A lock is used for basic protection of shared resources. Multiple threads can attempt to acquire a lock, but only one thread can actually hold it at any given time (at least for traditional locks—more on this later). While that thread holds the lock, the other threads must wait. There are several different types of locks, differing mainly in what threads do while waiting to acquire them.
Mutex Class
Threads request a Mutex by calling an overload of its WaitOne method. Overloads with timeouts are provided, to allow threads to give up the wait. Unlike the Monitor class, a mutex can be either local or global. Global mutexes, also called named mutexes, are visible throughout the operating system, and can be used to synchronize threads in multiple application domains or processes. Local mutexes derive from MarshalByRefObject, and can be used across application domain boundaries.
In addition, Mutex derives from Wait Handle, which means that it can be used with the signaling mechanisms provided by Wait Handle, such as the Wait All, Wait Any, and Signal And Wait methods.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.