The document proposes a bin packaging technique to reduce thrashing in virtual memory systems. Processes are split into groups where each group's total memory size is close to the real memory size. This grouping problem is NP-hard. The document suggests a greedy first-fit approach where processes are sorted by size and placed into bins one by one until the bin is full, then a new bin is started. Processes from each bin are loaded into memory in a round robin fashion to prevent thrashing between bins.
3. Bin Packaging:
Either uyou mst have enough physical
memory or you have to face paging!!!!!
But, paging is considerable and suitable way
to go with in it so many novel techniques are
used to handle paging for performance.
Thrashing is a situation in that ratio of paging
in & out is increased and tharashing is not
encouraged to be happpen.
In this paper authors have leesen this
tharshing to happen by placing several “bins”
KashiF-DAYO MSCCN-III
4. A set of all processes which are in virtual
memory are split into several groups, such
that the total memory size of each group is as
close as possible to the size of available real
memory.
Let Pi be the set of processes each with
memory allocation and Mi be the maximal
working set size needed by the process Pi.
Algorithm has to split Mi‟s into groups as few
as possible, such that sum of Mis ineach
group not exceeding the size of the real
memory.
KashiF-DAYO MSCCN-III
5. It is NP-hard problem.[Karp,19720
(A problem is NP-hard if an algorithm for
solving it can be translated into one for
solving any NP-problem.[mathworld.wolfram.com].
P & NP:- The question is whether, for all
problems for which a computer can verify a
given solution quickly (that is, in polynomial
time), it can also find that solution quickly.
The former describes the class of problems
termed NP, whilst the latter describes P.
KashiF-DAYO MSCCN-III
6. Approximation algorithm for „bin-
packaging‟ problem, one is known as
greedy approach also knowm as First-Fit
approach.
Sort the vector X1,X2,....,Xn by allocated
memory size.
Open a new bin and put heighest number
in it.
While ther are more numbers
KashiF-DAYO MSCCN-III
7. Loads the groups into ready queue in a
round robin fashion.
The processes in the real memory ll not
cause the thrashing because of the size of
each bin.
KashiF-DAYO MSCCN-III
Editor's Notes
An algorithm is said to be of polynomial time if its running time is upper bounded by a polynomial expression in the size of the input for the algorithm, i.e., T(n) = O(nk) for some constant k