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:
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.
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:
- The main disadvantage of this
scheme is that, the main memory is not utilized fully. A lot of memory
will waste in this scheme.
- Poor utilisation of processors.
- User’s job being limited to the
size of available main memory.
- Poor utilization of memory.
Memory Management Function:
Memory Management is concerned with four functions. These
are:
- Keeping track of memory
- Determining factor on memory policy
- Allocation of memory
- De-allocation of memory
Now we can observe these four functions to the single
partition and memory management.
- Keeping track of memory: total
memory is allocated to the job.
- Determining factor on memory
policy: the job gets all memory when scheduled.
- Allocation of memory: all of it
is allocated to the job.
- De-allocation of memory: when the
job is done, the total memory will free.
No comments:
Post a Comment