72.2k views
1 vote
To implement the various placement algorithms discussed for dynamic partitioning (see Section 7.2 ), a list of the free blocks of memory must be kept. For each of the three methods discussed (best-fit, first-fit, next-fit), what is the average length of the search?

User Voice
by
4.4k points

1 Answer

7 votes

Answer:

Check the explanation

Step-by-step explanation:

Consider the following data

Let S represent the average number of segments

Let H represent the average number of holes

The probability that there is a hole immediately after the segment is 0,

So, when there are s segments in memory, there must be


s X 0.5 or (s)/(2)

Best-fit: this analyses the entire memory partitions available

a. you’ll have to selects the least one which is capable of handling the process exec.. Memo, space wastage .n be reduced In some cases, there will be no memory wastage

The average length a search is
(s)/(2)

First-fit: This technique assigns Me the first hole that is big enough.

Searching Marts at the starting of Me set of holes.

The searching will be closed immediately a user gets a free hole that is big enough.

On an average it searches half of the set of holes.

The average length of search is Y2


(s/2)/(2) = (s)/(4)

User Optional
by
5.4k points