1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Phantasy [73]
2 years ago
7

The implementation of mutex locks provided in Section 6.5 suffers from busy waiting. Describe what changes would be necessary so

that a process waiting to acquire a mutex lock would be blocked and placed into a waiting queue until the lock became available.
Computers and Technology
1 answer:
givi [52]2 years ago
4 0

The changes would be necessary so that a process waiting to acquire a mutex lock would be blocked and placed into a waiting queue is: Spinlocks.

<h3>What is spinlock?</h3>

Spinlock can be defined as the process of enabling a thread to  wait while looking for lock that are available.

Spinlock is important as it enable thread to partition processor based on their needs so as to make it possible for thread waiting for spinlock to make use of one processor while other threads can as well run on other processor without hindering or interrupting one another.

Inconclusion the changes would be necessary so that a process waiting to acquire a mutex lock is: Spinlocks.

Learn more about spinlock here:brainly.com/question/13766808

You might be interested in
Plllzzzzzzzzzzzzzz annnssswweeweerrr...
s2008m [1.1K]

Answer:

An example of effective communication is when the person who you are talking to listens actively and absorbs your point and understands it.

Explanation:

Hope this helps!!

3 0
3 years ago
What is a good monitor for console gaming? (Any price)
likoan [24]

Answer:

I personally use a alienware

Explanation:

7 0
3 years ago
Read 2 more answers
Which of the following resources is an example of a web-based application?
kompoz [17]
The answer will be google docs since it depends on a web and its an application. hope it helps

3 0
3 years ago
What kind of device is a cpu input or output?
Rina8888 [55]
Correct answer: Neither

The CPU<span> is also known as the </span>processor<span> or microprocessor. The </span>CPU<span> is responsible for executing a sequence of stored instructions called a program. This program will take </span>inputs<span> from an </span>input<span> device, process the </span>input<span> in some way and </span>output<span> the results to an </span>output<span> device.</span> It is neither an input nor an output device, but it is usually connected to both kinds of devices.

Output devices like your monitor, speaker, and printer does not process anything fo it to be categorized as a processing device like your CPU and so as input devices like your mouse, microphone, and keyboard.

3 0
3 years ago
Write a loop that reads c-strings from standard input where the c-string is either "land", "air", or "water". The loop terminate
Anvisha [2.4K]

Answer:

I am writing a C++ code.        

#include <iostream> // for input output functions

using namespace std; // identifies objects like cin cout

int main() { //start of main() function body

string c_string; // stores the string entered by user from land water or air

int land=0; // contains the number of times land string is read in

int air=0; //contains the number of times air string is read in

int water = 0; //contains the number of times water string is read in

cin>>c_string; //reads the string entered by user from air water or land

/*while loop continues to execute until user enters xxxxx or maximum length of a string exceeds 8 */

while(c_string!= "xxxxx" && c_string.length()<=8) {

if(c_string=="land"){ // if string entered by user is land

land = land + 1;} //counts and increments each occurrence of land string by 1

else if(c_string=="air"){// if string entered by user is air

air = air + 1;}// counts and increments each occurrence of string air by 1

else if(c_string=="water"){// if string entered by user is water

water = water + 1;}//counts and increments each occurrence of air by 1

cin>>c_string;}

/* keeps reading the string entered by user from land air or water, until the loop breaks after the user enters xxxxx or user enters a string whose length is greater than 8 */

//prints the number of times land, air and water are read in

cout << "land:"<<land;

cout << endl<<"air:"<<air;

cout << endl<< "water:"<<water; }                      

                                                                                     

Explanation:

Everything is well explained in the comments above.

The program prompts the user to input strings. These strings are either land air or water. The while loop continues to read the input strings until user enters xxxxx or the string entered by user exceeds the length 8. Both these terminating conditions are added in the while loop. After the loop terminates, the number of times land, air and water strings are read is displayed on the output screen. Any other string entered by user other than these 3 is ignored. The program along with the output is attached.

3 0
3 years ago
Other questions:
  • If you are upgrading your operating system to Windows 7, you may not use the In-Place Upgrade Installation Option with
    14·1 answer
  • All of the following are aspects of the search process except?
    5·2 answers
  • A consumer is the name for:
    6·2 answers
  • A spreadsheet contains the maximum weight and maximum height for fifty dog breeds. The breeds are located in rows, and the weigh
    5·1 answer
  • Critical Thinking Questions
    9·2 answers
  • Write a program named as reverse.c that reads a message, then prints the reversal of the message. The output of the program shou
    7·1 answer
  • Fill in the Blank
    10·2 answers
  • Juan wrote a loop to print all the prime numbers between 1 and 100. But instead of stopping at 100, it continues on and on forev
    5·1 answer
  • A Network Intrusion Detection System watches for potentially malicious traffic and _______ when it detects an attack.
    15·1 answer
  • An excerpt of a sample business cover letter. The text uses curly font and has a warm to cold color background. What change does
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!