Question

scheduling algorithm with reason. You have five (5) memory partitions of 180 MB, 590 MB, 280...

scheduling algorithm with reason.

You have five (5) memory partitions of 180 MB, 590 MB, 280 MB, 380 MB, 700 MB which is in order, Do the best-fit, first-fit and worst-fit algorithms place processes of 315 MB, 420 MB, 230 MB, and 530 MB? Find the algorithm which makes the best use of the memory?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

We have five (5) memory partitions of 180 MB, 590 MB, 280 MB, 380 MB, 700 MB and processes of 315 MB, 420 MB, 230 MB, and 530 MB.

a) First-fit

The first-fit algorithm selects the first free partition that is large enough to accommodate the request.

First-fit would allocate in the following manner:

  • 315 MB => 590 MB partition, leaves a 275 MB partition
  • 420 MB => 700 MB partition, leaves a 280 MB partition
  • 230 MB => 280 MB partition, leaves a 50 MB partition
  • 530 MB would not be able to allocate, no partition large enough!

b) Best-fit

The best-fit algorithm selects the partition whose size is closest in size (and large enough) to the requested size.

Best-fit would allocate in the following manner:

  • 315 MB => 380 MB, leaving a 65 MB partition
  • 420 MB => 590 MB, leaving a 170 MB partition
  • 230 MB => 280 MB, leaving a 50 MB partition
  • 530 MB => 700 MB, leaving a 170 MB partition

c) Worst-fit

The worst-fit algorithm effectively selects the largest partition for each request.

Worst-fit would allocate in the following manner:

  • 315 MB => 700 MB, leaving a 385 MB partition
  • 420 MB => 590 MB, leaving a 170 MB partition
  • 230 MB => 380 KB, leaving a 150 MB partition
  • 530 MB would not be allowed to allocate as no partition is large enough!

d) Which algorithm makes the most efficient use of memory?

The best-fit algorithm performed the best of the three algorithms, as it was the only algorithm to meet all the memory requests.

Please give thumbsup, if you like it. Thanks.

Add a comment
Know the answer?
Add Answer to:
scheduling algorithm with reason. You have five (5) memory partitions of 180 MB, 590 MB, 280...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Given six memory partitions of 100 MB, 170 MB, 40 MB, 205 MB, 300 MB, and 185 MB (in order),

    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.

  • OPERATING SYSTEMS 1. Given six memory partitions of 100 MB, 170 MB, 40 MB, 205 MB,...

    OPERATING SYSTEMS 1. 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 in terms of fragmentation. 2. Consider a logical address space of 64...

  • Operating Systems 1.       Given memory partitions of 100 KB, 500 KB, 200 KB, 300 KB and...

    Operating Systems 1.       Given memory partitions of 100 KB, 500 KB, 200 KB, 300 KB and 600 KB (in order), how would each of the first-fit, best-fit and worst-fit algorithms place processes of 212 KB, 417 KB, 112 KB and 426 KB (in that order)? Which algorithm makes the most efficient use of memory?

  • Given six memory partitions of 800 KB,500 KB,350KB,200KB,450KB and 100 KB (in order), how would the...

    Given six memory partitions of 800 KB,500 KB,350KB,200KB,450KB and 100 KB (in order), how would the first-fit, best-fit and worst-fit algorithms place processes of size 315KB,600KB, 345KB, 110KB and 400KB(in order) i) Which algorithm makes the most efficient use of memory? ii) Are there any internal and external fragmentation? If yes, how it can be solved?

  • Memory partition placement algorithm

    Given five memory partitions of 100 KB, 300 KB, 200 KB, 500 KB, and 400 KB (in order), how would each of the first-fit, best-fit, and worst-fit algorithms place processes of 200 KB, 417 KB, 100 KB, 350 KB and 100 KB (arriving in order)? Be sure and discuss the differences in the placement in terms of memory usage.(If someone is capable of dumbing it down for me, I would greatly appreciate it.)

  • Please post in depth calculations not just the answers. Thank you Given the memory partitions A...

    Please post in depth calculations not just the answers. Thank you Given the memory partitions A (600 KB), B (800 KB), C (200 KB), D (700 KB) [in order], how would the following algorithms place processes P1 (150 KB), P2 (300 KB), P3 (600 KB) [in order]? First-fit Worst-fit

  • Given six memory partitions whose sizes (KB) in order are 300, 600, 350, 200, 750, and...

    Given six memory partitions whose sizes (KB) in order are 300, 600, 350, 200, 750, and 125, respectively, how would the first-fit, best-fit, and worst-fit algorithms placefive processes whose sizes (KB) in order are 115, 500, 358, 200, and 375, respectively? Please give your answers to the allocation strategy for each algorithm.

  • Dept. of Computer Science and Information Systems-CSIS College of Arts and Sciences AUK CSIS 310 Textbook...

    Dept. of Computer Science and Information Systems-CSIS College of Arts and Sciences AUK CSIS 310 Textbook Assignment ( 10 marks) AMERICAN UNIVERSITY of KUWAIT Q1) Consider a system consisting of four resources of the same type that are shared by seven processes, each of which needs at most two resources. Show that the system is deadlock or deadlock-free. (5 marks) Q2) Given five memory partitions of 120 KB, 380 KB, 410 KB, 232 KB, and 540 KB (in order), how...

  • Can somone show me how to do the 1st problem? Need to find the LS and...

    Can somone show me how to do the 1st problem? Need to find the LS and SS for the fit and the LH and SH for the hole. Fits are all SHAFT BASIS METRIC but the shaft and hole diameters can not be used right out of the table. This is because the 3mm shaft tolerance does not match. You will need to lookup the "Fit" from the table, and then use the LS (Largest Shaft) and SS (Smallest Shaft)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT