Open In App

Fixed (or static) Partitioning in Operating System

Last Updated : 20 Sep, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Fixed partitioning, also known as static partitioning, is a memory allocation technique used in operating systems to divide the physical memory into fixed-size partitions or regions, each assigned to a specific process or user. Each partition is typically allocated at system boot time and remains dedicated to a specific process until it terminates or releases the partition.

  1. In fixed partitioning, the memory is divided into fixed-size chunks, with each chunk being reserved for a specific process. When a process requests memory, the operating system assigns it to the appropriate partition. Each partition is of the same size, and the memory allocation is done at system boot time.
  2. Fixed partitioning has several advantages over other memory allocation techniques. First, it is simple and easy to implement. Second, it is predictable, meaning the operating system can ensure a minimum amount of memory for each process. Third, it can prevent processes from interfering with each other’s memory space, improving the security and stability of the system.
  3. However, fixed partitioning also has some disadvantages. It can lead to internal fragmentation, where memory in a partition remains unused. This can happen when the process’s memory requirements are smaller than the partition size, leaving some memory unused. Additionally, fixed partitioning limits the number of processes that can run concurrently, as each process requires a dedicated partition.

Overall, fixed partitioning is a useful memory allocation technique in situations where the number of processes is fixed, and the memory requirements for each process are known in advance. It is commonly used in embedded systems, real-time systems, and systems with limited memory resources.

In operating systems, Memory Management is the function responsible for allocating and managing a computer’s main memory. Memory Management function keeps track of the status of each memory location, either allocated or free to ensure effective and efficient use of Primary Memory. 

There are two Memory Management Techniques:

  1. Contiguous
  2. Non-Contiguous

In Contiguous Technique, executing process must be loaded entirely in the main memory.

Contiguous Technique can be divided into: 

  • Fixed (or static) partitioning 
  • Variable (or dynamic) partitioning 
     

Fixed Partitioning: 
This is the oldest and simplest technique used to put more than one process in the main memory. In this partitioning, the number of partitions (non-overlapping) in RAM is fixed but the size of each partition may or may not be the same. As it is a contiguous allocation, hence no spanning is allowed. Here partitions are made before execution or during system configure. 

 

Fixed Partitioning



As illustrated in above figure, first process is only consuming 1MB out of 4MB in the main memory. 
Hence, Internal Fragmentation in first block is (4-1) = 3MB. 
Sum of Internal Fragmentation in every block = (4-1)+(8-7)+(8-7)+(16-14)= 3+1+1+2 = 7MB. 

Suppose process P5 of size 7MB comes. But this process cannot be accommodated in spite of available free space because of contiguous allocation (as spanning is not allowed). Hence, 7MB becomes part of External Fragmentation. 

There are some advantages and disadvantages of fixed partitioning. 

Advantages of Fixed Partitioning –  

  • Easy to implement: The algorithms needed to implement Fixed Partitioning are straightforward and easy to implement.
  • Low overhead: Fixed Partitioning requires minimal overhead, which makes it ideal for systems with limited resources.
  • Predictable: Fixed Partitioning ensures a predictable amount of memory for each process.
  • No external fragmentation: Fixed Partitioning eliminates the problem of external fragmentation.
  • Suitable for systems with a fixed number of processes: Fixed Partitioning is well-suited for systems with a fixed number of processes and known memory requirements.
  • Prevents processes from interfering with each other: Fixed Partitioning ensures that processes do not interfere with each other’s memory space.
  • Efficient use of memory: Fixed Partitioning ensures that memory is used efficiently by allocating it to fixed-sized partitions.
  • Good for batch processing: Fixed Partitioning is ideal for batch processing environments where the number of processes is fixed.
  • Better control over memory allocation: Fixed Partitioning gives the operating system better control over the allocation of memory.
  • Easy to debug: Fixed Partitioning is easy to debug since the size and location of each process are predetermined.
     

Disadvantages of Fixed Partitioning – 

  1. Internal Fragmentation: 
    Main memory use is inefficient. Any program, no matter how small, occupies an entire partition. This can cause internal fragmentation. 
     
  2. External Fragmentation: 
    The total unused space (as stated above) of various partitions cannot be used to load the processes even though there is space available but not in the contiguous form (as spanning is not allowed). 
     
  3. Limit process size: 
    Process of size greater than the size of the partition in Main Memory cannot be accommodated. The partition size cannot be varied according to the size of the incoming process size. Hence, the process size of 32MB in the above-stated example is invalid. 
     
  4. Limitation on Degree of Multiprogramming: 
    Partitions in Main Memory are made before execution or during system configure. Main Memory is divided into a fixed number of partitions. Suppose if there are n1          partitions in RAM and n2          are the number of processes, then n2 <= n1          condition must be fulfilled. Number of processes greater than the number of partitions in RAM is invalid in Fixed Partitioning.  

Here are some reference books on operating system concepts that cover memory management:

  1. “Operating System Concepts” by Abraham Silberschatz, Peter Baer Galvin, and Greg Gagne.
  2. “Modern Operating Systems” by Andrew S. Tanenbaum.
  3. “Operating Systems: Three Easy Pieces” by Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau.
  4. “Linux Kernel Development” by Robert Love.
  5. “Windows Internals” by Mark Russinovich and David Solomon.
  6. These books provide in-depth coverage of operating system concepts and are widely regarded as standard references in the field.

Fixed Partitioning – FAQ’s

1. What are the advantages of Fixed Partitioning?

Fixed Partitioning is simple to implement and requires less overhead compared to dynamic memory allocation methods. It also ensures that each process gets a fixed amount of memory, preventing one process from consuming all available memory.

2 What are the limitations of Fixed Partitioning?

One major limitation is that it can lead to internal fragmentation, where the allocated memory space in a partition is not fully utilized, wasting memory. Additionally, Fixed Partitioning doesn’t handle varying process sizes efficiently and can result in inefficient memory utilization.

3. How does internal fragmentation occur in Fixed Partitioning?

Internal fragmentation occurs when a process’s size is smaller than the allocated partition. The unused memory within the partition is wasted, leading to inefficient memory usage.



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads