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
Q. Likewise some systems support many types of structures for a file's data while others simply support a stream of bytes. What are the merits in addition to demerits? Answer:

Problem: a) The CPU can access 2 storage devices directly. What are these 2 storage devices? b) Define 2 key issues involved in memory management. c) How do processes sha

What is the basic approach of page replacement? If no frame is free is available, find one that is not presently being used and free it. A frame can be freed by writing its con

Now, let us discuss two related algorithms for deciding which pages to evict. The clock algorithm is one of the most popular choices. It works by keeping frames in a circular struc

List the task regions in the Spiral model.  Customer communication - In this region it is suggested to set up customer communication.  Planning - All planning activities


Write in brief on UNIX file structure. UNIX considers every file to be a sequence of 8-bit bytes no interpretation of these bits is made by the operating system. This system pr

how to solve queing theory step by step

What is a buddy system? We are dividing the memory as powers of two therefore the division will be 2, 4, 8, 16, 32, 64, 128, 256...i.e. in powers of 2 as well as we are selecti

Process termination A process terminates when it finishes implementing its final statement and asks the operating system to delete it by using the exit system call. At that tim