answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: How busy waiting can be avoided when using the semaphores as a synchronization tool?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which option for scheduling the synchronization of an offline web page can you specify using the Scheduled Synchronization Wizard?

At specific times you define


How does thread synchronization occur in a monitor?

by using synchronized class


What is the definition of the word 'Semaphores'?

There are a number of ways the word semaphores might be used in a sentence. The definition of this word is that it is a system of sending messages using a series of flags in certain positions, signifying different messages with several meanings.


Discuss the concept and importance of semaphores?

n programming, especially in Unix systems, semaphores are a technique for coordinating or synchronizing activities in which multiple processes compete for the same operating system resources. A semaphore is a value in a designated place in operating system (or kernel) storage that each process can check and then change. Depending on the value that is found, the process can use the resource or will find that it is already in use and must wait for some period before trying again. Semaphores can be binary (0 or 1) or can have additional values. Typically, a process using semaphores checks the value and then, if it using the resource, changes the value to reflect this so that subsequent semaphore users will know to wait.Semaphores are commonly use for two purposes: to share a common memory space and to share access to files. Semaphores are one of the techniques for inter-process communication (IPC). The C programming language provides a set of interfaces or "functions" for managing semaphores.


How is semaphores and perimeter same?

They are not. Semaphore is a method of sending signals by using flags or lights whereas perimeter is a geometric property of closed shapes!


What is an example of a sentence using the word avoided'?

Because he was a skilful driver he avoided hitting the car in front.


How can you use copyrighted music on Youtube?

If you are using your own performance, you need a synchronization license from the copyright holder of the song.If you are using an existing recording, you need a master use license from the performer and/or record label in addition to a synchronization license.Most companies have request forms online, but these licenses can take months to resolve.


What are disadvantages of semaphore?

In semaphores there is no spinning, hence no waste of resources due to no busy waiting. That is because threads intending to access the critical section are queued. And could access the priority section when the are de-queued, which is done by the semaphore implementation itself, hence, unnecessary CPU time is not spent on checking if a condition is satisfied to allow the thread to access the critical section.Semaphores permit more than one thread to access the critical section, in contrast to alternative solution of synchronization like monitors, which follow the mutual exclusion principle strictly. Hence, semaphores allow flexible resource management.Finally, semaphores are machine independent, as they are implemented in the machine independent code of the microkernel services.DisadvantagesProblem 1: Programming using Semaphores makes life harder as utmost care must be taken to ensure Ps and Vs are inserted correspondingly and in the correct order so that mutual exclusion and deadlocks are prevented. In addition, it is difficult to produce a structured layout for a program as the Ps and Vs are scattered all over the place. So the modularity is lost. Semaphores are quite impractical when it comes to large scale use.Problem 2: Semaphores involve a queue in its implementation. For a FIFO queue, there is a high probability for a priority inversion to take place wherein a high priority process which came a bit later might just have to wait when a low priority one is in the critical section. For example, consider a case when a new smoker joins and is desperate to smoke. What if the agent who handles the distribution of the ingredients follows a FIFO queue (wherein the desperate smoker is last according to FIFO) and chooses the ingredients apt for another smoker who would rather wait some more time for a next puff?


What is a sentence using the word avoided?

"The fox avoided capture by diving into his burrow." "Generalizations should be avoided when discussing social problems." "Knowing that he could not politely refuse the assignment, the professor simply avoided the dean for the rest of the day."


What did the Depression generation avoid?

They avoided buying items using credit.


Why does using noncorrosive ms such aluminum prevent corrosion?

It is normal that using materials which are not corroded corrosion is avoided.


What behaviour should be avoided when talking with a customer on the telephone?

Using terms of endearment.