A15_MemMgtFund - Memory Management Fundamentals Virtual...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Memory Management Fundamentals Virtual Memory
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Outline Introduction Motivation for virtual memory Paging – general concepts Principle of locality, demand paging, etc. Memory Management Unit (MMU) Problems introduced by paging Space Time Page replacement algorithms
Background image of page 2
Intro - Memory Management in Early Operating Systems Several processes reside in memory at one time ( multiprogramming ). Early systems stored each process image in a contiguous area of memory/required the entire image to be present at run time. Drawbacks: Limited number of processes at one time The Ready state may be empty at times Fragmentation of memory as new processes replace old reduces amount of usable memory
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Intro - Memory Management in Early Operating Systems Fragmentation of memory is caused by different size requirements for different processes. A 36K process leaves, a 28K process takes its place, leaving a small block of free space – a fragment As processes come and go, more and more fragments appear.
Background image of page 4
Motivation Motivation for virtual memory: increase the number of processes that can execute concurrently by reducing fragmentation Be able to run processes that are larger than the available amount of memory Method: allow process image to be loaded non- contiguously allow process to execute even if it is not entirely in memory.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Virtual Memory - Paging Divide the address space of a program into pages (blocks of contiguous locations). Page size is a power of 2: 4K, 8K, . .. Memory is divided into page frames of same size. Any “page” in a program can be loaded into any “frame” in memory, so no space is wasted.
Background image of page 6
Paging - continued General idea – save space by loading only those pages that a program needs now. Result – more programs can be in memory at any given time Problems: How to tell what’s “needed” How to keep track of where the pages are How to translate virtual addresses to physical
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Demand Paging How to Tell What’s Needed Demand paging loads a page only when there is a page fault – a reference to a location on a page not in memory The principle of locality ensures that page faults won’t occur too frequently Code and data references tend to cluster on a relatively small set of pages for a period of time;
Background image of page 8
Page Tables – How to Know Where Pages are Loaded The page table is an array in kernel space. Each page table entry (PTE) represents one
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 34

A15_MemMgtFund - Memory Management Fundamentals Virtual...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online