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.

Answers

Answer 1
Answer:

Using First fit algorithm:

  • P1 will be allocated to F4. With this, F4 will have a remaining space of 5MB from (205 - 200).
  • P2 will be allocated to F1. With this, F1 will have a remaining space of 85MB from (100 - 15).
  • P3 will be allocated F5. With this, F5 will have a remaining space of 115MB from (300 - 185).
  • 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).
  • P5 will be allocated to F6. With this, F6 will have a remaining space of 10MB from (185 - 175).
  • P6 will be allocated to F2. With this, F2 will have a remaining space of 90MB from (170 - 80).

Using Best-fit algorithm:

  • P1 will be allocated to F4. With this, F4 will have a remaining space of 5MB from (205 - 200).
  • P2 will be allocated to F3. With this, F3 will have a remaining space of 25MB from (40 - 15).
  • P3 will be allocated to F6. With this, F6 will have no remaining space as it is entirely occupied by P3.
  • P4 will be allocated to F1. With this, F1 will have a remaining space of of 25MB from (100 - 75).
  • P5 will be allocated to F5. With this, F5 will have a remaining space of 125MB from (300 - 175).
  • 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).
  • 100MB (F1), 170MB (F2), 40MB (F3), 205MB (F4), 300MB (F5) and 185MB (F6).

Using Worst-fit algorithm:

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

Properly labeling the six different processes would be:

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

Best fit algorithm is the best as the name suggests, while the worst fit algorithm is the worst as not all memory is allocated

Read more about memory partitions here:
brainly.com/question/12726841

Answer 2
Answer:

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.


Related Questions

The scope of a variable declared inside of a function is:a) Local - within that functionb) Within that file onlyc) global
Use the STL class vector to write a C function that returns true if there are two elements of the vector for which their product is odd, and returns false otherwise. Provide a formula on the number of scalar multiplications in terms of n, the size of the vector, to solve the problem in the best and worst cases. Describe the situations of getting the best and worst cases, give the samples of the input at each case and check if your formula works. What is the classification of the algorithm in the best and worst cases in terms of the Big-O notation
Identify a true statement about a flat file system. a. Data in a flat file system can be updated efficiently. b. Data in a flat file system may not be updated in all files consistently. c. Data duplication in a flat file system is very efficient. d. Data in a flat file system can be easily managed.
What are some of the common security weaknesses inherent in Unix or Linux based systems and what techniques can be used to harden these systems against an attack?
Suppose two computers (A & B) are directly connected through Ethernet cable. A is sending data to B, Sketch the waveform produced by A when “$” is sent. Also mention the OSI layer that is responsible for this.

Assign True to the variable has_dups if the string s1 has any duplicate character (that is if any character appears more than once) and False otherwise.Here is the answer I wrote:


i = []
for i in range(len([s1])):
if s1.count(s1[i]) > 1:
has_dups = True
elif s1.count(s1[i]) = 1:
has_dups = False


Here is the message I got from the system:

Solutions with your approach don't usually use: elif



Please Help me to correct it.

Answers

i dont know the language of the code
probably you have sintacs mistakes in it

has_dups = false
for i in range(len([s1])):
has_dups = has_dups || s1.count(s1[i]) > 1

When law enforcement becomes involved, the need may arise to freeze systems as part of the evidence. There is also the likelihood that the incident will become known publicly. Do you think these issues play a significant part in the decision to involve law enforcement? Why or why not? Can you name some situations in which you believe that large organizations have decided not to involve law enforcement?

Answers

Answer:

Costs will cover a need for more customer data. The further explanation is given below.

Explanation:

  • It's the greatest problem for almost every company to provide the data with security.
  • This is possible for highly trained practitioners and the technical staff to take charge of it.
  • Complicated technologies would have been going to run together again to withstand these types of jobs.
  • Such problems play a major part in the decision-making process affecting the law enforcement authorities to locate the suspects to strengthen the organization.
  • To do something like this, there seem to be a lot of other good initiatives out there doing it.

There have been some cases in which major corporations have chosen not to include law enforcement:

  • There are many more electronic corruption going on, including money robbery, asset fraud, as well as machine assaults.
  • In such a bigger case, numerous institutions, such as large-scale ones, have gone through these circumstances to evaluate law enforcement to come to terms with cybersecurity.

The study of a current business and information system application and the definition of user requirements and priorities for a new or improved information system are part of which phase? (Points : 2) Problem analysis phaseScope definition phase
Requirements analysis phase
Decision analysis phase
None of the above

Answers

Answer: Problem analysis phase

Explanation: Problem phase analysis is the mechanism that helps in studying the problems and issue that occur in the application and system of any business organization.It helps in identification of the reason and consequences of the detected problems.The requirements of user and resources to accomplish business system is also analyzed.

Other options are incorrect because scope definition phase is used for identification of the boundaries of any project regarding opportunities and issue in business .

Requirement analysis phase is used for gathering the need of the user and the condition requirement to fulfill a project. Decision phase analysis is done to bring out the best possible solution for any project. Thus, the correct option is problem analysis phase.

If you pay a subscription fee to use an application via the internet rather than purchasing the software outright, the app is called a/an -- application.

Answers

Answer:

Software as a Service (SaaS)

Explanation:

Cloud computing can be defined as a type of computing that requires shared computing resources such as cloud storage (data storage), servers, computer power, and software over the internet rather than local servers and hard drives.

Generally, cloud computing offers individuals and businesses a fast, effective and efficient way of providing services.

Cloud computing comprises of three (3) service models and these are;

1. Platform as a Service (PaaS).

2. Infrastructure as a Service (IaaS).

3. Software as a Service (SaaS).

Software as a Service (SaaS) can be defined as a cloud computing delivery model which involves the process of making licensed softwares available over the internet for end users on a subscription basis through a third-party or by centrally hosting it.

Hence, Software as a Service (SaaS) is an example of a cloud computing environment that provides users with a web based email service. Therefore, if you pay a subscription fee to use an application via the internet rather than purchasing the software outright, the app is called a Software as a Service (SaaS) application.

Some examples of SaaS applications are Salesforce, Google apps, Bigcommerce, Dropbox, Slack etc.

Develop a program that asks the user to enter a capital for a U.S. state. Upon receiving the user input, the program reports whether the user input is correct. For this application, the 50 states and their capitals are stored in a two-dimensional array in order by state name. Display the current contents of the array then use a bubble sort to sort the content by capital. Next, prompt the user to enter answers for all the state capitals and then display the total correct count. The user's answer is not case-sensitive.

Answers

Answer:try redoing everything step by step and see if that solves it

Explanation:

1. Do our shared social experiences lead us to think

communication is a cure-all?

Answers

Yes,  our shared social experiences lead us to think communication is a cure-all.

This is because, helps the individual in shaping their mental and emotional health for the rest of their life.

With shared social experiences , there would be communication among people and it serves as a cure-all.

Therefore, shared social experiences lead us to think communication is a cure-all.

Learn more about social experiences at:

brainly.com/question/24452126

Answer:

Yes

Explanation:

Shared social illustrations have always shown that any problem of any kind can be sorted by communication.

Eg : Whenever societies face any problem - eg recession, the competent people related to that area of problem (representing different interests of various groups also) sit & discuss (ie communicate in detail) about it.  

These communications have seen to be solution to all problems world has faced.

Other Questions