Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Memory Management Strategies and Virtual Memory Management, Schemes and Mind Maps of Operating Systems

An introduction to memory management strategies, including swapping, contiguous memory allocation, paging, and segmentation. It also covers virtual memory management concepts such as demand paging, copy-on-write, page replacement, frame allocation, thrashing, memory-mapped files, and kernel memory allocation. Key topics like address binding, logical versus physical address space, dynamic loading, and dynamic linking and shared libraries. It offers a comprehensive overview of the fundamental principles and techniques used in modern memory management systems, which are crucial for understanding computer architecture, operating systems, and system programming.

Typology: Schemes and Mind Maps

2023/2024

Available from 09/27/2024

kundana-chetlapalli
kundana-chetlapalli 🇮🇳

7 documents

1 / 26

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
UNIT III: Memory-Management Strategies: Introduction, Swapping, Contiguous memory allocation,
Paging, Segmentation. Virtual Memory Management: Introduction, Demand paging, Copy on-write,
Page replacement, Frame allocation, Thrashing, Memory-mapped files, Kernel memory allocation.
Memory Management
Introduction:
1.Basic Hardware
2.Address Binding:
3.Logical Versus Physical Address Space
4.Dynamic loading
5. Dynamic Linking and Shared Libraries
1.Basic Hardware
Main memory and the registers built into the processor itself are the only general-purpose
storage that the CPU can access directly.
There are machine instructions that take memory addresses as arguments, but none that
take disk addresses.
If the data are not in memory, they must be moved there before the CPU can operate on
them.
We first need to make sure that each process has a separate memory space. Separate per-
process memory space protects the processes from each other
We can provide this protection by using two registers,
1.base Register
2.Limit Register
The base register ------------holds the smallest legal physical memory address/Starting
address of the register
The Limit Register------specifies the size of the range
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a

Partial preview of the text

Download Memory Management Strategies and Virtual Memory Management and more Schemes and Mind Maps Operating Systems in PDF only on Docsity!

UNIT III: Memory-Management Strategies: Introduction, Swapping, Contiguous memory allocation, Paging, Segmentation. Virtual Memory Management: Introduction, Demand paging, Copy on-write, Page replacement, Frame allocation, Thrashing, Memory-mapped files, Kernel memory allocation. Memory Management

Introduction:

1.Basic Hardware 2.Address Binding: 3.Logical Versus Physical Address Space 4.Dynamic loading

  1. Dynamic Linking and Shared Libraries 1.Basic Hardware
    • Main memory and the registers built into the processor itself are the only general-purpose storage that the CPU can access directly.
    • There are machine instructions that take memory addresses as arguments, but none that take disk addresses.
    • If the data are not in memory, they must be moved there before the CPU can operate on them.
    • We first need to make sure that each process has a separate memory space. Separate per- process memory space protects the processes from each other
    • We can provide this protection by using two registers, 1.base Register 2.Limit Register
    • The base register ------------holds the smallest legal physical memory address/Starting address of the register
    • The Limit Register------specifies the size of the range

Here the cpu address supoose if we take 40000 and base register=30000 and limit register= then the cpu address check with base register i.e 40000>= 30000 hence it will go to yes and check with base + limit i.e 30000+20000=50000 ,so cpu address 40000<50000 hence address is send to memory.if address is lower than base register then a trap to os is occurred. 2.Address Binding: Definition : Matching Instructions and data to the locality in main memory Compile time. If you know at compile time where the process will reside in memory, then absolute code can be generated

The logical address doen’t exist physically in the main memory and then termed as “Virtual Address” Physical address is location in the main memory and can be accessed physically It is generated by cpu It is generated by memory management unit(MMU) Set of logical addresses generated by program is referred as logical address space The set of physical addresses corresponding to logical address space referred as “physical address space” 4.Dynamic loading To obtain better memory-space utilization, we can use dynamic loading. With dynamic loading, a routine is not loaded until it is called. The advantage of dynamic loading is that a routine is loaded only when it is needed

  1. Dynamic Linking and Shared Libraries Dynamically linked libraries are system libraries that are linked to user programs when the programs are run

Swapping:

A process must be in memory to be executed. A process, however, can be swapped temporarily out of memory to a backing store and then brought back into memory for continued execution

Contiguous memory allocation

Paging: