OS MEMORY MANAGEMENT Flashcards
What is memory management
• Memory Management is the process of controlling and
coordinating computer memory.
• It also involves assigning portions known as blocks to various running
programs to optimize the overall performance of the system.
What is the importance of memory management
• It helps processes to move back and forward between the main
memory and execution disk.
• It helps OS to keep track of every memory location, irrespective of
whether it is allocated to some process or it remains free.
• It allows you to check how much memory needs to be allocated to
processes that decide which processor should get memory at what time.
• Tracks whenever inventory gets freed or unallocated. It allocates the
space to application routines.
• It also make sure that these applications do not interfere with each
other.
• Helps protect different processes from each other
• It places the programs in memory so that memory is utilized to its full
extent.
List the different memory management techniques
Single Contiguous allocation
Partitioned allocation
Paged Memory management
Segmented memory management
Describe and illustrate single contiguous allocation
• It is the easiest memory management technique.
• In this method, all types of computer’s memory except a small portion which is reserved for the OS is available for one application. For example, MS-DOS operating system allocates memory in this way. An embedded system also runs on a single application.
• One process occupies the RAM at any given
time
• When a process completes, another is
allocated the RAM
*See notes for pic
What is the main drawback of single contiguous allocation
Process memory size is always restricted by
RAM size
Describe and illustrate partitioned allocation
• It divides primary memory into various memory partitions, which is mostly contiguous areas of memory.
• Every partition stores all the information for a specific task or job. This method consists of allotting a partition to a job when it
starts & unallocate when it ends.
• An improvement, multiple processes can be allocated to memory. But, the space required MUST be contiguous.
*See notes for illustration
What is the main drawback of partition allocation
- The allocation and de-allocation process can however lead to fragmentation.
- Memory space available after the de-allocation is not contiguous.
- De-allocation may also create an overhead of merging partitions.
How does finding the best fit in a partition model affect performance
- Finding the right fit algorithm can make fragmentation worse
- A scan must be done to check which partition is right for a process. This affects the performance
- Performance degradation;
- Because of book keeping
- Management of partitions
Describe paged memory management
- This method divides the computer’s main memory into fixed-size units known as page frames.
- This hardware memory management unit maps pages into frames which should be allocated on a page basis
Describe Segmented Memory management
- Segmented memory is the only memory management method that does not provide the user’s program with a linear and contiguous address space.
- Segments need hardware support in the form of a segment table.
- It contains the physical address of the section in memory, size, and other data like access protection bits and status.
Describe segmentation-based virtual memory
The process known as segmentation is a virtual process that creates address spaces of various sizes in a computer system, called segments. Each segment is a different virtual address space that directly corresponds to process objects.
Give some advantages of a system with page-based virtual memory
It allows you to run more applications at once.
It helps you to fit many large programs into smaller programs.
Common data or code may be shared between memory.
Process may become even larger than all of the physical memory.