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
prisoha [69]
1 year ago
11

Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125 KB (in order), how would the first-fit, best-fit,

and worst-fit algorithms place processes of size 115 KB, 500 KB, 358 KB, 200 KB, and 375 KB (in order)? Rank the algorithms in terms of how efficiently they use memory.
Computers and Technology
1 answer:
Inga [223]1 year ago
8 0

Answer:

In terms of efficient use of memory: Best-fit is the best (it still have a free memory space of 777KB and all process is completely assigned) followed by First-fit (which have free space of 777KB but available in smaller partition) and then worst-fit (which have free space of 1152KB but a process cannot be assigned). See the detail in the explanation section.

Explanation:

We have six free memory partition: 300KB (F1), 600KB (F2), 350KB (F3), 200KB (F4), 750KB (F5) and 125KB (F6) (in order).

Using First-fit

First-fit means you assign the first available memory that can fit a process to it.

  • 115KB will fit into the first partition. So, F1 will have a remaining free space of 185KB (300 - 115).
  • 500KB will fit into the second partition. So, F2 will have a remaining free space of  100KB (600 - 500)
  • 358KB will fit into the fifth partition. So, F5 will have a remaining free space of 392KB (750 - 358)
  • 200KB will fit into the third partition. So, F3 will have a remaining free space of 150KB (350 -200)
  • 375KB will fit into the remaining partition of F5. So, F5 will a remaining free space of 17KB (392 - 375)

Using Best-fit

Best-fit means you assign the best memory available that can fit a process to the process.

  • 115KB will best fit into the last partition (F6). So, F6 will now have a free remaining space of 10KB (125 - 115)
  • 500KB will best fit into second partition. So, F2 will now have a free remaining space of 100KB (600 - 500)
  • 358KB will best fit into the fifth partition. So, F5 will now have a free remaining space of 392KB (750 - 358)
  • 200KB will best fit into the fourth partition and it will occupy the entire space with no remaining space (200 - 200 = 0)
  • 375KB will best fit into the remaining space of the fifth partition. So, F5 will now have a free space of 17KB (392 - 375)

Using Worst-fit

Worst-fit means that you assign the largest available memory space to a process.

  • 115KB will be fitted into the fifth partition. So, F5 will now have a free remaining space of 635KB (750 - 115)
  • 500KB will be fitted also into the remaining space of the fifth partition. So, F5 will now have a free remaining space of 135KB (635 - 500)
  • 358KB will be fitted into the second partition. So, F2 will now have a free remaining space of 242KB (600 - 358)
  • 200KB will be fitted into the third partition. So, F3 will now have a free remaining space of 150KB (350 - 200)
  • 375KB will not be assigned to any available memory space because none of the available space can contain the 375KB process.
You might be interested in
A company is performing an analysis on the computers at its main office. The computers are spaced along a single row. The analys
harina [27]

Answer:

array = input("Enter the list of computer memory: ").split(',')

int_arr = [int(x) for x in array]

segment = int(input("Enter the length of segment to analyze: "))

list_len = len(int_arr)

segList = []

mini = []

for x,i in enumerate(int_arr):

   seg = int_arr[i-1:segment+i-1]

   if len(seg) == segment:

       segList.append(seg)

for x in segList:

   mini.append(min(x))

result = mini.index(min(mini))

print("Segment with the minimum memory is: ",segList[result])

Explanation:

The python program prints out the segment after analysis, with the smallest disk memory space. The code gets the array of computer rows from the user input and segments the array with the number of segment input, then the minimum is compared for all segments in the network.

5 0
1 year ago
Write a function PrintShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, pr
Finger [1]

Answer:

public static void PrintShampooInstructions(int numberOfCycles){

       if (numberOfCycles<1){

           System.out.println("Too Few");

       }

       else if(numberOfCycles>4){

           System.out.println("Too many");

       }

       else

           for(int i = 1; i<=numberOfCycles; i++){

               System.out.println(i +": Lather and rinse");

           }

       System.out.println("Done");

   }

Explanation:

I have used Java Programming language to solve this

Use if...elseif and else statement to determine and print "Too Few" or "Too Many".

If within range use a for loop to print the number of times

8 0
1 year ago
Read 2 more answers
What makes you normally visit the site-graphics, layout, or content? Why?​
Vinvika [58]

Answer:

robux

Explanation:

robux

8 0
1 year ago
Read 2 more answers
Why is project scope management so challenging in IT projects? What suggestions do you have for preventing scope creep in projec
seropon [69]

Answer:

Explanation:

<u>Ways to Avoid Scope Creep</u>

Scope creep is what happens when changes are made to the scope of a project without any control. Changes happen to projects all the time without been notify ontime as a project manager. It is that very rare project that ends up delivering exactly what was asked for on the first day. However, without there being some control over the changes, a project manager has little chance of keeping on top of the work and managing the project effectively.

Generally, scope creep is when new requirements are added after the project has commence. These changes are not properly reviewed. The project team is expected to deliver them with the same resources and in the same time as the original scope.

On the other hand, as a project manager you could end up with a project with lots of approved, considered changes, that never ends because every time you think you have finished a new requirement arrives in your inbox and you have to make more changes.

The following are five ways to keep control of your project.

<em>1-Document the Requirements</em>

<em>2-Set up Change Control Processes</em>

<em>3-Create a Clear Project Schedule</em>

<em>4-Verify the Scope with the Stakeholders</em>

<em>5-Engage the Project Team</em>

6 0
1 year ago
#include ... void sig_handler(){ static int i = 1; printf("Beep\n"); alarm(i); ++i; } int main(){ struct sigaction sa; sa.sa_fla
anygoal [31]

Answer:

Explained below

Explanation:

After the compiling the program it prints "Going to infinite loop" after that i started the timer till 4.5 sec. The program prints more than 4 beeps nearly 6-7 beep messages were printed.

The number "Beep" would always be strictly greater than 4.

Hence, if the above program is run for 7.5 seconds after it prints "Going in an infinite loop", it will print Beep for about 9-10 times. Hence, the number will always be greater than 7

3 0
2 years ago
Other questions:
  • Create a division formula.
    9·1 answer
  • The Pentium 4 Prescott processor, released in 2004, had a clock rate of 3.6 GHz and voltage of 1.25 V. Assume that, on average,
    8·1 answer
  • The Web can play a significant role in making large amounts of information available to decision makers. Decision makers must be
    10·1 answer
  • Given an alphabet, print all the alphabets up to and including the given alphabet.
    15·2 answers
  • Which of the following should get a Page Quality (PQ) rating of Low or Lowest? Select all that apply. True False A page with a m
    8·1 answer
  • In this problem, we want to compare the computational performance of symmetric and asymmetric algorithms. Assume a fast public-k
    11·1 answer
  • Complete the program below that takes in one positive, odd, integer, n (at least 3), and prints a "diamond" shape of stars with
    9·1 answer
  • Write any 5 activities that help to remove bad events from the society?​
    13·2 answers
  • Consider a disk that rotates at 3600 rpm. The seek time to move the head between adjacent tracks is 2 ms. There are 32 sectors p
    5·1 answer
  • Value is always _____________ aligned in a cell. ​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!