Question

In: Computer Science

urgent please, in operating system: One simple method to protect a critical section is to use...

urgent please, in operating system:

One simple method to protect a critical section is to use mutex locks, also called spinlocks. An alternative method would be use a binary semaphore initialized to 1, with the implementation that uses busy waiting. Is there any real difference between these two methods? Explain.

Solutions

Expert Solution

Dear Student,

Answer :

BINARY SEMAPHORE MUTEX

It's functionality is based up on signalling mechanism It's functionality is based up on locking mechanism
The thread which is having higher priority than current thread can also release binary semaphore and take lock. The thread which has acquired mutex can only release Mutex when it goes out from critical section.
Semaphore value is varied according to wait () and signal () operations. Mutex values can be changed just as locked or unlocked.
Multiple number of threads can acquire binary semaphore at a time concurrently. Only one thread can have mutex at a time
Binary semaphore does not have ownership. There is ownership associated with mutex because only owner can release the lock.
They are faster than mutex because any other thread/process can unlock binary semaphore. They are slower than binary semaphores because only thread which has acquired must release the lock.
If you have number of instances for resource it is better to use Binary semaphore. If you have single instance for resource it is better to use mutex.

Hope This Helps.

All The Best


Related Solutions

Operating systems Explain what the critical section problem is. Please explain this in about 1-2 paragraphs.
Operating systems Explain what the critical section problem is. Please explain this in about 1-2 paragraphs.
Create the “Operating Section”of the statement of cash flows using the indirect method(ONLYTHE OPERATING SECTION). Place...
Create the “Operating Section”of the statement of cash flows using the indirect method(ONLYTHE OPERATING SECTION). Place your answer on this page(operating section only, indirect method).
urgent!!! code in c++ - cannot use vector - please use inheritance -please identify the .h...
urgent!!! code in c++ - cannot use vector - please use inheritance -please identify the .h and .cpp files and add tester program and screenshot of output! -please complete all parts I will upvote thank you!!! Define the following classes to manage the booking of patients in a medical clinic. a) Define a class Date that has the following integer data members: month, day and year. b) Define a class AppointmentTime that has the following data members: day (string), hour...
urgent!!! code in c++ - cannot use vector - please use inheritance -please identify the .h...
urgent!!! code in c++ - cannot use vector - please use inheritance -please identify the .h and .cpp files and add tester program and screenshot of output! -please complete all parts I will upvote thank you!!! Define the following classes to manage the booking of patients in a medical clinic. a) Define a class Date that has the following integer data members: month, day and year. b) Define a class AppointmentTime that has the following data members: day (string), hour...
Please urgent, Patient Care Instruments uses a manufacturing costing system with one direct cost category​ (direct...
Please urgent, Patient Care Instruments uses a manufacturing costing system with one direct cost category​ (direct materials) and three indirect cost​ categories: The management of Patient Care Instruments wants to evaluate whether value engineering has succeeded in reducing the target manufacturing cost per unit of one of its​ products, HJ6, by 20​% In response to competitive pressures at the end of 2017​, Patient Care Instruments used​ value-engineering techniques to reduce manufacturing costs. Actual information for 2017and 2018 ​is: 2017 2018...
A simple saturation cycle of refrigeration system is operating on R22. This system has an evaporator...
A simple saturation cycle of refrigeration system is operating on R22. This system has an evaporator pressure of 350 kPa, condensing pressure of 1550 kPa and a discharge temperature of 80°C. Degree of sub cooling of 8 K and degree of superheat of 5 K. Draw p – h diagram and calculate the following. a. Refrigeration Effect. b. Refrigerant mass flow rate, at a plant capacity of 196 kW. c. Power input into the compressor. d. Coefficient of performance of...
Please analyze and summarize the command driven operating system with a GUI operating system in a...
Please analyze and summarize the command driven operating system with a GUI operating system in a paragraph or two.
Please answer this. ITS URGENT!!!! Describe how the endocrine system is different from the nervous system...
Please answer this. ITS URGENT!!!! Describe how the endocrine system is different from the nervous system the other control system of the body. (Please answer in ~250 words)
How woukd you calculate the operating activities section using the indirect method?
How woukd you calculate the operating activities section using the indirect method?
Ravenna Company is a merchandiser that uses the indirect method to prepare the operating activities section...
Ravenna Company is a merchandiser that uses the indirect method to prepare the operating activities section of its statement of cash flows. Its balance sheet for this year is as follows: Ending Balance Beginning Balance Cash and cash equivalents $ 89,000 $ 106,750 Accounts receivable 71,500 77,000 Inventory 96,000 87,500 Total current assets 256,500 271,250 Property, plant, and equipment 255,000 245,000 Less accumulated depreciation 85,000 61,250 Net property, plant, and equipment 170,000 183,750 Total assets $ 426,500 $ 455,000 Accounts...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT