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
Nataliya [291]
3 years ago
14

5.20 Which of the following scheduling algorithms could result in starvation? a. First-come, first-served b. Shortest job first

c. Round robin d. Priority
Computers and Technology
2 answers:
fomenos3 years ago
6 0

Answer:

b. Shortest job first and d. Priority

Explanation:

First let us understand what starvation is. Starvation is basically situation in which a process does not get required resources because other processes are being allocated to these resources and are utilizing those resources. So that process is in starvation as it does not get access to the resource and it is unable to execute.

In the First-come first-served scheduling algorithm the processes are executed in the order or sequence such that the first process is executed first and the second process is executed after the first process finishes its execution. So in this scheduling algorithm no starvation can occur as there is no process which will never get a resource and will never be able to execute.

Shortest job first chooses out of the waiting processes, the process which has the shortest execution time to be executed first. This results in the processes with long execution time to wait for their execution. This wait can go till infinity and the waiting long processes might never get the resources for their execution if the shorter processes keep arriving. So this can result in starvation.

Round robin algorithm gives each process a fixed time slot called quantum time for its execution.  So no process will have to wait for long and wait for a resource to be allocated for long in order to be executed. So this is a starvation free scheduling algorithm.

In priority scheduling the processes are given priorities to execute which means that the process with high priority will be allocated the resource and will be executed first.  This causes the low priority processes to wait for long and this waiting can go to infinity and the low priority process might not be able to get a resource for their execution. So this scheduling algorithm could result in starvation.

NARA [144]3 years ago
5 0

Answer: (b) and (d)

Explanation:

Shortest job first and Priority are scheduling algorithms that could result in starvation.

The others won't result in starvation

You might be interested in
Which of the following is not a benefit of introducing an e-commerce solution to an organisation?
emmainna [20.7K]

Answer:

A. Improving human resource management by offering more information to employees about available services, from annual leave arrangements to retirement plans.

Explanation:

e-commerce is a short for electronic commerce and it can be defined as a marketing strategy that deals with meeting the needs of consumers, by selling products or services to the consumers over the internet.

This ultimately implies that, e-commerce is strictly based on the buying and selling of goods or services electronically, over the internet or through a digital platform. Also, the payment for such goods or services are typically done over the internet such as online payment services.

Some of the benefit of introducing an e-commerce solution to an organisation's includes;

I. Improving internal communication by offering various means for exchanging information with minimum effort and cost.

II. Reducing the personalisation of services.

III. Supporting purchasing functions by offering responsive pricing models based on the analysis of market status.

7 0
2 years ago
How would you print from 1 to 1000
Hitman42 [59]

Answer:

There are two ways to print 1 to 1000

  1. Using Loops.
  2. Using Recursion.

Explanation:

Using loops

for(int i=1;i<=1000;i++)

{

  cout<<i<<" ";

}

Using recursion

Remember you can implement recursion using a function only.

void print(int n)

{

  if(n==0)

  return;

  print(n-1);

  cout<<n<<" "';

}

you should pass 1000 as an argument to the function print.

5 0
3 years ago
Write a program that asks the user to enter a birth year. the program should then indicate which generation a person of that yea
USPshnik [31]
Something like the following. Also you need to give what language you are using. Anyways, you should be able to convert this to your language of choice. 

<script type="text/javascript">
function checkGeneration() { 
   var gen = ["Baby Boomer ","Generation X","Xennials","Generation Y"];
   var reversestr = "";
   var getyear = window.prompt("Enter a 3 digit number: ");
    if (parseInt(getyear) <= 1964) {
        alert(gen[0]);   
    } else if(parseInt(getyear) <= 1979) {
        alert(gen[1]);
    } else if(parseInt(getyear) <= 1985) {
        alert(gen[2]);               
   }  else if(parseInt(getyear) <= 1995) {
        alert(gen[3]);
   }
 }
checkGeneration();
</script>
7 0
3 years ago
A CPU has just been powered on and it immediately executes a machine code instruction. What is the most likely type of instructi
adell [148]

The most likely type of instruction that was executed by the CPU is: a jump instruction.

<h3>What is a CPU?</h3>

A central processing unit (CPU) can be defined as the main components of a computer because it acts as the brain of a computer and does all the processing and logical control.

This ultimately implies that, a central processing unit (CPU) is typically used by a computer to execute an instruction or set of instructions when powered on.

<h3>What is a jump instruction?</h3>

In Computer technology, a jump instruction specifies an offset to a new place in the program sequence when processing an instruction or set of instructions in a computer.

Read more on CPU here: brainly.com/question/5430107

3 0
2 years ago
Write a program that will ask the user for a set of ten numbers. After all ten numbers have been entered, the program will displ
muminat

Answer:

In Python:

nums = []

larg= []

small = []

while True:

   for i in range(10):

       num = int(input(": "))

       nums.append(num)

   print("Smallest: "+str(min(nums))); print("Largest: "+str(max(nums)))

   larg.append(max(nums))

   small.append(min(nums))

   another = int(input("Press 1 to for another sets: "))

   nums.clear()

   if not another == 1:

       break

   

print("Average Large: "+str(sum(larg)/len(larg)))

print("Average Small: "+str(sum(small)/len(small)))

Explanation:

This initializes the list of input numbers

nums = []

This initializes the list of largest number of each input set

larg= []

This initializes the list of smallest number of each input set

small = []

This loop is repeated until, it is exited by the user

while True:

The following iteration is repeated 10 times

   for i in range(10):

Prompt the user for input

       num = int(input(": "))

Add input to list

       nums.append(num)

Check and print the smallest using min; Check and print the largest using max;

   print("Smallest: "+str(min(nums))); print("Largest: "+str(max(nums)))

Append the largest to larg list

   larg.append(max(nums))

Append the smallest to small list

   small.append(min(nums))

Prompt the user to enter another set of inputs

   another = int(input("Press 1 to for another sets: "))

Clear the input list

   nums.clear()

If user inputs anything other than 1, the loop is exited

<em>    if not another == 1:</em>

<em>        break</em>

Calculate and print the average of the set of large numbers using sum and len    

print("Average Large: "+str(sum(larg)/len(larg)))

Calculate and print the average of the set of smallest numbers using sum and len

print("Average Small: "+str(sum(small)/len(small)))

8 0
3 years ago
Other questions:
  • Why is it important to evaluate the website on which you plan to shop?
    11·2 answers
  • Due to the absorption and scattering of shorter wavelengths by interstellar dust, distant stars appear A) bluer. B) brighter. C)
    9·1 answer
  • If johanna wants to label the x- and y-axes, she should click Layout, then
    8·1 answer
  • Print either "Fruit", "Drink", or "Unknown" (followed by a newline) depending on the value of userItem. Print "Unknown" (followe
    13·1 answer
  • In reduced visibility conditions you need to work especially hard to gather visual information because
    7·1 answer
  • In Alphatech Systems, email software screens incoming messages by organizing them into mailboxes and identifying junk mail. As a
    13·1 answer
  • Which of the following statements are true of software engineers? Check all of the boxes that apply. They are responsible for wr
    11·2 answers
  • Write a recursive function that returns true if the digits of a positive integer are in increasing order; otherwise, the functio
    15·1 answer
  • Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binar
    12·1 answer
  • List three features of the third generation of computers
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!