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
approaches to identify free memory area in a heap

One reason to learn C and C++ is simply that so much software is written in these languages. A related, butmore fundamental reason, is that C and C++ are relatively low-level, allo

1. Draw a schematic diagram of a CMOS inverter and explain its operation. 2. Draw schematic diagrams of CMOS NAND and NOR gates, and explain their operation. 3. Explain what

Q. Show that a few schedules are possible under the two-phase locking protocol however not possible under the timestamp protocol and vice versa. Answer: A schedule that is auth

As we already know, threadsmust ensure consistency; otherwise, race conditions (non-deterministic results) might happen. Now consider the "too much milk problem": two people share

MEMORY MANAGEMENT USING BIT MAPS   In this memory is separated into different allocation units each of some particular size(a few bites).consider every space of size 4k. A

Question: (a) Answer the following questions based on the code snippet below. 1. int main (int argc, char *argv[]) 2. { 3. 4. pid_t processId; 5. 6. processId =

Describe paging technique used in UNIX systems. When a process begin in UNIX, not every its memory pages are read in from the disk at once. In its place, the kernel loads into

Q. Researchers have recommended that instead of having an access list associated with each file (specifying which users can access the file and how) we should have a user control

A practical task specified in the Study Guide, Computer architecture, was to record your computer's specifications. Submit the data you recorded, which will contain the following d