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
aivan3 [116]
3 years ago
10

Given six memory partitions of 100 MB, 170 MB, 40 MB, 205 MB, 300 MB, and 185 MB (in order), how would the first-fit, best-fit,

and worst-fit algorithms place processes of size 200 MB, 15 MB, 185 MB, 75 MB, 175 MB, and 80 MB (in order)? Indicate which—if any—requests cannot be satisfied. Comment on how efficiently each of the algorithms manages memory.
Computers and Technology
1 answer:
nlexa [21]3 years ago
8 0

Answer:

We have six memory partitions, let label them:

100MB (F1), 170MB (F2), 40MB (F3), 205MB (F4), 300MB (F5) and 185MB (F6).

We also have six processes, let label them:

200MB (P1), 15MB (P2), 185MB (P3), 75MB (P4), 175MB (P5) and 80MB (P6).

Using First-fit

  1. P1 will be allocated to F4. Therefore, F4 will have a remaining space of 5MB from (205 - 200).
  2. P2 will be allocated to F1. Therefore, F1 will have a remaining space of 85MB from (100 - 15).
  3. P3 will be allocated F5. Therefore, F5 will have a remaining space of 115MB from (300 - 185).
  4. P4 will be allocated to the remaining space of F1. Since F1 has a remaining space of 85MB, if P4 is assigned there, the remaining space of F1 will be 10MB from (85 - 75).
  5. P5 will be allocated to F6. Therefore, F6 will have a remaining space of 10MB from (185 - 175).
  6. P6 will be allocated to F2. Therefore, F2 will have a remaining space of 90MB from (170 - 80).

The remaining free space while using First-fit include: F1 having 10MB, F2 having 90MB, F3 having 40MB as it was not use at all, F4 having 5MB, F5 having 115MB and F6 having 10MB.

Using Best-fit

  1. P1 will be allocated to F4. Therefore, F4 will have a remaining space of 5MB from (205 - 200).
  2. P2 will be allocated to F3. Therefore, F3 will have a remaining space of 25MB from (40 - 15).
  3. P3 will be allocated to F6. Therefore, F6 will have no remaining space as it is entirely occupied by P3.
  4. P4 will be allocated to F1. Therefore, F1 will have a remaining space of of 25MB from (100 - 75).
  5. P5 will be allocated to F5. Therefore, F5 will have a remaining space of 125MB from (300 - 175).
  6. P6 will be allocated to the part of the remaining space of F5. Therefore, F5 will have a remaining space of 45MB from (125 - 80).

The remaining free space while using Best-fit include: F1 having 25MB, F2 having 170MB as it was not use at all, F3 having 25MB, F4 having 5MB, F5 having 45MB and F6 having no space remaining.

Using Worst-fit

  1. P1 will be allocated to F5. Therefore, F5 will have a remaining space of 100MB from (300 - 200).
  2. P2 will be allocated to F4. Therefore, F4 will have a remaining space of 190MB from (205 - 15).
  3. P3 will be allocated to part of F4 remaining space. Therefore, F4 will have a remaining space of 5MB from (190 - 185).
  4. P4 will be allocated to F6. Therefore, the remaining space of F6 will be 110MB from (185 - 75).
  5. P5 will not be allocated to any of the available space because none can contain it.
  6. P6 will be allocated to F2. Therefore, F2 will have a remaining space of 90MB from (170 - 80).

The remaining free space while using Worst-fit include: F1 having 100MB, F2 having 90MB, F3 having 40MB, F4 having 5MB, F5 having 100MB and F6 having 110MB.

Explanation:

First-fit allocate process to the very first available memory that can contain the process.

Best-fit allocate process to the memory that exactly contain the process while trying to minimize creation of smaller partition that might lead to wastage.

Worst-fit allocate process to the largest available memory.

From the answer given; best-fit perform well as all process are allocated to memory and it reduces wastage in the form of smaller partition. Worst-fit is indeed the worst as some process could not be assigned to any memory partition.

You might be interested in
Practice with CSS. a. Write the CSS for an HTML selector footer with the following characteristics: a light-blue background colo
Nitella [24]

Answer:

Explanation:

/*# represents ID selector

*/

#feature{

font-family: 'Arial';

font-size: 10px;

color: red;

background: white;

width: 80%;

filter: drop-shadow(30px 10px 4px #4444dd);

}

8 0
3 years ago
A potential customer wants to find out how blockchain can benefit their company and why they should use Accenture’s Multi-party
grandymaker [24]

Answer:

maybe blockchain can help them in term of security

6 0
3 years ago
Ms word
goldenfox [79]
  1. Answer:

I have no idea about this worksir

Explanation:

ok sir I dont know sfe

6 0
3 years ago
Given a two-dimensional array x of element type double, and two integer variables i and j, write an expression whose value is th
SVETLANKA909090 [29]

Answer:

The expression which represent  the value is the i-th element of  the j-th row is  x[i][j].

Explanation:

As given in the question that the array is two-dimensional array means that it stores the elements in the row and column format .In the given question i and j are two variable where i representing the row in the two-dimensional array and j represent the column in the two-dimensional array .

So the expression which represented  the value of the i-th element of  the j-th row is x[i][j].it means firstly it fetches all the row of the first column then soon.

5 0
3 years ago
what do we know about the contents of the arrays left and right with respect to what objects (integers) they contain in general
KIM [24]

A "divide and conquer" approach known as binary search necessitates sorting the starting array first. Because the technique divides the array into two equal halves, it is called a binary algorithm. A binary search will initially examine the middle item in the array and evaluate it in relation to the search terms.

<h3>What exactly is binary search?</h3>
  • Finding an element's location in a sorted array can be done using the searching method known as binary search.
  • With this method, an array's middle is always searched for the element. Only on a list of things that has been sorted can binary search be used. If the elements are not sorted already, we need to sort them first.
  • Binary search is used to find values in any sorted collection from any language library, including Java,.NET, C++ STL, etc.
  • A sorted array can be searched using the binary search algorithm by continually halving the search interval. Utilizing the knowledge that the array is sorted, binary search attempts to minimize the time complexity to O (Log n).

To Learn more about binary search refer:

brainly.com/question/21475482

#SPJ4

3 0
1 year ago
Other questions:
  • A 16M X 16 main memory is built using 512K X 8 RAM chips and memory is word addressable.
    13·1 answer
  • Renee's creating a plan for her business's information system. What should she do after she determines the goals for her busines
    10·1 answer
  • ______is a multimodal application software platform. the centrealized and shared database system ties the entire organization to
    10·1 answer
  • Which type of NAC agent will be used during the posture assessment before allowing access to the VPN users?
    9·1 answer
  • A(n) ____________________ is hardware or software that blocks or allows transmission of information packets based on criteria su
    13·1 answer
  • Which of the following is a hardware component used to hold the BitLocker encryption key and ensures encrypted data is not acces
    5·1 answer
  • How ssd is better than normal sata and pata HDD​
    11·1 answer
  • I have a problem with my Nintendo DS lite does anyone know how to fix it?
    8·1 answer
  • How can you find the square root of 8 using the pow() function
    10·1 answer
  • Create the HTML code for this
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!