Explain the circumstances under which os use mutexes, Operating System

Q. Give the reasons why Windows XP, Solaris and Linux implement multiple locking mechanisms. Explain the circumstances under which they use mutexes, spinlocks, semaphores, adaptive mutexes and condition variables. In every case explain why the mechanism is needed.

Answer: These operating systems offer different locking mechanisms depending on the application developers' needs. Spinlocks are helpful for multiprocessor systems where a thread can run in a busy-loop (for a short period of time) rather than incurring the overhead of being put in a sleep queue. Mutexes are valuable for locking resources. Solaris 2 utilizes adaptive mutexes meaning that the mutex is implemented with a spin lock on multiprocessor machines. Semaphores as well as condition variables are more appropriate tools for synchronization when a resource should be held for a long period of time, since spinning is inefficient for a long duration.

Posted Date: 7/27/2013 2:47:18 AM | Location : United States







Related Discussions:- Explain the circumstances under which os use mutexes, Assignment Help, Ask Question on Explain the circumstances under which os use mutexes, Get Answer, Expert's Help, Explain the circumstances under which os use mutexes Discussions

Write discussion on Explain the circumstances under which os use mutexes
Your posts are moderated
Related Questions
difference between soft link and hard links

explain about oprating system services and topics briefly


What are the five major activities of an operating system in regard to file management? The creation and deletion of files The creation and deletion of directories The s

For example, by initializing a semaphore to 0, threads can wait for an event to occur, and impose an ordering constraint, similar to a monitor using condition variables, but with m

Q. Describe the three main architectural layers of Windows XP? Answer: (1) The HAL (Hardware Abstraction Layer) creates operating system portability by hiding hardware differ

Explain working of the logical file system The logical file system manages metadata information. Metadata contains all of the file-system structure, excluding actual data. It h

Priority Scheduling leads to the risk of starvation: a process is ready, but never is given the processor. Some preemptive priority schedulers therefore reserve a fraction of the p

Problem: a) Define a ‘file' and list the objectives of the file management system. b) List the ways in which programs access files and determine for what file types you woul