The Memory Management Unit. Operating Systems. Autumn CS4023

Similar documents
Operating systems. Part 1. Module 11 Main memory introduction. Tami Sorgente 1

Chapter 8: Memory Management. Operating System Concepts with Java 8 th Edition

Memory Management (1) Memory Management

Memory Management (1) Memory Management. CPU vs. memory. No.8. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University

CS420: Operating Systems

Part Three - Memory Management. Chapter 8: Memory-Management Strategies

Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation

CSE 421/521 - Operating Systems Fall Lecture - XII Main Memory Management. Tevfik Koşar. University at Buffalo. October 18 th, 2012.

Chapter 8: Memory Management

Chapter 8: Main Memory

Memory Management. CSCI 315 Operating Systems Design Department of Computer Science

8.1 Background. Part Four - Memory Management. Chapter 8: Memory-Management Management Strategies. Chapter 8: Memory Management

Chapter 9: Memory Management. Background

Chapter 8: Main Memory

Module 8: Memory Management

CS307 Operating Systems Main Memory

Module 9: Memory Management. Background. Binding of Instructions and Data to Memory

Chapter 8: Memory Management Strategies

I.-C. Lin, Assistant Professor. Textbook: Operating System Principles 7ed CHAPTER 8: MEMORY

Memory Management. Memory Management

I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed CHAPTER 8: MEMORY

Module 8: Memory Management

Operating Systems. Memory Management. Lecture 9 Michael O Boyle

Performance of Various Levels of Storage. Movement between levels of storage hierarchy can be explicit or implicit

Chapter 8: Memory Management

Roadmap. Tevfik Koşar. CSC Operating Systems Spring Lecture - XII Main Memory - II. Louisiana State University

Goals of Memory Management

Main Memory (Part I)

Logical versus Physical Address Space

Memory Management. Contents: Memory Management. How to generate code? Background

Background. Contiguous Memory Allocation

Chapter 8: Memory Management. Background Swapping Contiguous Allocation Paging Segmentation Segmentation with Paging

CS370 Operating Systems

Memory Management. (SGG, Chapter 08) Objectives. Memory Hierarchy. Outline. Instructor: Dr. Tongping Liu. To describe various memory hardware"

Chapter 8: Memory- Manage g me m nt n S tra r t a e t gie i s

Memory Management. Memory

Virtual Memory. CSCI 315 Operating Systems Design Department of Computer Science

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition

Chapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition

6 - Main Memory EECE 315 (101) ECE UBC 2013 W2

CS307: Operating Systems

Memory Management. Minsoo Ryu. Real-Time Computing and Communications Lab. Hanyang University.

Memory Management Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University

Principles of Operating Systems

Memory Management. Dr. Yingwu Zhu

Chapter 9 Memory Management Main Memory Operating system concepts. Sixth Edition. Silberschatz, Galvin, and Gagne 8.1

Memory Management Cache Base and Limit Registers base limit Binding of Instructions and Data to Memory Compile time absolute code Load time

SHANDONG UNIVERSITY 1

Chapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition

Chapter 8: Memory- Management Strategies

Addresses in the source program are generally symbolic. A compiler will typically bind these symbolic addresses to re-locatable addresses.

Lecture 8 Memory Management Strategies (chapter 8)

Memory Management. Memory Management

Memory management. Last modified: Adaptation of Silberschatz, Galvin, Gagne slides for the textbook Applied Operating Systems Concepts

Chapter 8: Main Memory

Memory Management. Memory Management Requirements

Chapter 8: Memory-Management Strategies

Main Memory. Electrical and Computer Engineering Stephen Kim ECE/IUPUI RTOS & APPS 1

CS 3733 Operating Systems:

CHAPTER 8: MEMORY MANAGEMENT. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Operating Systems Unit 6. Memory Management

Chapter 8: Main Memory. Operating System Concepts 9 th Edition

Chapters 9 & 10: Memory Management and Virtual Memory

Main Memory. CISC3595, Spring 2015 X. Zhang Fordham University

Chapter 8: Main Memory

12: Memory Management

Introduction to Operating Systems

Chapter 8 Memory Management

Main Memory Yi Shi Fall 2017 Xi an Jiaotong University

CHAPTER 8 - MEMORY MANAGEMENT STRATEGIES

MEMORY MANAGEMENT. Jo, Heeseung

Memory Management. Jo, Heeseung

Unit-03 Deadlock and Memory Management Unit-03/Lecture-01

P r a t t hr h ee e : e M e M m e o m r o y y M a M n a a n g a e g m e e m n e t 8.1/72

Memory Management william stallings, maurizio pizzonia - sistemi operativi

COSC Operating Systems Design, Fall 2001, Byunggu Yu. Chapter 9 Memory Management (Lecture Note #8) 1. Background

Paging, and segmentation

Chapter 8 Main Memory

CSE325 Principles of Operating Systems. Memory. David P. Duggan. March 6, 2010

File Systems. OS Overview I/O. Swap. Management. Operations CPU. Hard Drive. Management. Memory. Hard Drive. CSI3131 Topics. Structure.

CS399 New Beginnings. Jonathan Walpole

Process. Memory Management

Lecture 7. Memory Management

Process. One or more threads of execution Resources required for execution. Memory (RAM) Others

Basic Memory Management. Basic Memory Management. Address Binding. Running a user program. Operating Systems 10/14/2018 CSC 256/456 1

Frequently asked questions from the previous class survey

Memory Management. Frédéric Haziza Spring Department of Computer Systems Uppsala University

Process. One or more threads of execution Resources required for execution

Chapter 8: Memory- Management Strategies Dr. Varin Chouvatut

Memory Management. Reading: Silberschatz chapter 9 Reading: Stallings. chapter 7 EEL 358

Operating Systems (2INC0) 2017/18

Topics: Memory Management (SGG, Chapter 08) 8.1, 8.2, 8.3, 8.5, 8.6 CS 3733 Operating Systems

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

CIS Operating Systems Contiguous Memory Allocation. Professor Qiang Zeng Spring 2018

Process. One or more threads of execution Resources required for execution. Memory (RAM) Others

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

Basic Memory Management

Chapter 8 & Chapter 9 Main Memory & Virtual Memory

Chapter 9 Memory Management

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Memory Management

Transcription:

Operating Systems Autumn 2017-2018

Outline The Memory Management Unit 1 The Memory Management Unit

Logical vs. Physical Address Space The concept of a logical address space that is bound to a separate physical address space is central to proper memory management Logical address generated by our programs (and, therefore, the CPU); also referred to as virtual address Physical address address seen by the memory unit Logical and physical addresses are the same in compile-time and load-time address-binding schemes Logical (virtual) and physical addresses differ in execution-time address-binding scheme

Memory-Management Unit (MMU) Hardware device that maps virtual to physical address In MMU scheme, the value in the relocation register is added to every address generated by a user process at the time it is sent to memory The user program deals with logical addresses; it never sees the real physical addresses

Dynamic Relocation using a Relocation Register

Contiguous Allocation Main memory usually into two partitions: Resident operating system, usually held in low memory with interrupt vector User processes then held in high memory Relocation registers used to protect user processes from each other, and from changing operating-system code and data Base register contains value of smallest physical address Limit register contains range of logical addresses each logical address must be less than the limit register MMU maps logical address dynamically

Contiguous Allocation (contd.) Hardware Support for Relocation and Limit Registers

Contiguous Allocation (contd.) Multiple-partition allocation Hole block of available memory; holes of various size are scattered throughout memory When a process arrives, it is allocated memory from a hole large enough to accommodate it Operating system maintains information about: a) allocated partitions b) free partitions (hole) OS proc. 5 proc. 8 proc. 2

Contiguous Allocation (contd.) Multiple-partition allocation Hole block of available memory; holes of various size are scattered throughout memory When a process arrives, it is allocated memory from a hole large enough to accommodate it Operating system maintains information about: a) allocated partitions b) free partitions (hole) OS proc. 5 proc. 2

Contiguous Allocation (contd.) Multiple-partition allocation Hole block of available memory; holes of various size are scattered throughout memory When a process arrives, it is allocated memory from a hole large enough to accommodate it Operating system maintains information about: a) allocated partitions b) free partitions (hole) OS proc. 5 proc. 9 proc. 2

Contiguous Allocation (contd.) Multiple-partition allocation Hole block of available memory; holes of various size are scattered throughout memory When a process arrives, it is allocated memory from a hole large enough to accommodate it Operating system maintains information about: a) allocated partitions b) free partitions (hole) OS proc. 5 proc. 10 proc. 9 proc. 2

Dynamic Storage-Allocation Problem How to satisfy a request of size n from a list of free holes First-fit: Allocate the first hole that is big enough Best-fit: Allocate the smallest hole that is big enough; must search entire list, unless ordered by size Produces the smallest leftover hole Worst-fit: Allocate the largest hole; must also search entire list Produces the largest leftover hole First-fit and best-fit better than worst-fit in terms of speed and storage utilization

Fragmentation The Memory Management Unit External Fragmentation total memory space exists to satisfy a request, but it is not contiguous Internal Fragmentation allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition (the memory allocated to a job), but not being used Reduce external fragmentation by compaction Shuffle memory contents to place all free memory together in one large block Compaction is possible only if relocation is dynamic, and is done at execution time Garbage collection in languages like Java