Explain the circumstances under which os use mutexes, Operating System

Assignment Help:

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.


Related Discussions:- Explain the circumstances under which os use mutexes

Explain a computing environment, Q. Polling for an I/O completion is able ...

Q. Polling for an I/O completion is able to waste a large number of CPU cycles if the processor iterates a busy-waiting loop several times before the I/O completes. However if the

Cosled loop, What are the two principles in Hungarian method?

What are the two principles in Hungarian method?

Explain the per thread scoping, Explain the Per Thread Scoping Thread-l...

Explain the Per Thread Scoping Thread-level programming introduces new twists for application-level variable scoping. Threads are commonly used in one of two ways. To ex

Shell scripting in both a windows and unix environment, Purpose This is...

Purpose This is intended to help you develop your understanding of shell scripting in both a Windows and Unix environment. Deliverables For both the first and second op

What are interrupts?, What are interrupts? Interrupts are in some way...

What are interrupts? Interrupts are in some ways the mainly "famous" system resources, ever since almost everyone who's used a computer has heard of them even if they don't k

Requirements memory management intended to satisfy?, Normal 0 f...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Define the dosexecpgm function used in the os/2, Define the DosExecPgm Func...

Define the DosExecPgm Functions used in the OS/2 DosExecPgm (objBuffer, objLen, flags, cmdLine, env, &resultCode, execName) DosExecPgm function is designed to load an execut

Describe the technique of packing, Describe the technique of packing. T...

Describe the technique of packing. The physical record size will not accurately match the length of the desired logical record and the Logical records may even differ in length

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd