STORAGE PLACEMENT ALGORITHMS


When it is time to load a process into main memory and if there is more than one free block of memory of sufficient size, then the operating system must decide which free block to allocate.

Thus storage placement algorithms are used to decide where to place incoming process in the main memory.

There are four different placement algorithms for this purpose:

  • First Fit

  • Next Fit

  • Best Fit

  • Worst Fit

First Fit:

  • First Fit begins to scan memory from the begining and chooses the first available block that is large enough.

  • Thus it allocates the first hole that is large enough.

Edit

Next Fit:

  • Next Fit begins to scan memory from the location of last placement and chooses the next available block that is large enough.

  • Thus it does not scans the memory from the beginning.

Best Fit:

  • Best Fit searches the entire list of holes to find the smallest hole whose size is greater than or equal to the size of the process.

  • Thus it allocates the smallest hole that is big enough.

  • This strategy produces the smallest leftover hole that holes produced is the strategy are of small size.

Edit

Worst Fit:

  • It is just opposite the best algorithm.

  • Worst Fit searches the entire list of holes to find the largest hole and allocates it to the process.

  • This strategy produces the largest leftover hole that holes produced are of large size.

  • In such a situation the largest leftover hole can be easily allocated to any other process.

Advertisements

Give A message for us

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s