Contiguous memory allocation in OS
Contiguous memory allocation
- Contiguous memory allocation is a classical memory allocation model that assigns a process consecutive memory blocks (that is, memory blocks having consecutive addresses).
- Contiguous memory allocation is one of the oldest memory allocation schemes. When a process needs to execute, memory is requested by the process.
- The size of the process is compared with the amount of contiguous main memory available to execute the process. If sufficient contiguous memory is found, the process is allocated memory to start its execution. Otherwise, it is added to a queue of waiting processes until sufficient free contiguous memory is available.
- The contiguous memory allocation scheme can be implemented in operating systems with the help of two registers, known as the base and limit registers.
- When a process is executing in main memory, its base register contains the starting address of the memory location where the process is executing, while the amount of bytes consumed by the process is stored in the limit register.
- A process does not directly refer to the actual address for a corresponding memory location. Instead, it uses a relative address with respect to its base register. All addresses referred by a program are considered as virtual addresses.
There are two types of method used in Contiguous memory allocation .
1. Fixed partition
2. Variable partition.
To know more about fixed and variable partition follow our website .
Thank you viewers
This is published by soumy Sinha...
Comments
Post a Comment