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
BlackZzzverrR [31]
3 years ago
14

Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125 KB (in order). The memory allocation algorithm th

at is used to place processes of size 115 KB, 500 KB, 358 KB, 200 KB, and 375 KB in the following order is the _______________.
Computers and Technology
1 answer:
Makovka662 [10]3 years ago
5 0

Answer:

The memory allocation algorithm that is used to place the processes given is the <u>First Fit Algorithm </u>

Explanation:

The First Fit Management Algorithm works by ensuring that the pointer keeps track of all the free spaces in the memory and accepts and executes all instructions to allocate a memory block to the coming process as long as it is big enough to hold the size of the process.

For example, the First Fit algorithm will allocate the processes in the first block that fits (that is, if it can fit the memory bock in the queue, then the process will be store)

It will work as follows (recall that the memory partitions are in order and must remain so):

A) 115 KB is stored in 300KB block, leaving the following free spaces (185KB, 600KB, 350KB, 200KB, 750KB, 125KB), next

B) 500 KB is store in a 600KB block leaving the following free spaces (185 KB, 100  KB, 350 KB, 200 KB, 750 KB, 125 KB), next  

C) 358 KB is stored in 750KB block, leaving the following free spaces (185KB, 100KB, 350KB, 200KB, 392KB, 125KB)  next

D) 200 KB is stored in 350KB block, leaving the following free spaces (185 KB, 100 KB, 150KB, 200KB, 392KB, 125KB)  next

E) 375KB is stored in 392KB block leaving (185KB, 100KB, 150KB,  200KB, 17KB, 125KB)

One of the demerits of this Algorithm is that, as shown above, memory is not maximized. It however is one of the easiest algorithms amongst all the other memory allocation processes.

Cheers

You might be interested in
A Game Object must have a Transform<br><br> True<br><br> False
vovikov84 [41]

Answer:

Yes

Explanation:because,have to update there apps or games and change there characters

3 0
3 years ago
Extend to also calculate and output the number of 1 gallon cans needed to paint the wal. Hint: Use a math function to round up t
Crank

Answer:

Here is the Python program:

import math #import math to use mathematical functions

height = float(input("Enter wall height (feet): ")) #prompts user to enter wall height and store it in float type variable height

width = float(input("Enter wall width (feet): ")) #prompts user to enter wall width and store it in float type variable width

area = height *width #computes wall area

print('Wall area: {} square feet'.format(round(area))) #displays wall area using round method that returns a floating-point number rounded

sqftPerGallon = 350 #sets sqftPerGallon to 350

paintNeeded = area/ sqftPerGallon #computes needed paint

print("Paint needed: {:.2f} gallons".format(paintNeeded)) #displays computed paint needed up to 2 decimal places

cansNeeded = int(math.ceil(paintNeeded)) #computes needed cans rounding the paintNeeded up to nearest integer using math.ceil

print("Cans needed: {} can(s)".format(cansNeeded)) #displays computed cans needed

colorCostDict = {'red': 35, 'blue': 25, 'green': 23} #creates a dictionary of colors with colors as key and cost as values

color = input("Choose a color to paint the wall: ") #prompts user to enter a color

if color in colorCostDict: #if the chosen color is present in the dictionary

    colorCost = colorCostDict.get(color) #then get the color cost from dictionary and stores it into colorCost using get method that returns the value(cost) of the item with the specified key(color)

    cost = cansNeeded * colorCost #computes the cost of purchasing paint of specified color per cansNeeded

  print("Cost of purchasing {} paint: ${}".format(color,colorCostDict[color])) #displays the real cost of the chosen color paint

print("Cost of purchasing {} paint per {} gallon can(s): ${}".format(color,cansNeeded, cost)) #displays the cost of chosen color paint per cans needed.

Explanation:

The program first prompts the user to enter height and width. Lets say user enter 20 as height and 50 as width so the program becomes:

Wall area computed as:

area = height *width

area = 20 * 50

area = 1000

Hence the output of this part is:

Wall area: 1000 square feet                                                                                                                     Next program computes paint needed as:

paintNeeded = area/ sqftPerGallon

Since sqftPerGallon = 350 and area= 1000

paintNeeded = 1000 / 350

paintNeeded = 2.86

Hence the output of this part is:

Paint needed: 2.86 gallons

Next program computes cans needed as:      

cansNeeded = int(math.ceil(paintNeeded))

This rounds the computed value of paintNeeded i.e. 2.86 up to nearest integer using math.ceil so,

cansNeeded = 3                                                                  

Hence the output of this part is:

Cans needed: 3 can(s)                                                                                                                            Next program prompts user to choose a color to paint the wall

Lets say user chooses 'blue'

So the program get the cost corresponding to blue color and multiplies this cost to cans needed to compute the cost of purchasing blue paint per gallon cans. So

cost = cansNeeded * colorCost

cost = 3 * 25

cost = 75

So the output of this part is:

Cost of purchasing blue paint per 3 gallon can(s): $75                                                                                        The screenshot of the program along with its output is attached.

5 0
3 years ago
How to cheat on asseeprep
Burka [1]
Just do it just look up the answers mate
6 0
3 years ago
Objects of the calculator class require no additional information when created. define an object named calc, of type calculator.
Grace [21]

Answer

calculator calc;

Explanation

An object is an instance of a class. And a class is what defines or describes the behavior or the state of the object of its type. When a class is defined no memory is allocated until when an object is created memory is allocated.

4 0
3 years ago
Read 2 more answers
What is an IF statement used for?
kiruha [24]

The IF statement is a decision-making statement that guides a program to make decisions based on specified criteria. The IF statement executes one set of code if a specified condition is met (TRUE) or another set of code evaluates to FALSE.

8 0
3 years ago
Other questions:
  • Please explain external hashing, B-trees, and traversals. 3-5 sentences per
    8·1 answer
  • Additional chemical hazards training must be provided to employees:
    12·1 answer
  • FIND THE 6 ERRORS IN THIS RESUME 30 POINTS!!!!
    12·1 answer
  • Complexities of communication are organized into successive layers of protocols: lower-level layers are more specific to medium,
    8·1 answer
  • Which type of element is , and what is the meaning of that element?
    8·1 answer
  • What term describes what an actor breaks when he addresses the audience directly from stage, like in Hamlet’s “to be or not to b
    13·2 answers
  • Public class Main{ public static void main(String [] args){ String name=WelcomeJava; Runnable r1=() -&gt; System.out.println(nam
    12·1 answer
  • True or False The two types of general construction projects are residential for homes or dwellings and commercial for a commerc
    7·1 answer
  • Why is experience in their own factory setting
    13·1 answer
  • You would like to see only the last 15 lines of /home/user/log file on your linux machine. Which command line interface (cli) co
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!