Monday 9 November 2020

Single Partition Memory Allocation Method in OS

 

Memory Allocation Methods in OS:

 

The main memory must accommodate both operating system and various user processes. The operating system may be placed in either lower memory or higher memory. It is common to place the operating system in lower memory. Consider the following fig:

OS in lower memory

Fig: OS in lower memory


 There are many methods available for memory allocation. These are as follows:

 

1.   Single Partition Allocation:

 

In this memory allocation method, the operating system resides in the lower memory and the remaining memory is treated as a single partition. This single partition is available for user space. Only one job can be loaded in this user space. Consider the following fig. that depicts single partition allocation.


Single partition memory allocation

Fig: Single partition memory allocation


The short term scheduler or CPU scheduler selects a job from the ready queue for execution. The dispatcher loads that job into main memory and connects the CPU to that job. The main memory consists of only one process at a time because; the user space is treated as a single partition.

 

 Advantages:

 

·         The main advantage of this scheme is its simplicity.

·         It does not require a great expertise to understand or use such a system.

 

 Disadvantages:

 

  1. The main disadvantage of this scheme is that, the main memory is not utilized fully. A lot of memory will waste in this scheme.
  2. Poor utilisation of processors.
  3. User’s job being limited to the size of available main memory.
  4. Poor utilization of memory.

 

Memory Management Function:

 

Memory Management is concerned with four functions. These are:

  1. Keeping track of memory
  2. Determining factor on memory policy
  3. Allocation of memory
  4. De-allocation of memory

 

Now we can observe these four functions to the single partition and memory management.

 

  1. Keeping track of memory: total memory is allocated to the job.
  2. Determining factor on memory policy: the job gets all memory when scheduled.
  3. Allocation of memory: all of it is allocated to the job.
  4. De-allocation of memory: when the job is done, the total memory will free.


No comments:

Post a Comment