answer.
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
Basile [38]
2 years ago
4

What is the meaning of the term busy waiting? What other kinds of waiting are there in an operating system? Can busy waiting be

avoided altogether? Explain your answer.
Computers and Technology
1 answer:
DochEvi [55]2 years ago
7 0

Answer:

1) Answer is in explanation.

2) waiting on application, waiting for hardware to communicate, waiting for a file to become available, waiting for user input...

3) No, busy waiting cannot be avoided altogether.

Explanation:

1) The term "busy waiting" means a process simply spins (does nothing but continue to test it's entry conditions), while it is waiting to enter it's critical session. This continues to use (waste) CPU cycles which is inefficient. The CPU is not engaged in any real productive activity during this period, and the process does not progress towards completion.

2) Other kinds of waiting in an operating system are:

* Waiting on application

* Waiting for hardware to communicate

* Waiting for a file to become available

* Waiting for user input.

3) Busy waiting cannot be avoided altogether; some events cannot trigger a wake-up, for example, on Unix, a process cannot "sleep untill a file is modified" because the operating system does not provide any mechanism to automatically wake up the process when the even occurs. Some amount of repeated polling (checking) is required.

Generally, busy waiting is mostly avoidable on uniprocessor machines, but mostly unavoidable on multi processor machines. Therefore, busy waiting, cannot be avoided altogether.

You might be interested in
Consider the following method, which is intended to return an array of integers that contains the elements of the parameter arr
Gennadij [26K]

Code:

public static int[] reverse(int [] arr){

Int [] newArr = new int[arr.length];

for (int k = 0; k<arr.length;k++){

/*Missing statement */

}

return newArr;

Answer:

Replace the comment with:

newArr[k] = arr[arr.length-k];

Explanation:

Required

Complete the code

In the given code:

The first line of the given code defines the method

public static int[] reverse(int [] arr){

The next line declares array newArr withe same length as array arr

Int [] newArr = new int[arr.length];

The next line iterates through the elements of array arr

for (int k = 0; k<arr.length;k++){

The /* Missing statement */ is then replaced with:

newArr[k] = arr[arr.length-k];

The above statement gets the elements of array arr in reversed order.

This is so because, as the iteration iterates through array arr in ascending order, arr.length-k gets the element in reversed order

6 0
2 years ago
Write a recursive, string-valued method, replace, that accepts a string and returns a new string consisting of the original stri
ch4aika [34]

Answer:

Check the explanation

Explanation:

public String replace(String sentence){

  if(sentence.isEmpty()) return sentence;

  if(sentence.charAt(0) == ' ')

     return '*' + replace(sentence.substring(1,sentence.length()));

  else

     return sentence.charAt(0) +            replace(sentence.substring(1,sentence.length()));

3 0
2 years ago
To adjust the height of cells, position the pointer over one of the dividing lines between cells. When the pointer changes to th
Sergio [31]

Answer:

double arrow shape

Explanation:

To adjust the height of the cells

1. We have to position the mouse pointer over one of the column line or the one of the row line.

2. As we place the pointer between the dividing lines, the cursor of the mouse pointer change from singe bold arrow to double arrow symbol.

3.Now press or click the left mouse button and drag the dividing lines of the   cells to the desired position to have the required width or height of the cell.

5 0
2 years ago
Charlotte has set up a home maintenance service that operates out of her city. Workers commit to being available for certain hou
Vinvika [58]

Answer:

MAN

Explanation:

3 0
2 years ago
[20 points] 3.3 Code Practice: Question 2
igor_vitrenko [27]

Answer:

See explanation

Explanation:

The attachment show that you've attempted the question already.

I'll assist in making corrections to your source code.

First, edit line 5 to

if(r<= 255 and g<=255 and b <=255):

Then edit line 8 to:

if(r>= 255):

Then edit line 11 to:

if(g>= 255):

Lastly, edit line 14 to:

if(b>= 255):

<em>Other part of the attachment is correct</em>

3 0
2 years ago
Other questions:
  • Which selections are possible for controlling the start time of audio playback? Check all that apply. Automatic Rewind when done
    10·1 answer
  • Mark T for True and F for False. No single person or government agency controls or owns the Internet. The W3C is responsible for
    5·1 answer
  • Zoey has brought her computer in for servicing. When she dropped off her computer, she mentioned that her computer will sometime
    15·2 answers
  • Identify the normalized form of the mantissa in 111.01.
    14·1 answer
  • Juan, a network user, sends an email to you, the IT admin of the network, stating that his account is locked because he has lost
    14·1 answer
  • NOTE: in mathematics, division by zero is undefined. So, in C++, division by zero is always an error. Given a int variable named
    9·1 answer
  • Design an application for Bob's E-Z Loans. The application accepts a client's loan amount and monthly payment amount. Output the
    8·1 answer
  • (choose one) Which is the proper means to decrement the integer variable, myScore, by one?
    15·1 answer
  • 10. There is repeated code in these onevent blocks. Choose the correct code for the updateScreen() function which would be calle
    11·1 answer
  • Doug grew up on a large farm in southwest Wisconsin. As a college graduation gift, Doug’s father gave him several hundred acres
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!