Basic Memory Management 1. Readings r Silbershatz et al: chapters 8.1-8.2 2.

Slides:



Advertisements
Similar presentations
Machine cycle.
Advertisements

Part IV: Memory Management
Memory Protection: Kernel and User Address Spaces  Background  Address binding  How memory protection is achieved.
ITEC 352 Lecture 27 Memory(4). Review Questions? Cache control –L1/L2  Main memory example –Formulas for hits.
CS 311 – Lecture 21 Outline Memory management in UNIX
Computer Systems. Computer System Components Computer Networks.
Modified from Silberschatz, Galvin and Gagne Lecture 16 Chapter 8: Main Memory.
CS 104 Introduction to Computer Science and Graphics Problems
Memory Management CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han.
Memory Management Chapter 5.
Modified from Silberschatz, Galvin and Gagne Lecture 15 Chapter 8: Main Memory.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
MEMORY MANAGEMENT By KUNAL KADAKIA RISHIT SHAH. Memory Memory is a large array of words or bytes, each with its own address. It is a repository of quickly.
Chapter 7: Main Memory CS 170, Fall Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation.
A. Frank - P. Weisberg Operating Systems Real Memory Management.
Operating System Concepts
Silberschatz, Galvin and Gagne  Operating System Concepts Multistep Processing of a User Program User programs go through several steps before.
03/05/2008CSCI 315 Operating Systems Design1 Memory Management Notice: The slides for this lecture have been largely based on those accompanying the textbook.
Chapter 8: Main Memory.
Chapter 91 Memory Management Chapter 9   Review of process from source to executable (linking, loading, addressing)   General discussion of memory.
Chapter 8 Main Memory Bernard Chen Spring Objectives To provide a detailed description of various ways of organizing memory hardware To discuss.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-7 Memory Management (1) Department of Computer Science and Software.
Swapping and Contiguous Memory Allocation. Multistep Processing of a User Program User programs go through several steps before being run. Program components.
Memory Management. Process must be loaded into memory before being executed. Memory needs to be allocated to ensure a reasonable supply of ready processes.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 8: Memory Management Strategies.
A genda for Today What is memory management Source code to execution Address binding Logical and physical address spaces Dynamic loading, dynamic linking,
8.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles Chapter 8: Memory-Management Strategies Objectives To provide a detailed description.
CS 149: Operating Systems February 26 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Chapter 4 Storage Management (Memory Management).
Rensselaer Polytechnic Institute CSC 432 – Operating Systems David Goldschmidt, Ph.D.
CIS250 OPERATING SYSTEMS Memory Management Since we share memory, we need to manage it Memory manager only sees the address A program counter value indicates.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 9: Memory Management Background Swapping Contiguous Allocation Paging Segmentation.
CE Operating Systems Lecture 14 Memory management.
The Central Processing Unit (CPU) and the Machine Cycle.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
Memory. Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation.
Memory Management. Introduction To improve both the utilization of the CPU and the speed of its response to users, the computer must keep several processes.
Main Memory. Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The.
Basic Memory Management 1. Readings r Silbershatz et al: chapters
NETW3005 Memory Management. Reading For this lecture, you should have read Chapter 8 (Sections 1-6). NETW3005 (Operating Systems) Lecture 07 – Memory.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 31 Memory Management.
Operating System Principles Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Memory Management Program must be brought (from disk) into memory and placed within a process for it to be run Main memory and registers are only storage.
Background Program must be brought into memory and placed within a process for it to be run. Input queue – collection of processes on the disk that are.
Memory management The main purpose of a computer system is to execute programs. These programs, together with the data they access, must be in main memory.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 8: Main Memory.
Chapter 8: Memory Management. 8.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 8: Memory Management Background Swapping Contiguous.
Lecture 7 Main Memory. Background Program must be brought (from disk) into memory and placed within a process for it to be run. Memory consists of a large.
Chapter 7: Main Memory CS 170, Fall Program Execution & Memory Management Program execution Swapping Contiguous Memory Allocation Paging Structure.
Main Memory CSSE 332 Operating Systems Rose-Hulman Institute of Technology.
Introduction to Operating Systems Concepts
SLC/VER1.0/OS CONCEPTS/OCT'99
Chapter 2 Memory and process management
Chapter 8: Main Memory.
Chapter 8 Main Memory.
Memory Management 11/17/2018 A. Berrached:CS4315:UHD.
The Operating System Memory Manager
MEMORY MANAGEMENT & their issues
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 8 11/24/2018.
Multistep Processing of a User Program
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 12/1/2018.
Memory Management Tasks
Chapter 8: Memory management
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Lecture 30 Syed Mansoor Sarwar
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 4/5/2019.
OPERATING SYSTEMS MEMORY MANAGEMENT BY DR.V.R.ELANGOVAN.
Presentation transcript:

Basic Memory Management 1

Readings r Silbershatz et al: chapters

Outline r Memory Hierarchy r Memory management requirements 3

Introduction r Our machines today have 10,000 times more memory than the IBM 7094 – leading edge machine of the 1960’s r Cost of memory has dropped dramatically r Bill Gates (former chair of Microsoft) once said “640K should be enough” r There is a high-performance machine at Western (for bioinformatics research) with 1 terabyte of memory 4

Introduction r Software and data sets expand to fill the memory available m The 1 terabyte of memory – the researchers already want more r Technology does not allow for each program to have infinitely large and fast memory r Operating systems must manage memory 5

Introduction r Memory management requires m Keep track of what parts of memory are in use. m Allocate memory to processes when needed m Deallocate memory when processes are done 6

Instruction-Execution Cycle r You can think of memory as a large array of bytes m Each byte has its own address r Fetch an instruction from memory r Instruction is decoded m May cause operands to be fetched from memory r After instruction execution m Results may be stored back in memory r Each of these operations require memory addresses 7

Registers On-chip Cache Main Memory Disk Memory Hierarchy r Registers built into the CPU are generally accessible within one cycle of the CPU clock r Completing a memory access may take many cycles of the CPU clock 8

Memory Hierarchy r A processor waiting for data from main memory is not desired r Remedy: Add fast memory between the CPU and main memory called a cache 9

Memory Management r Memory is to be shared by multiple processes r Processes should not be able to reference another process’s memory without permission m This requires an ability to determine the range of legal addresses that the process may access 10

Address Binding r Program execution requires that a program be brought into memory from the disk r The process can reside in any part of the physical memory r Address space starts at but the first address of a user need not be

Address Binding r User program goes through several steps before it is ready to be executed r The binding of instructions/data to memory addresses can be done at any step along the way 12

Address Binding r Addresses in the source program are generally symbolic e.g., count r Compiler will bind these symbolic addresses to relocatable addresses m Example: “14 bytes from the beginning of this module” 13

Address Binding r The loader will in turn bind the relocatable addresses to absolute addresses 14

Address Binding r Execution time: m Binding to actual physical memory addresses must be delayed until run- time 15

Address Binding r Typically the programmer does not know where the program will be placed in memory when it is executed r While the program is executing, it may be placed in disk and returned to main memory at a different location (swapping) 16

Address Binding r Memory references in the code (virtual or logical) must be translated to actual physical memory addresses r Run-time Mapping from virtual to physical addresses is done by a hardware device called the memory-management unit (MMU) r Run-time mappings depend on how memory is allocated to processes 17