Seminar Presentation
On
MEMORY MANAGEMENT
Submitted By:-
Sohil Sundaram
BCA – 2nd SEM
Roll No. 30
Submitted To:-
Mr. Dinesh Dobhal
Sohil Sundaram, 30
OPERATING SYSTEM
 Program to manage Computer Hardware.
 Provide base for Application programs.
 Acts as an intermediary between user and hardware.
 Supports Complex games, business applications, etc. .
Sohil Sundaram, 30
Memory - Definition
 Physical device capable of storing information.
 Is central to the operation of a modern computer system.
 Consists of large array of words or bytes, each with its own address.
Sohil Sundaram, 30
NEED OF
MEMORY MANAGEMENT
 To manage the Primary Memory of OS.
 To optimize overall performance of Computer System.
 Helps in CPU Scheduling.
Sohil Sundaram, 30
Working Process
 Determines how memory is allocate among competing processes ?
 Which get memory and how much ?
 Which memory location ?
 After Execution, free the memory.
Sohil Sundaram, 30
Address Binding
 To Bring the process into memory.
 Compile Time : Process reside in memory.
 Load Time : Compiler generate relocatable table
 Execution Time : Moved from one segment from another.
Sohil Sundaram, 30
Logical vs Physical Address
 Address generated by the CPU is called Logical Address.
 Physical address is which is seen by the memory unit.
 Compile time and Load time has same impact on both addresses while they
differ in Execution time address binding.
Sohil Sundaram, 30
Dynamic Loading
 Entire programs must be in Physical memory to execute.
 Size of process is limited to the size of physical memory.
 Main program is loaded into memory and is executed.
 Control is loaded or passed to the newly loaded routine.
Sohil Sundaram, 30
SWAPPING
 Process can be swapped temporarily out of memory and then brought back into
memory for continued execution.
 In the mean time, CPU scheduler will allocate a time slice to other process in
memory.
 When each process finishes its quantum, it will be swapped with another
processes.
 The quantum must be large enough that reasonable amount of computing can
be done b/w swaps.
Sohil Sundaram, 30
Contiguous Memory Allocation
 Main memory must accommodate with the operating system and the various
user processes.
 Divided into two portions:
 Resident Operating system.
 User process.
Sohil Sundaram, 30
Memory Allocation
 Simplest method is to divide memory into several fixed partitions.
 Each partition may contain exactly one process.
 When a partition in free, a process is selected from the input queue and is
loaded into the free partitions.
 Hole is searched for a new process.
 We allocate as much memory that is needed.
 When space allocated, it is loaded into memory and then compete for the CPU.
 After Termination, it releases the memory.
Sohil Sundaram, 30
Selection of Hole
 First – Fit :- Allocate the first hole that is big enough. Searching can start at the
beginning or where the previous first-fit search ended.
 Best – Fit :- Allocate the smallest hole that is big enough. Search the entire list,
unless the list is kept ordered by size.
 Worst – Fit :- Allocate the largest hole. Search the entire list unless it is sorted
by size.
Sohil Sundaram, 30
Fragmentation
 It can be internal as well as external.
 Break Physical memory into fixed size of blocks and allocate memory in unit of
block sizes.
 Memory allocated to process may be slightly larger than requested memory.
Sohil Sundaram, 30
PAGING
 Is a Memory Management Scheme that permits the physical address space of a
process to be non-contiguous.
 Is used in many operating system.
 Physical memory breaks into fixed sized blocks called Frames.
 Logical memory also breaks into blocks of the same size called Pages.
Sohil Sundaram, 30
CONCLUSION
 Memory Management – ways to manage Memory.
 Memory management is a function responsible for managing the computers
primary memory.
 It keeps the status of the memory whether free or allocated or free.
 It determines how memory is allocated among competing processes. How they
will get it and how much they will get it.
Sohil Sundaram, 30
Sohil Sundaram, 30
!!! THANKS !!!

Memory management

  • 1.
    Seminar Presentation On MEMORY MANAGEMENT SubmittedBy:- Sohil Sundaram BCA – 2nd SEM Roll No. 30 Submitted To:- Mr. Dinesh Dobhal Sohil Sundaram, 30
  • 2.
    OPERATING SYSTEM  Programto manage Computer Hardware.  Provide base for Application programs.  Acts as an intermediary between user and hardware.  Supports Complex games, business applications, etc. . Sohil Sundaram, 30
  • 3.
    Memory - Definition Physical device capable of storing information.  Is central to the operation of a modern computer system.  Consists of large array of words or bytes, each with its own address. Sohil Sundaram, 30
  • 4.
    NEED OF MEMORY MANAGEMENT To manage the Primary Memory of OS.  To optimize overall performance of Computer System.  Helps in CPU Scheduling. Sohil Sundaram, 30
  • 5.
    Working Process  Determineshow memory is allocate among competing processes ?  Which get memory and how much ?  Which memory location ?  After Execution, free the memory. Sohil Sundaram, 30
  • 6.
    Address Binding  ToBring the process into memory.  Compile Time : Process reside in memory.  Load Time : Compiler generate relocatable table  Execution Time : Moved from one segment from another. Sohil Sundaram, 30
  • 7.
    Logical vs PhysicalAddress  Address generated by the CPU is called Logical Address.  Physical address is which is seen by the memory unit.  Compile time and Load time has same impact on both addresses while they differ in Execution time address binding. Sohil Sundaram, 30
  • 8.
    Dynamic Loading  Entireprograms must be in Physical memory to execute.  Size of process is limited to the size of physical memory.  Main program is loaded into memory and is executed.  Control is loaded or passed to the newly loaded routine. Sohil Sundaram, 30
  • 9.
    SWAPPING  Process canbe swapped temporarily out of memory and then brought back into memory for continued execution.  In the mean time, CPU scheduler will allocate a time slice to other process in memory.  When each process finishes its quantum, it will be swapped with another processes.  The quantum must be large enough that reasonable amount of computing can be done b/w swaps. Sohil Sundaram, 30
  • 10.
    Contiguous Memory Allocation Main memory must accommodate with the operating system and the various user processes.  Divided into two portions:  Resident Operating system.  User process. Sohil Sundaram, 30
  • 11.
    Memory Allocation  Simplestmethod is to divide memory into several fixed partitions.  Each partition may contain exactly one process.  When a partition in free, a process is selected from the input queue and is loaded into the free partitions.  Hole is searched for a new process.  We allocate as much memory that is needed.  When space allocated, it is loaded into memory and then compete for the CPU.  After Termination, it releases the memory. Sohil Sundaram, 30
  • 12.
    Selection of Hole First – Fit :- Allocate the first hole that is big enough. Searching can start at the beginning or where the previous first-fit search ended.  Best – Fit :- Allocate the smallest hole that is big enough. Search the entire list, unless the list is kept ordered by size.  Worst – Fit :- Allocate the largest hole. Search the entire list unless it is sorted by size. Sohil Sundaram, 30
  • 13.
    Fragmentation  It canbe internal as well as external.  Break Physical memory into fixed size of blocks and allocate memory in unit of block sizes.  Memory allocated to process may be slightly larger than requested memory. Sohil Sundaram, 30
  • 14.
    PAGING  Is aMemory Management Scheme that permits the physical address space of a process to be non-contiguous.  Is used in many operating system.  Physical memory breaks into fixed sized blocks called Frames.  Logical memory also breaks into blocks of the same size called Pages. Sohil Sundaram, 30
  • 15.
    CONCLUSION  Memory Management– ways to manage Memory.  Memory management is a function responsible for managing the computers primary memory.  It keeps the status of the memory whether free or allocated or free.  It determines how memory is allocated among competing processes. How they will get it and how much they will get it. Sohil Sundaram, 30
  • 16.