Now we will discuss about the various memory allocation schemes.
Single Partition Allocation
In this scheme Operating system is residing in low memory and user processes are executing in higher memory.
Advantages * It is simple. * It is easy to understand and use.
Disadvantages
* It leads to poor utilization of processor and memory. * Users job is limited to the size of available memory.
Multiple-partition Allocation
One of the simplest methods for allocating memory is to divide memory into several fixed sized partitions. There are two variations of this. * Fixed Equal-size Partitions
It divides the main memory into equal number of fixed sized partitions, operating system occupies some fixed portion and remaining portion of main memory is available for user processes.
Advantages * Any process whose size is less than or equal to the partition size can be loaded into any available partition. * It supports multiprogramming.
Disadvantages * If a program is too big to fit into a partition use overlay technique. * Memory use is inefficient, i.e., block of data loaded into memory may be smaller than the partition. It is known as internal fragmentation. * Fixed Variable Size Partitions
By using fixed variable size partitions we can overcome the disadvantages present in fixed equal size partitioning. This is
shown in the figure below:
With unequal-size partitions, there are two ways to assign processes to partitions. * Use multiple queues:- For each and every process one queue is present, as shown in the figure below. Assign each process to the smallest partition within which it will fit, by using the scheduling queues, i.e., when a new process is to arrive it will put in the queue it is able to fit without wasting the memory space, irrespective of other blocks queues.
Advantages * Minimize wastage of memory.
Disadvantages * This scheme