Paging Memory Relocation and Fragmentation Paging

Slides:



Advertisements
Similar presentations
Allocating Memory.
Advertisements

CS 153 Design of Operating Systems Spring 2015
CS 153 Design of Operating Systems Spring 2015
Memory Management and Paging CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han.
Multiprocessing Memory Management
Understanding Operating Systems1 Operating Systems Virtual Memory Thrashing Single-User Contiguous Scheme Fixed Partitions Dynamic Partitions.
Operating Systems I Memory Management. Overview F Provide Services –processes  –files  F Manage Devices –processor  –memory  –disk 
Memory Management. 2 How to create a process? On Unix systems, executable read by loader Compiler: generates one object file per source file Linker: combines.
Memory Management Five Requirements for Memory Management to satisfy: –Relocation Users generally don’t know where they will be placed in main memory May.
1 Memory Management Virtual Memory Chapter 4. 2 The virtual memory concept In a multiprogramming environment, an entire process does not have to take.
Memory: Virtual MemoryCSCE430/830 Memory Hierarchy: Virtual Memory CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Yifeng Zhu.
Operating System Concepts
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
Paging Examples Assume a page size of 1K and a 15-bit logical address space. How many pages are in the system?
Memory Management Chapter 7.
Dynamic Partition Allocation Allocate memory depending on requirements Partitions adjust depending on memory size Requires relocatable code –Works best.
8.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 08 Main Memory (Page table questions)
1 Memory Management Chapter Basic memory management 4.2 Swapping (εναλλαγή) 4.3 Virtual memory (εικονική/ιδεατή μνήμη) 4.4 Page replacement algorithms.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
Lecture 11 Page 1 CS 111 Online Memory Management: Paging and Virtual Memory CS 111 On-Line MS Program Operating Systems Peter Reiher.
Memory Management COSC 513 Presentation Jun Tian 08/17/2000.
Virtual Memory 1 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.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo 1 Memory management & paging.
CSC 360, Instructor Kui Wu Memory Management I: Main Memory.
Memory Management Continued Questions answered in this lecture: What is paging? How can segmentation and paging be combined? How can one speed up address.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Memory.
Chapter 7 Memory Management Eighth Edition William Stallings Operating Systems: Internals and Design Principles.
Chapter 9 Memory Organization. 9.1 Hierarchical Memory Systems Figure 9.1.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 33 Paging Read Ch. 9.4.
COMP 3500 Introduction to Operating Systems Paging: Basic Method Dr. Xiao Qin Auburn University Slides.
COMP 3500 Introduction to Operating Systems Memory Management: Part 2 Dr. Xiao Qin Auburn University Slides.
Introduction to Paging. Readings r 4.3 of the text book.
Memory Management Chapter 7.
SLC/VER1.0/OS CONCEPTS/OCT'99
Non Contiguous Memory Allocation
CSE 120 Principles of Operating
CS703 - Advanced Operating Systems
Outline Paging Swapping and demand paging Virtual memory.
COMBINED PAGING AND SEGMENTATION
Chien-Chung Shen CIS/UD
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy 11/12/2018.
Economics, Administration & Information system
Memory Management 11/17/2018 A. Berrached:CS4315:UHD.
Paging Lecture November 2018.
So far… Text RO …. printf() RW link printf Linking, loading
Main Memory Background Swapping Contiguous Allocation Paging
CS399 New Beginnings Jonathan Walpole.
Lecture 29: Virtual Memory-Address Translation
Operating Systems Placement Algorithm Alok Kumar Jagadev.
Virtual Memory Hardware
So far in memory management…
CSE 451: Operating Systems Autumn 2005 Memory Management
Virtual Memory Overcoming main memory size limitation
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Computer Architecture
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
Recursive Page Table Lookup in the x86
Page Table Implementations
Translation Lookaside Buffers
Evolution in memory management techniques
Segmentation Observation: Programmers don’t think in pages!
Evolution in memory management techniques
Evolution in memory management techniques
Chapter 8: Main Memory CSS503 Systems Programming
Memory Management (Ch 4: )
Virtual Memory 1 1.
Page Main Memory.
Presentation transcript:

Paging Memory Relocation and Fragmentation Paging CSCE 410/611 Paging Memory Relocation and Fragmentation Paging The Memory-Lookup process in hardware Paging and Internal Fragmentation Paging

Observation: Naïve relocation causes (external) fragmentation. CSCE 410/611 Paging Observation: Naïve relocation causes (external) fragmentation. simple relocation Memory Management Unit limit register relocation register ? < + logical memory physical memory Paging

Solution: Partition memory into equal-size portions. CSCE 410/611 Paging Solution: Partition memory into equal-size portions. Memory Management Unit < + < + < + < + logical memory physical memory Paging

Paging in Hardware CPU page table p d f d p f f logical memory CSCE 410/611 Paging in Hardware Memory Management Unit page number offset CPU logical addr p d phys. addr f d p f f page table logical memory physical memory Paging

Paging Address Resolution: Example CSCE 410/611 Paging Address Resolution: Example Example: PDP-11 (16-bit addresses, page size 8kB => 64kB address space, with 8 pages) Memory Management Unit CPU 000 0000000000000000 0000000000000 011 0000000000000 011 F0 F1 F2 F3 F4 F5 F6 F7 F8 page table ... logical memory physical memory Paging

Paging Address Resolution: Example 2 CSCE 410/611 Paging Address Resolution: Example 2 Example: PDP-11 (16-bit addresses, page size 8kB => 64kB address space, with 8 pages) Memory Management Unit CPU 010 0100000000001111 0000000001111 101 0000000001111 F0 F1 F2 101 F3 F4 F5 F6 F7 F8 page table ... logical memory physical memory Paging

Internal Fragmentation in Paging CSCE 410/611 Internal Fragmentation in Paging page size 4kB 3 * 4096 + 1012 Bytes logical memory 13300 Byte 3084 bytes wasted! physical memory Observation: Last frame may not be completely full. General Rule: Average internal fragmentation per block is typically half frame size. Q: Frames: large or small?! Large frames cause more fragmentation. Small frames cause more overhead (page table size, disk I/O) Paging

Paging: Summary Paging eliminates External Fragmentation CSCE 410/611 Paging: Summary Paging eliminates External Fragmentation The Memory-Lookup process in the MMU Paging allows for large address spaces Paging does not completely eliminate Internal Fragmentation Paging