FIT2070 Lecture Notes - Lecture 7: Modular Programming, Virtual Memory, Paging
L7 - Memory Management
● Divided into two parts:
○ For OS (kernel)
○ For the program currently running
Terms
● Frame:
fixed length block on MM
● Page:
referred to the memory in the secondary memory
● Segment:
variable length block of data in the secondary memory
Requirements
● Relocation
○ Processes need to be able to be swapped in and out of the MM to maximise
processor utilisation
○ May need to relocate the process to a different area of memory
● Protection
○ Permission need to reference memory location for reading or writing
○ Memory reference made by a process must be checked at run time
● Sharing
○ Allow each process access to the same copy of the program rather than have
their own separate copy
○ Controlled access to shared areas of memory without compromising
protection
● Logical organisation
○ Memory is linear
○ Programs are modular
○ Segmentation is what satisfies requirements
● Physical organisation
Memory Partitioning
● Doesn’t involve virtual memory
● Don't bring all parts of the program when executing, just parts that you need.
● Fixed
○ Equal sized partitions
○ OS can swap out process if all partition are full and no process is in the
Ready or Running state
○ Disadvantages
■ Program might be too big to fit in a partition
● Program needs to be designed with the use of overlay
■ MM utilisation is inefficient
● Internal fragmentation: wasted space due to the block of data
loaded being smaller than the partition
○ Unequal size partitions
■ Programs up to 16M can be accommodated without overlays
Document Summary
Page: referred to the memory in the secondary memory. Segment: variable length block of data in the secondary memory. Processes need to be able to be swapped in and out of the mm to maximise processor utilisation. May need to relocate the process to a different area of memory. Permission need to reference memory location for reading or writing. Memory reference made by a process must be checked at run time. Allow each process access to the same copy of the program rather than have their own separate copy. Controlled access to shared areas of memory without compromising protection. Don"t bring all parts of the program when executing, just parts that you need. Os can swap out process if all partition are full and no process is in the. Program might be too big to fit in a partition. Program needs to be designed with the use of overlay.