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
Design a class named QuadraticEquation for a quadratic equation ax^2+bx+x=0. The class contains: **private data fields a, b, and
LenaWriter [7]

Answer:

<em>C++</em>

///////////////////////////////////////////////////////////////////////////////////////////

#include <iostream>

using namespace std;

//////////////////////////////////////////////////////////////////

class QuadraticEquation {

   int a, b, c;

   

public:

   QuadraticEquation(int a, int b, int c) {

       this->a = a;

       this->b = b;

       this->c = c;

   }

   ////////////////////////////////////////

   int getA() {

       return a;

   }

   

   int getB() {

       return b;

   }

   

   int getC() {

       return c;

   }

   ////////////////////////////////////////

   // returns the discriminant, which is b2-4ac

   int getDiscriminant() {

       return (b*2)-(4*a*c);

   }

   

   int getRoot1() {

       if (getDiscriminant() < 0)

           return 0;

       else {

           // Please specify how to calculate the two roots.

           return 1;

       }

   }

   

   int getRoot2() {

       if (getDiscriminant() < 0)

           return 0;

       else {

           // Please specify how to calculate the two roots.

           return -1;

       }

   }

};

//////////////////////////////////////////////////////////////////

int main() {

   return 0;

}

4 0
3 years ago
If you want to present slides to fellow students or co-workers, which productivity software should you use to create them?
slamgirl [31]
Microsoft powerpoint? i think thats what this is asking
4 0
3 years ago
Read 2 more answers
Which of the following represents knowledge as a set ofâ rules? A. Neural networks.B. Machine learning systems.C. Robotics.D. Ex
sveta [45]

Answer:

D. Expert systems

Explanation:

Artificial intelligence (AI) also known as machine learning can be defined as a branch of computer science which typically involves the process of using algorithms to build a smart computer-controlled robot or machine that is capable of performing tasks that are exclusively designed to be performed by humans or with human intelligence.

Artificial intelligence (AI) provides smarter results and performs related tasks excellently when compared with applications that are built using conventional programming.

Generally, there are two (2) main characteristics of artificial intelligence (AI) systems and these include;

I. Non-algorithmic processing.

II. Symbolic processing.

In artificial intelligence (AI), the field of expert systems is the most important applied area because it models human knowledge.

Hence, expert systems represents knowledge as a set of rules.

Although, all expert systems are generally lacking in human capabilities and can only use inference procedures to proffer solutions to specific problems that would normally require human expertise or competence.

Some of the areas where expert systems can be applied are; monitoring, diagnosis, scheduling, classification, design, process control, planning, etc.

5 0
3 years ago
Write a program to implement problem statement below; provide the menu for input N and number of experiment M to calculate avera
zalisa [80]

Answer:

Explanation:

#include<iostream>

#include<ctime>

#include<bits/stdc++.h>

using namespace std;

double calculate(double arr[], int l)

{

double avg=0.0;

int x;

for(x=0;x<l;x++)

{

avg+=arr[x];

}

avg/=l;

return avg;

}

int biggest(int arr[], int n)

{

int x,idx,big=-1;

for(x=0;x<n;x++)

{

if(arr[x]>big)

{

big=arr[x];

idx=x;

}

}

return idx;

}

int main()

{

vector<pair<int,double> >result;

cout<<"Enter 1 for iteration\nEnter 2 for exit\n";

int choice;

cin>>choice;

while(choice!=2)

{

int n,m;

cout<<"Enter N"<<endl;

cin>>n;

cout<<"Enter M"<<endl;

cin>>m;

int c=m;

double running_time[c];

while(c>0)

{

int arr[n];

int x;

for(x=0;x<n;x++)

{

arr[x] = rand();

}

clock_t start = clock();

int pos = biggest(arr,n);

clock_t t_end = clock();

c--;

running_time[c] = 1000.0*(t_end-start)/CLOCKS_PER_SEC;

}

double avg_running_time = calculate(running_time,m);

result.push_back(make_pair(n,avg_running_time));

cout<<"Enter 1 for iteration\nEnter 2 for exit\n";

cin>>choice;

}

for(int x=0;x<result.size();x++)

{

cout<<result[x].first<<" "<<result[x].second<<endl;

}

}

8 0
3 years ago
Todd insisted on having an image to go with every slide. Is this good or bad?
valentina_108 [34]

Answer:

Yes, Its a good idea but depends upon type of image. Like adding a logo to all the slides at top left corner is not just good but a must for all as well, when we are preparing official documents. However, other images when decided to be repeated must convey the correct intent in each page. If this is not the case, you need to avoid it. Intent is the most important aspect certainly. For rest see explanation.

Explanation:

Yes, and as mentioned above adding logo and other images meaningfully, and with correct intent is a good idea.

However, images must not be blurred, tiny or stretched. Also proper cropping is a must. The border should be solid as well. And when selecting a lot of images, the images must convey the correct meaning together. Moreover, the aspect ratio after stretching must be same as the original. You can do this in PowerPoint by going to format > crop > fill.

Ensure that watermarks are not revealed. Buy them rather than copy from somewhere for better outcome. And never amputate your readers with a headache creating backgrounds. You will loose readers then. The clip arts must be used in right number, and not a lot of them certainly.

Ensure both text and images are in correct ratios. Avoid using more than 2 images per slide.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Why ois my printer not printing pictjures?
    9·1 answer
  • Write the definition of a function half , which receives an integer parameter and returns an integer that is half the value of t
    7·1 answer
  • Which motherboard slot has direct access to the north bridge?
    7·1 answer
  • 1.Electromagnetic waves can carry more data at higher frequencies. Why would a scientist opt to transmit data at a lower frequen
    12·1 answer
  • You would like to conduct a survey and ask your web page visitors to indicate the computer operating systems that they use. Each
    10·1 answer
  • 334. Universal Containers uses a custom field on the account object to capture the account credit status. The sales team wants t
    12·1 answer
  • How do you customize calendar view​
    9·2 answers
  • For how long should a media piece hold the user's attention?
    13·2 answers
  • Select the three concepts of capital outlay.
    15·1 answer
  • This computer is used by touching your finger.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!