Saturday, 19 October 2013

Notes on Memory management

Notes on Memory management- 

Note:-  These notes are just bullet points for refreshing the knowledge on Memory management. This is not written with the intention to explain any concept or for reference. 

1.       Main memory and the registers build into the processors itself are storage that CPU directly access.

2 .       Registers are generally accessible within one CPU cycle of CPU clock.

3.       Protection on memory space is provided by two registers-
             ·         Base registers(Relocation register)- holds the smallest legal physical address.
             ·         Limit address- specifies the size of range

4.       Protection of memory is accomplished by having the CPU hardware compare every address (generated in user mode, ie generated by user code) is within the above two register address. Any attempt to access any memory outside the range is marked as fatal error.

5.       The runtime mapping from virtual to physical address is done by hardware device called Memory Management Unit(MMU)

6.       Dynamic loading – a routine is not loaded into memory until it is called.
           ·         Relocatable  linker table – loads the desired routines into the memory and updates the program address tables to reflect this change.

7.       Static Linking – In which the system language libraries are treated like any other object  module and combined by the loader into the binary program image.
  In dynamic linking –the linking is postponed until execution time.

8. Version information of library is included in both the program and library. More than one version of library can be loaded into the memory and each program uses its own version information to decide which copy of library to use.

9. Roll in & roll out- the process of swapping in and swapping out process for execution.

10. Relocation registers  = base registers of the process.
Physical address = logical address + base(Relocation)  register value.

11. Transient Operating system code – The OS code that is not required too frequently.

12. Variable partition scheme (M.V.T) = Satisfy the request of size ‘n’ from the list of available free holes.
       There are many suggestions to above problem,
·         First Fit
·         Best fit
·         Worst fit


      13. External fragmentation – it exists when there is enough total memory space to satisfy the request but the available spaces are not contiguous.
      
      14. Internal fragmentation – it is the unused memory that is internal to the partition. This occurs when we take the approach of breaking the physical memory into fixed sized partition and allocate in unit based on block size.

      15. Compaction – shuffling the memory contents as to place all the free memory space in once large block.

      16.  Backing store – the memory where the swapped out process is kept.
      
       17. Paging is the memory management scheme that permits physical address space of the process to be non contiguous.
·         It avoids external fragmentation.
·         Compaction is not needed.
·         Also saves the memory management problem in backing store.

       18. Frames – Breaking physical memory into fixed size of blocks called frame.
             Pages – breaking logical memory into fixed size of blocks called pages. 
       Page size is defined by the hardware.
       
        19. Frame table –it is the data structure that has entry for each physical page frame, indicating that whether              the later is free or allocated and if allocated to which page of which process

        20.   For protection - protection bits are used that is associated with each frame.

               We have access type buts and valid and invalid buts associated in page table.


No comments:

Post a Comment