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]
4 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]4 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
a client device on your network is trying to authenticate via radius proxy, but is failing. you check the relevant policy on the
Varvara68 [4.7K]

The issue can be that the IP address of a RADIUS client differs from that of an access client. It could be necessary to modify the policy's IP address.

A device on the internet or a local network can be identified by its IP address, which is a special address. The rules defining the format of data delivered over the internet or a local network are known as "Internet Protocol," or IP.

IP address, which carry location information and make devices reachable for communication, are essentially the identifier that permits information to be exchanged between devices on a network. There must be a means for computers, routers, and webpages to be distinguished on the internet. A method for achieving this is provided by IP addresses, which are crucial to the operation of the internet.

A series of integers separated by periods makes up an IP address. Four numbers are used to represent IP addresses; for instance, 192.158.1.38 might be one such address. The range of each number in the set is 0 to 255. Therefore, the complete IP addressing range is 0.0.0.0 to 255.255.255.255.

To know more about IP address click on the link:

brainly.com/question/18722788

#SPJ4

6 0
1 year ago
Renee's creating a plan for her business's information system. What should she do after she determines the goals for her busines
stiks02 [169]

get organized because of the beging when she start she will want ot be nice and fresh on everything

7 0
4 years ago
To indent the first line of a paragraph which key should you use
JulijaS [17]
You need to press the spacebar
3 0
4 years ago
Read 2 more answers
What features could be improved in microsoft word?
Korolek [52]

Word (and the rest of the Office suit) suffers from feature creep and legacy cruft. This is a difficult problem because with so many users, removing features is impossible without upsetting a lot of people.

One option would be to split Word into two products: One, called Word, would be a completely new product with a clear focus on the experience of writing and formatting text. This would require ruthlessly cutting out any parts that don't support this goal, including some backwards compatibility.

The other product, called Word Classic, would maintain all the cruft that some people feel they might need. Since the experience would be so much worse, and the new Word would be more prominently displayed in the Office suit, this would help Word users gradually transition to the new product.

7 0
3 years ago
LAB: Praising dates
blsea [12.9K]

Answer:

Explanation:

The following is the entire modified code, it takes in the date as an input and continues changing the dates to the desired format. If the input format is wrong it says "Wrong Format" and requests another input. If -1 is passed as an input the program terminates.

        import java.util.Scanner;

        class DateParser {

public static int getMonthAsInt(String monthString) {

        int monthInt;

        switch (monthString) {

            case "January" :

                monthInt = 1;

                break;

            case "February":

                monthInt = 2;

                break;

            case "March":

                monthInt = 3;

                break;

            case "April":

                monthInt = 4;

                break;

            case "May":

                monthInt = 5;

                break;

            case "June":

                monthInt = 6;

                break;

            case "July":

                monthInt = 7;

                break;

            case "August":

                monthInt = 8;

                break;

            case "September":

                monthInt = 9;

                break;

            case "October":

                monthInt = 10;

                break;

            case "November":

                monthInt = 11;

                break;

            case "December":

                monthInt = 12;

                break;

            default:

                monthInt = 0;

                }

        return monthInt;

       }

        public static void main(String[] args) {

        Scanner scnr = new Scanner(System.in);

               // TODO: Read dates from input, parse the dates to find the one

        // in the correct format, and output in m/d/yyyy format  

 

                String date = "";

                while (!date.equals("-1")) {

                    String month = "";

                    String day = "";

                    String year = "";

                    System.out.println("Enter date:");

                    date = scnr.nextLine();

                    try {

                        year = date.substring((date.length()-4), date.length());

                        if (Character.isDigit(date.charAt(date.length()-8))) {

                            day = date.substring((date.length()-8), date.length()-6);

                            month = date.substring(0, date.length()-9);

                        } else {

                            day = date.substring((date.length()-7), date.length()-6);

                            month = date.substring(0, date.length()-8);

                        }

                        if ((year.length() == 4) && (day.length() > 0) && (day.length() <= 2) && (month.length() >= 3)) {

                            System.out.println(getMonthAsInt(month) + "/" + day + "/" + year);

                        } else {

                            System.out.println("Wrong Format");

                        }

                    } catch (Exception e) {

                        System.out.println("Wrong Format");

                    }

                }    

        }

}

4 0
3 years ago
Other questions:
  • An engineer is assigned to replace an older data-grade autonomous wireless network with a cisco controllerbased wireless network
    6·1 answer
  • Write a static method named textcount that takes a scanner representing a file as a parameter and that reports various statistic
    11·1 answer
  • Stella likes using social networking websites. Which Netiquette practice should Stella follow?
    9·2 answers
  • The file manager used in Microsoft Windows is
    11·1 answer
  • In the accompanying figure, the split double arrow mouse pointer____.
    7·1 answer
  • A _______ area network is a type of wireless network that works within your immediate surroundings to connect cell phones to hea
    9·2 answers
  • Explain with a few sentences and using the terms sequencing, selections and loops how they
    9·1 answer
  • Which of the following is the last step in creating a budget?
    13·1 answer
  • Please can someone help me with this?
    6·1 answer
  • HELP WILL GIVE BRAINLIEST !!!!!
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!