Vadodara Institute of Engineering
Active Learning Assignment
Sub :- Operating Systems ( 2140702 )
Topic:- Introduction of Memory Management
Presented by:-
Kashyap Patel 15CE046
Krishna Patel 15CE047
Maitree Patel 15CE048
Guided by:-
Asst. Prof. Shweta Shinde
Computer Engineering - 1
CONTENT
• Physical and Logical address
• Dynamic relocation
• Memory Management Unit
• Memory allocation
• Swapping
LOGICAL AND PHYSICAL ADDRESS
• Logical address: It is the address of the program that is generated by
a CPU.
• Physical address : It is the address generated by the memory
management unit(MMU).
• Logical and physical address are same at compile time and load time.
• They differ in execution time address binding scheme.
Dynamic Relocation
MEMORY MANAGEMENT UNIT
• It’s a hardware device that maps logical address to physical address .
• In the MMU value the re-location register is added to every address
generated by a program at a time the address is then send to memory.
• The program deals with logical address.
HARDWARE SUPPORT FOR RELOCATION AND LIMIT
REGISTER
CPU < + MEMORY
LIMIT REGISTER
TRAP ADDRESSING
ERRORS
RELOCATION
REGISTER
yeslogical
• There are multiple partition for multiple processes ,the relocation and
limit register are use to protect processes from one another, both the
register are part of process context.
• Relocation register contains smallest value of physical address.
• The limit register contains range of logical address.
• Logical address < Limit register
SWAPPING
• The swapping of program from main memory to secondary memory
that is back up storage and from secondary to main is called swapping
in and swapping out respectively.
• This phenomena of process switching its memory is called as
swapping.
MEMORY ALLOCATION
• Memory allocation
Contiguous Non-contiguous
1 Static 1 Paging
2 Dynamic 2 Segmentation
• There are mainly two types of memory management.
1 Contiguous
2 Non-contiguous
1 CONTIGUOUS
• That divided into two parts,
Static : static that is having fix partition in main memory which are their
from the system generation time.
Dynamic: it’s without partition and the process gets loaded dynamicaly
into the memory and find space for itself.
Static memory allocation:
Equal size partition: The main memory is divided into fix equal size partition .
For exam, if 1 partition is of 2mb then the all the other partition would be the
same size.
Main Memory
2mb
2mb
2mb
2mb
Unequal size partition : Here all the partition of main memory are of different
sizes.
Main Memory
2mb
4mb
3mb
1mb
Dynamic memory allocation :
The main memory is not having fix partition , so the whole main memory
is continuous form.
The process dynamically get loaded into the main memory at run time.
for eg , suppose there are 5
P1=50mb
P2=20mb
P3=15mb
P4=10mb
P5=15mb
MM=100mb
1
P1=50mb
50mb
OS
2
P1 =50mb
P2=20mb
30mb
OS
3
P1=50mb
P2=20mb
P3=15mb
OS
25mb
4
P1=50mb
P2=20mb
P3=15mb
P4=10mb
OS
5mb
5
P5=15mb
P2=20mb
P3=15mb
P4=10mb
OS
35mb
5mb
FRAGMENTATION
• The extra space that remain in the main memory after all the
processes have loaded is called as hole or fragment.
• There are 2 type :
1.Internal fragmentation: Internal takes place in static memory
allocation.
2.External fragmentation : there is a enough memory space to load a
new process but as it is not in a continuous manner the process cant be
loaded into main memory.
CONCLUSION
• Memory management is a complex field of computer science and
there are many techniques being developed to make it more efficient.
MMU allocate memory to process when needed and deallocate when
processes are done.
References
http://staff.um.edu.mt/csta1/courses/lectures/csm202/os8.ht
ml
https://www.tutorialspoint.com/operating_system/oss_Mem
ory management.html
Book : Modern operating systems by Andrew S.Tanenbaum
Virtual circuit and Datagram network

Virtual circuit and Datagram network

  • 1.
    Vadodara Institute ofEngineering Active Learning Assignment Sub :- Operating Systems ( 2140702 ) Topic:- Introduction of Memory Management Presented by:- Kashyap Patel 15CE046 Krishna Patel 15CE047 Maitree Patel 15CE048 Guided by:- Asst. Prof. Shweta Shinde Computer Engineering - 1
  • 2.
    CONTENT • Physical andLogical address • Dynamic relocation • Memory Management Unit • Memory allocation • Swapping
  • 3.
    LOGICAL AND PHYSICALADDRESS • Logical address: It is the address of the program that is generated by a CPU. • Physical address : It is the address generated by the memory management unit(MMU). • Logical and physical address are same at compile time and load time. • They differ in execution time address binding scheme.
  • 4.
  • 5.
    MEMORY MANAGEMENT UNIT •It’s a hardware device that maps logical address to physical address . • In the MMU value the re-location register is added to every address generated by a program at a time the address is then send to memory. • The program deals with logical address.
  • 6.
    HARDWARE SUPPORT FORRELOCATION AND LIMIT REGISTER CPU < + MEMORY LIMIT REGISTER TRAP ADDRESSING ERRORS RELOCATION REGISTER yeslogical
  • 7.
    • There aremultiple partition for multiple processes ,the relocation and limit register are use to protect processes from one another, both the register are part of process context. • Relocation register contains smallest value of physical address. • The limit register contains range of logical address. • Logical address < Limit register
  • 8.
    SWAPPING • The swappingof program from main memory to secondary memory that is back up storage and from secondary to main is called swapping in and swapping out respectively. • This phenomena of process switching its memory is called as swapping.
  • 9.
    MEMORY ALLOCATION • Memoryallocation Contiguous Non-contiguous 1 Static 1 Paging 2 Dynamic 2 Segmentation
  • 10.
    • There aremainly two types of memory management. 1 Contiguous 2 Non-contiguous 1 CONTIGUOUS • That divided into two parts, Static : static that is having fix partition in main memory which are their from the system generation time. Dynamic: it’s without partition and the process gets loaded dynamicaly into the memory and find space for itself.
  • 11.
    Static memory allocation: Equalsize partition: The main memory is divided into fix equal size partition . For exam, if 1 partition is of 2mb then the all the other partition would be the same size. Main Memory 2mb 2mb 2mb 2mb
  • 12.
    Unequal size partition: Here all the partition of main memory are of different sizes. Main Memory 2mb 4mb 3mb 1mb
  • 13.
    Dynamic memory allocation: The main memory is not having fix partition , so the whole main memory is continuous form. The process dynamically get loaded into the main memory at run time. for eg , suppose there are 5 P1=50mb P2=20mb P3=15mb P4=10mb P5=15mb MM=100mb
  • 14.
  • 15.
    FRAGMENTATION • The extraspace that remain in the main memory after all the processes have loaded is called as hole or fragment. • There are 2 type : 1.Internal fragmentation: Internal takes place in static memory allocation. 2.External fragmentation : there is a enough memory space to load a new process but as it is not in a continuous manner the process cant be loaded into main memory.
  • 16.
    CONCLUSION • Memory managementis a complex field of computer science and there are many techniques being developed to make it more efficient. MMU allocate memory to process when needed and deallocate when processes are done.
  • 17.