Basic Memory Management Monoprogramming Protection Swapping Overlaying OS space User space.

Slides:



Advertisements
Similar presentations
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping
Advertisements

Chapter 4 Memory Management Basic memory management Swapping
Background Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution. Logical.
Memory Management.
Chapter 8 Virtual Memory
Chapter 4 Memory Management Page Replacement 补充:什么叫页面抖动?
Memory management Lecture 7 ~ Winter, 2007 ~.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 3 Memory Management Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
1 Virtual Memory Management B.Ramamurthy. 2 Demand Paging Main memory LAS 0 LAS 1 LAS 2 (Physical Address Space -PAS) LAS - Logical Address.
Module 10: Virtual Memory Background Demand Paging Performance of Demand Paging Page Replacement Page-Replacement Algorithms Allocation of Frames Thrashing.
Virtual Memory Background Demand Paging Performance of Demand Paging
Virtual Memory Introduction to Operating Systems: Module 9.
1 Memory Management Managing memory hierarchies. 2 Memory Management Ideally programmers want memory that is –large –fast –non volatile –transparent Memory.
Memory/Storage Architecture Lab Computer Architecture Virtual Memory.
Memory Management Design & Implementation Segmentation Chapter 4.
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
Memory Management and Paging CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han.
Memory Management 2010.
Virtual Memory Chapter 8.
1 Virtual Memory Chapter 8. 2 Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
Computer Organization and Architecture
Virtual Memory Management B.Ramamurthy. Paging (2) The relation between virtual addresses and physical memory addres- ses given by page table.
1 Virtual Memory Management B.Ramamurthy Chapter 10.
Chapter 4 Memory Management 4.1 Basic memory management 4.2 Swapping
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
Review of Memory Management, Virtual Memory CS448.
Memory Management From Chapter 4, Modern Operating Systems, Andrew S. Tanenbaum.
Memory Management The part of O.S. that manages the memory hierarchy (i.e., main memory and disk) is called the memory manager Memory manager allocates.
SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally MEMORYMANAGEMNT.
Operating Systems Chapter 8
1 Memory Management Chapter Basic memory management 4.2 Swapping (εναλλαγή) 4.3 Virtual memory (εικονική/ιδεατή μνήμη) 4.4 Page replacement algorithms.
Memory Management Techniques
Memory Management – Page 1 of 49CSCI 4717 – Computer Architecture Memory Management Uni-program – memory split into two parts –One for Operating System.
1 Memory Management 4.1 Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms 4.5 Modeling page replacement algorithms.
Subject: Operating System.
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
“ Memory Management Function ” Presented By Lect. Rimple Bala GPC,Amritsar 1.
1 Memory Management. 2 Fixed Partitions Legend Free Space 0k 4k 16k 64k 128k Internal fragmentation (cannot be reallocated) Divide memory into n (possible.
Virtual Memory The memory space of a process is normally divided into blocks that are either pages or segments. Virtual memory management takes.
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
Memory Management CS Spring Overview Partitioning, Segmentation, and Paging External versus Internal Fragmentation Logical to Physical Address.
Demand Paging Reference Reference on UNIX memory management
Memory Management. Why memory management? n Processes need to be loaded in memory to execute n Multiprogramming n The task of subdividing the user area.
Silberschatz, Galvin and Gagne  Operating System Concepts Virtual Memory Virtual memory – separation of user logical memory from physical memory.
操作系统原理 OPERATING SYSTEM Chapter 3 Memory Management 内存管理.
1 Lecture 8: Virtual Memory Operating System Fall 2006.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Memory.
1 Memory Management Chapter Basic memory management 4.2 Swapping 4.3 Virtual memory 4.4 Page replacement algorithms 4.5 Modeling page replacement.
10.1 Chapter 10: Virtual Memory Background Demand Paging Process Creation Page Replacement Allocation of Frames Thrashing Operating System Examples.
1 Memory Management Adapted From Modern Operating Systems, Andrew S. Tanenbaum.
Virtual Memory What if program is bigger than available memory?
Memory.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Virtual memory.
Memory Management Ch.7 and Ch.8.
Chapter 8 Virtual Memory
Lecture 10: Virtual Memory
Main Memory Management
Module 9: Virtual Memory
5: Virtual Memory Background Demand Paging
Lecture 32 Syed Mansoor Sarwar
CPSC 457 Operating Systems
Virtual Memory Overcoming main memory size limitation
Computer Architecture
Module 9: Virtual Memory
COMP755 Advanced Operating Systems
Operating Systems: Internals and Design Principles, 6/E
Virtual Memory.
CSE 542: Operating Systems
Page Main Memory.
Presentation transcript:

Basic Memory Management Monoprogramming Protection Swapping Overlaying OS space User space

Multiprogramming with Fixed Partitions Placement External Fragmentation Protection Relocation

Variable Partition Allocation Protection Relocation Compaction Placement Strategies First fit Next fit Best fit Worst fit Quick fit Free Allocated Free Allocated

Variable Partition Allocation Memory Management with Bitmaps Memory Management with Linked Lists P/HStartsLengthPtr

Virtual Memory Memory Hierarchy Address Space Run-time Memory Logical Blocks - Segments Physical Blocks - Pages Primary memory Secondary memory

Virtual Memory Paging Fixed size blocks 2-dim address Mapping and address translation Virtual to Physical (v.page no., byte no.) (p.page no., byte no.) PM SM Page no.Byte no.

Virtual Memory Page Tables Logically one per process No. of rows equal no. of pages No. of columns determined by no. of entries (data fields per page) L/NL, M/NM, Page no., SSA, etc. Address translation Active PT, MMU, PTAR

Virtual Memory Address translation Active PT, MMU, PTAR L/ NL M/ NM Page no. SSA 11200xxx 0yyy 10128zzz 4000 PTAR VA: (2, 596) PA: (128, 596) PT

Virtual Memory Protection Demand Paging Page Faults Expensive overhead Prepaging TLB – Translation Lookaside Buffer Cache of high-demand pages

Page Replacement Algorithms The Optimal Page Replacement Algorithm Least Recently Used Least Frequently Used First In First Out – FIFO

Page Replacement Algorithms Second Chance Check referenced bit Clock Circular list with referenced bit Not Recently Used Check referenced and modified bits 4 classes of pages The Working Set The WSClock

Design and Implementation Issues Page size Separate Instruction and Data Spaces Shared Pages Local versus Global Allocation Page Fault Handling Locking Pages in Memory

Segmentation Process divided into logical blocks – segments 2 dim addressing (s.no., byte no) – virtual address Segment Map Table (SMT) is required Variable partition allocation Address Translation VA: (s.no., byte) PA: (partition begin addr., byte) SMTAR Active SMT

Segmentation with Paging Process divided into segments Segments divided into pages Memory allocated as pages VA: (s.no., page no., byte) PA: (page frame no., byte)