Multiprogramming With A Variable Number of Tasks (MVT)

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 14

MULTIPROGRAMMING WITH A

VARIABLE NUMBER OF TASKS


(MVT)
-No pre-decided partitions.
- The OS have a reserved partition for itself.
There will be no internal fragmentation since the partitions are not
decided earlier and their memory allocations are non-contigious in
MVT.
Non-Contiguous allocation, process can be divided into
different parts and hence filling the space in main memory.

Let’s say P1 was already


executed and left a 70K
memory allocation, P3 will be
allocated in a free space.
Non-Contiguous allocation, process can be divided into
different parts and hence filling the space in main memory.

P4 will allocate itself as


well in the available
spaces in the memory.
Advantages and Disadvantages
Advantages
- No Internal Fragmentation
- No limitations on no. of partitions
- No limitations on size of processes.
Disadvantages
- External Fragmentation
- It’s a more difficult approach to implement
SOLUTION FOR THE DISADVANTAGE
OF USING EXTERNAL
FRAGMENTATION
We’ll use a technique called COMPACTION to make a new block
of partition from free memory allocations after a process was
executed.

Let’s say P1 was already executed


and left a 70K memory allocation
We’ll use a technique called COMPACTION to make a new block
of partition from free memory allocations after a process was
executed.

Due to compaction, the free spaces


From P1 and from the bottom
partition will be combined together
To make a new block with 80K space
of partitions.
We’ll use a technique called COMPACTION to make a new block
of partition from free memory allocations after a process was
executed.

Now either P3 or P4 can be


allocated in the free space.
Let’s use P3 for example, there’s
no space available for P4 so it has
to wait for another process to finish
and use it’s free space to make
another new block with the free 40K
allocated memory.
We’ll use a technique called COMPACTION to make a new block
of partition from free memory allocations after a process was
executed.

You might also like