The main memory must be accommodate both Operating System and various user processes. The Operating System place in either low memory or high memory. There are so many method available for memory allocation like :
- Single Partition Allocation
- Fixed Equal Multiple Partition Allocation
- Fixed Variable Partition Allocation
- Dynamic Partition Allocation
1. Single Partition Allocation :
In this memory allocation method the Operating System reside in low memory and the remain memory is treated as single partition which only available for user space. The short term or CPU scheduler selects a job from ready queue the departure loads that job into main memory and connect CPU to that job.
Advantages :
- The main Advantage of this scheme is its simplicity.
Disadvantages :
- Poor utilization of the processor.
- Poor utilization of memory.
2. Fixed Equal Multiple Partition Allocation :
In this scheme the OS occupies the low memory and rest of main memory is available for user space. The user space is divided into fixed partition depending on OS. For example, total main memory size is 6MB, 1MB occupied by OS and remaining 5MB partitioned into equal fixed Partitions.
Advantages:
- It supports multi-programming.
- It require most special costly hardware.
Disadvantages :
- This scheme suffers from internal as well as external fragmentation.
- It does more memory then a single partition method.
3. Fixed Variable Partition Allocation :
In this scheme the user space divide into number of fixed partitions, but the partition size are different length. Operating System keep a table indicating which partition of memory are occupied or which are available. When a process is arrive and need memory, it search for partition large enough for this process. There are 3-types of algorithm available to build this.
- First Fit : Allocate the partition that is big enough. Searching can start either from low memory or high memory, we can stop searching as we find a free partition that is large enough.
- Best Fit : Allocate the smallest partition that big enough which having least internal fragmentation.
- Worst Fit : Search entire partition and select a partition which is largest of all or select a partition which having maximum internal fragmentation.
Advantages :
- this scheme support multi-programming.
- Efficient processor utilization and memory utilization is possible.
Disadvantages :
- It suffers from internal and external fragmentation.
4. Dynamic Partition Allocation :
To eliminate all disadvantages of fixed Partition, a new approach is introduce known as Dynamic Partition. In this method, partitions are created dynamically so that each process is loaded into partition of exactly the same size at that process. In this scheme boundary partition are dynamically changed and the boundaries are depend on size of processes.
Advantages :
- Though the partition are changed dynamically does not suffer from internal fragmentation.
- Efficient memory and processor utilization.
Disadvantages :
- This scheme suffering from external fragmentation.
No comments:
Post a Comment