Basic of memory allocation in os
Memory allocation
Memory allocation is the process of reserving a partial or complete portion of computer memory for the execution of programs and processes. Memory allocation is achieved through a process known as memory management.
Memory allocation is primarily a computer hardware operation but is managed through operating system and software applications. Memory allocation process is quite similar in physical and virtual memory management. Programs and services are assigned with a specific memory as per their requirements when they are executed. Once the program has finished its operation or is idle, the memory is released and allocated to another program or merged within the primary memory.
Memory allocation has two core types;
- Static Memory Allocation: The program is allocated memory at compile time.
- Dynamic Memory Allocation: The programs are allocated with memory at run time.
Memory is allocated by program in two ways;
1.contiguous memory allocation:- contiguous memory allocation assign the consecutive block of memory to a process requesting for memory.
This is static memory allocation.
This is static memory allocation.
2. non contiguous memory allocation :- Non contiguous memory allocation assigns the desperate memory blocks at different , location in memory space in a non consecutive manner to a process requesting for memory .
This is dynamic memory allocation techniques.
This is dynamic memory allocation techniques.
Comments
Post a Comment