Which algorithm makes the most efficient use of memory? (2024)

5.1kviews

Which algorithm makes the most efficient use of memory?

Also discuss partition selection algorithm in brief.

Given memory partition of 150k, 500k, 200k, 300k &550k (in order).

How would each pf the first fit , best fit and worst fit algorithm place the processes of 220k, 430k, 110k &425k (in order).

ADD COMMENTEDIT

1 Answer

472views

written 2.6 years ago byWhich algorithm makes the most efficient use of memory? (3)binitamayekar ★ 6.5k

MEMORY ALLOCATION ALGORITHMS

Given Memory Partition = 150 KB, 500 KB, 200 KB, 300 KB, and 550 KB (in order),

how would each algorithm place processes of size 220 KB, 430 KB, 110 KB & 425 KB (in order)?

First Fit:

In the first fit, a partition is allocated which is first sufficient from the top of Main Memory.

  • 220 KB is put in a 500 KB partition. 220KB => 500 KB partition, leaves a 280 KB partition
  • 430 KB is put in a 550 K partition. 430 KB => 550 KB partition, leaves a 120 KB partition
  • 110 KB is put in a 280 K partition (new partition 280 KB = 500 KB - 220 KB). 110 KB => 280 KB partition, leaves a 170 KB partition
  • 425 KB must wait. Because 425 KB would not be able to allocate, no partition large enough!

Fastest algorithm because it searches as little as possible. The remaining unused memory areas left after allocation become waste if it is too smaller. Thus request for a larger memory requirement cannot be accomplished.

Best-fit:

Allocate the process to the partition which is the first smallest sufficient partition among the free available partition.

  • 220 KB is put in a 300 KB partition. 220 KB => 300 KB, leaving a 80 KB partition
  • 430 KB is put in a 500 KB partition. 430 KB => 500 KB, leaving a 70 KB partition
  • 110 KB is put in a 150 KB partition. 110 KB => 150 KB, leaving a 40 KB partition
  • 425 KB is put in a 550 KB partition. 425 KB => 550 KB, leaving a 125 KB partition

Memory utilization is much better than the first fit as it searches the smallest free partition first available. It is slower and may even tend to fill up memory with tiny useless holes.

Worst-fit:

Allocate the process to the partition which is largest sufficient among the freely available partitions available in the main memory.

  • 220 KB is put in a 550 KB partition. 220 KB => 550 KB, leaving a 330 KB partition
  • 430 KB is put in a 500 KB partition. 430 KB => 500 KB, leaving a 70 KB partition
  • 110 KB is put in a 330 KB partition. 110 KB => 330 KB (new partition 330 KB = 550 KB - 220 KB)., leaving a 220 KB partition
  • 425 KB must wait. Because 425 KB would not be allowed to allocate as no partition is large enough!

Reduces the rate of production of small gaps. If a process requiring larger memory arrives at a later stage then it cannot be accommodated as the largest hole is already split and occupied.

In this problem, the Best-Fit Algorithm makes the most efficient use of memory because it was the only algorithm that meet all the memory requests.

ADD COMMENTEDIT

Please log in to add an answer.


Which algorithm makes the most efficient use of memory? (2024)
Top Articles
What is Noise Cancellation and what can I expect?
How Dave & Buster's Inspires Employees in the Millennial Age
Lowe's Garden Fence Roll
Roblox Roguelike
Rabbits Foot Osrs
Georgia Vehicle Registration Fees Calculator
Www.craigslist Augusta Ga
Sprague Brook Park Camping Reservations
Pbr Wisconsin Baseball
Anki Fsrs
Edgar And Herschel Trivia Questions
Keurig Refillable Pods Walmart
Chicken Coop Havelock Nc
Oc Craiglsit
Mineral Wells Independent School District
State HOF Adds 25 More Players
Convert 2024.33 Usd
Violent Night Showtimes Near Amc Fashion Valley 18
Free Online Games on CrazyGames | Play Now!
Graphic Look Inside Jeffrey Dahmer
Harrison County Wv Arrests This Week
Urbfsdreamgirl
Maine Racer Swap And Sell
Nearest Ups Ground Drop Off
This Is How We Roll (Remix) - Florida Georgia Line, Jason Derulo, Luke Bryan - NhacCuaTui
Darktide Terrifying Barrage
Elanco Rebates.com 2022
Kattis-Solutions
Kips Sunshine Kwik Lube
Craigslist Greencastle
Final Exam Schedule Liberty University
Midsouthshooters Supply
Cheetah Pitbull For Sale
Is The Nun Based On a True Story?
20 bank M&A deals with the largest target asset volume in 2023
Hireright Applicant Center Login
F9 2385
Dispensaries Open On Christmas 2022
Oppenheimer Showtimes Near B&B Theatres Liberty Cinema 12
Seminary.churchofjesuschrist.org
Luciane Buchanan Bio, Wiki, Age, Husband, Net Worth, Actress
Doublelist Paducah Ky
Powerboat P1 Unveils 2024 P1 Offshore And Class 1 Race Calendar
Timothy Warren Cobb Obituary
Bmp 202 Blue Round Pill
Plasma Donation Greensburg Pa
Greg Steube Height
Walmart Front Door Wreaths
18443168434
Sam's Club Fountain Valley Gas Prices
Craigs List Sarasota
Haunted Mansion Showtimes Near The Grand 14 - Ambassador
Latest Posts
Article information

Author: Greg Kuvalis

Last Updated:

Views: 5948

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Greg Kuvalis

Birthday: 1996-12-20

Address: 53157 Trantow Inlet, Townemouth, FL 92564-0267

Phone: +68218650356656

Job: IT Representative

Hobby: Knitting, Amateur radio, Skiing, Running, Mountain biking, Slacklining, Electronics

Introduction: My name is Greg Kuvalis, I am a witty, spotless, beautiful, charming, delightful, thankful, beautiful person who loves writing and wants to share my knowledge and understanding with you.