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
Question: (a) Modern processors operate in one of two modes: one for the operating system and one for applications. What is the purpose of having these two modes? What are

Explain about interprocess communication The cooperating processes communicate with each other via an interprocess communication facility. IPC gives a mechanism to permit proce

what is segmentation as it refers to operating system

Define caching. A cache is a region of fast memory that holds copies of data. Access to the cached copy is well-organized than access to the original. Caching and buffering are

Q. How could a system be designed to allow a choice of operating systems to boot from? What would the bootstrap program need to do? Answer: Delieve a system that would like to

Define drawback of Distributed systems Reliability is a drawback of Distributed systems

Explain DosCreateThread Functions Used in the OS/2  DosCreateThread(&threadID,MyThreadFunction,arg,flags,stackSize) DosCreateThread creates a thread within the context of th

Develop a user mode command interpreter which support these functions: "list-short" -- just like ls without any options "list-long" -- same as ls -l "change" -- same as cd Your co

A- Consider a computer system that provides a virtual memory space that consists of 8  pages. The physical memory contains 4 pages where the page size is 4Kbytes. Assume that at sp

Q. Give the reasons why Windows XP, Solaris and Linux implement multiple locking mechanisms. Explain the circumstances under which they use mutexes, spinlocks, semaphores, adaptiv