Memory management is a function in OS that can be used for the allocation and management of the main memory of a computer. The memory management function helps in keeping track of the status of all the memory locations, either free or allocated, so as to ensure efficient and effective usage of the primary memory.
This technique of memory management is of the following two types: contiguous, non-contiguous. In the case of a contiguous technique, the process of execution has been loaded into the main memory entirely. This technique can be further divided into the following: Static or Fixed Partitioning and Dynamic or Variable Partitioning.
In this article, we will look more into the Fixed Partitioning in Operating System according to the GATE Syllabus for (Computer Science Engineering) CSE. We will read ahead to find out more about it.
Table of Contents
- What is Fixed Partitioning in Operating Systems?
- Pros of Fixed Partitioning
- Cons of Fixed Partitioning
What is Fixed Partitioning in Operating Systems?
Fixed partitioning is the simplest and the oldest technique that puts multiple processes in the main memory. The total number of partitions (the non-overlapping ones) present in the RAM is fixed in this type of partitioning, but the sizes of all the partitions might or might not be similar.
The OS resides in the first partition, and all the other partitions help in storing the user processes. The memory here is assigned to all the processes in a contiguous manner. No spamming is allowed since it is a contiguous allocation. In this case, partitions are supposed to be made during system configuration or before execution.
In the case of fixed partitioning,
- None of the partitions can overlap.
- For execution, a process has to be present contiguously in a partition.
As you can see in the figure illustrated above, the very first process here consumes only 1MB in the main memory out of 4MB.
Thus, the internal fragmentation in first block = (4-1) MB = 3 MB
The sum of internal fragmentation in all the individual blocks = (4-1) MB + (16-14) + (8-7) MB + (8-7) MB = 3 MB +2 MB +1 MB +1 MB = 7MB
Suppose that the process P5 has a size of 7MB. Now, this process can’t get accommodated even if there’s free space available since we have contiguous allocation (because spinning won’t be allowed). Thus, 7 MB would become part of external fragmentation.
There are various pros and cons of fixed partitioning. Let us discuss some of them in detail.
Pros of Fixed Partitioning
1. Easy Implementation
The algorithms that are required for implementing fixed partitioning are pretty easy to implement. They simply require putting the processes into certain partitions without focusing at all on the emergence of external and internal fragmentation.
2. Lower OS Overhead
The fixed partitioning process requires lower excess along with indirect computational power.
Cons of Fixed Partitioning
1. External Fragmentation
As stated earlier, the total space that is unused in multiple partitions can’t be utilised for loading the process even if there’s some space available, but it’s not in a contiguous form (because spinning isn’t allowed in this case).
2. Internal Fragmentation
The use of the main memory is inefficient. Any given program occupies a partition as a whole, irrespective of how small it might be. It leads to internal fragmentation.
3. Limiting the Process Size
A process size that is greater than the overall size of the partition present in the main memory can never be accommodated. The size of the partition can’t be varied in accordance with the size of the incoming process. Thus, there exists a limitation on the process size. It can’t be larger than the actual size of the largest partition.
4. Lesser Degree of Multiprogramming
By the term degree of multiprogramming, we just mean the max number of processes that one can load into the memory at the very same time. In the case of fixed partitioning, the degree of multiprogramming remains fixed, and it is very less since the partition size cannot be varied according to the process size. The partitions are made in the main memory during the system configuration or before execution. The main memory is now divided into a fixed number of partitions. Now, if there are some partitions in RAM and some processes, then it has to fulfil a condition – the total number of processes that are greater than the total number of partitions in RAM happens to be invalid in fixed partitioning.
Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2023, GATE Admit Card, GATE Syllabus, GATE Previous Year Question Paper, and more.
Also Explore,
- Batch Operating System
- Binary Semaphores in Operating System
- Contiguous Memory Allocation in Operating System
- Counting Semaphores in Operating System
- Deadlock Detection and Recovery in Operating System
- Deadlock Prevention in Operating System
- Distributed Operating System
- Dynamic Partitioning in Operating System
- Functions of Operating System
- Operating System GATE Questions
- Methods for Handling Deadlock in Operating System
- Multiprocessing Operating System
- Multiprogramming Operating System
- Multitasking Operating System
- Network Operating System
- Non-Contiguous Memory Allocation in Operating System
- Operating System Services
- Paging in OS
- Process in Operating System
- Process Scheduler in Operating System
- Process Scheduling in Operating System
- Process State in Operating System
- Real-Time Operating System
- Resource Allocation Graph in Operating System
- Semaphores in Operating System
- Time-Sharing Operating System
- Types of Operating System