Events, Memory Management
|
|
- Sharon Rodgers
- 5 years ago
- Views:
Transcription
1 Events, Memory Management
2 Events, Memory Management 1. Call back, message pumps 2. Call backs vs messages 3. Memory management
3 Callback Program registers and event handler program that is called whenever the event occurs. The handler executes its code and the program returns to it state (instruction pointer) prior to the event. Method used by glut for example. Windows calls event handlers Windows Procedures
4 Message Pumps Program queries system for event (messages), interprets message and call appropriate function using switch. Both Windows and Linux have system level message system, called message queues in both. System Level message queues probably do not have appropriate features
5 Messages vs Callback Callback require virtual functions: Void Explosion::Update(){ //... GameObjectCollection damagedobjects; g_world.queryobjectsinsphere( GetDamageSphere(),damagedObjects); for each object in damagedobjects){ object.onexplosion();
6 Messages vs Callback Callbacks require objects to inherit from a common virtual base class with a virtual function for each event type. This makes adding new events, say in a script impossible. Better to have event class and have each object handle event directly as a message.
7 Messages vs Callback Message Pump can deliver messages to object in order of importance. Message Pump can hold message for a fixed time. Message Pump requires more complex code than Callbacks.
8 Memory Management Game often use a memory pool instead of the system heap for dynamic memory allocation. Can implement many pools to group objects of similar type and to avoid scattering objects of the same type throughout a general heap, so as to prevent cache misses. Give programmers a handle on memory sizes required so as to set minimum memory requirements.
9 Memory Management Memory management techniques same as covered in Operating System Sequential fit method. Buddy method Both have free nodes list, used list. Doubly linked list is used for detecting memory leaks
10 Sequential Fit Allocate: Find a suitable free node: Split off enough to hold data Add node to used list; keep remainder in free list. Return pointer to created used node.
11 Sequential Fit Deallocate: Add node to used list; keep remainder in free list. Coalesce with left right nodes if possible
12 Buddy System In a buddy system, the allocator will only allocate blocks of certain sizes, and has many free lists, one for each permitted size. The permitted sizes are usually either powers of two, or form a Fibonacci sequence, such that any block except the smallest can be divided into two smaller blocks of permitted sizes. When blocks are recycled, there may be some attempt to merge adjacent blocks into ones of a larger permitted size (coalescence). To make this easier, the free lists may be stored in order of address. The main advantage of the buddy system is that coalescence is cheap because the "buddy" of any free block can be calculated from its address.
13 Buddy System Internal Fragmentation:
14 Buddy System For example, an allocator in a binary buddy system might have sizes of 16, 32, 64, kb. It might start off with a single block of 64 kb. If the application requests a block of 8 kb, the allocator would check its 8 kb free list and find no free blocks of that size. It would then split the 64 kb block into two block of 32 kb, split one of them into two blocks of 16 kb, and split one of them into two blocks of 8 kb. The allocator would then return one of the 8 kb blocks to the application and keep the remaining three blocks of 8 kb, 16 kb, and 32 kb on the appropriate free lists. If the application then requested a block of 10 kb, the allocator would round this request up to 16 kb, and return the 16 kb block from its free list, wasting 6 kb in the process. A Fibonacci buddy system might use block sizes 16, 32, 48, 80, 128, 208,... bytes, such that each size is the sum of the two preceding sizes. When splitting a block from one free list, the two parts get added to the two preceding free lists. A buddy system can work very well or very badly, depending on how the chosen sizes interact with typical requests for memory and what the pattern of returned blocks is. The rounding typically leads to a significant amount of wasted memory, which is called internal fragmentation. This can be reduced by making the permitted block sizes closer together.
15 Types of Sequential Fit Allocation: First fit Choose the first free block that fits the data request. Best Fit Try to find exact fitting block. Keep a pointer to best fitting block seen. Others optimal fit, worst fit. Deallocate: Memory location Find free block before and after. Increasing size,decreasing size lists
16 Memory Management In reviewing game memory management methods, I learned a trick I didn't know: how to construct a double linked list with only one pointer in each node! OGRE Memory Class Boot Memory Management
17 XOR Trick C=Current node. N = next node. P=Previous node. Store P xor N in Current node. Moving down the list (P xor N) xor P =N. Moving up the list (P xor N) xor N =P.
Robust Memory Management Schemes
Robust Memory Management Schemes Prepared by : Fadi Sbahi & Ali Bsoul Supervised By: Dr. Lo ai Tawalbeh Jordan University of Science and Technology Robust Memory Management Schemes Introduction. Memory
More informationEngine Support System. asyrani.com
Engine Support System asyrani.com A game engine is a complex piece of software consisting of many interacting subsystems. When the engine first starts up, each subsystem must be configured and initialized
More informationHeap Management portion of the store lives indefinitely until the program explicitly deletes it C++ and Java new Such objects are stored on a heap
Heap Management The heap is the portion of the store that is used for data that lives indefinitely, or until the program explicitly deletes it. While local variables typically become inaccessible when
More informationCIS Operating Systems Contiguous Memory Allocation. Professor Qiang Zeng Spring 2018
CIS 3207 - Operating Systems Contiguous Memory Allocation Professor Qiang Zeng Spring 2018 Previous class Uniprocessor policies FCFS, Shortest Job First Round Robin Multilevel Feedback Queue Multiprocessor
More informationRun-time Environments -Part 3
Run-time Environments -Part 3 Y.N. Srikant Computer Science and Automation Indian Institute of Science Bangalore 560 012 NPTEL Course on Compiler Design Outline of the Lecture Part 3 What is run-time support?
More informationProgramming Languages
Programming Languages Tevfik Koşar Lecture - VIII February 9 th, 2006 1 Roadmap Allocation techniques Static Allocation Stack-based Allocation Heap-based Allocation Scope Rules Static Scopes Dynamic Scopes
More informationRun-time Environments - 3
Run-time Environments - 3 Y.N. Srikant Computer Science and Automation Indian Institute of Science Bangalore 560 012 NPTEL Course on Principles of Compiler Design Outline of the Lecture n What is run-time
More informationMemory Management. q Basic memory management q Swapping q Kernel memory allocation q Next Time: Virtual memory
Memory Management q Basic memory management q Swapping q Kernel memory allocation q Next Time: Virtual memory Memory management Ideal memory for a programmer large, fast, nonvolatile and cheap not an option
More informationPreview. Memory Management
Preview Memory Management With Mono-Process With Multi-Processes Multi-process with Fixed Partitions Modeling Multiprogramming Swapping Memory Management with Bitmaps Memory Management with Free-List Virtual
More informationMemory Management william stallings, maurizio pizzonia - sistemi operativi
Memory Management 1 summary goals and requirements techniques that do not involve virtual memory 2 memory management tracking used and free memory primitives allocation of a certain amount of memory de-allocation
More informationIn multiprogramming systems, processes share a common store. Processes need space for:
Memory Management In multiprogramming systems, processes share a common store. Processes need space for: code (instructions) static data (compiler initialized variables, strings, etc.) global data (global
More informationMachine Problem 1: A Simple Memory Allocator
Machine Problem 1: A Simple Memory Allocator Introduction In this machine problem, you are to develop a simple memory allocator that implements the functions my malloc() and my free(), very similarly to
More informationDynamic Memory Allocation
Dynamic Memory Allocation CS61, Lecture 10 Prof. Stephen Chong October 4, 2011 Announcements 1/2 Assignment 4: Malloc Will be released today May work in groups of one or two Please go to website and enter
More informationMotivation for Dynamic Memory. Dynamic Memory Allocation. Stack Organization. Stack Discussion. Questions answered in this lecture:
CS 537 Introduction to Operating Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department Dynamic Memory Allocation Questions answered in this lecture: When is a stack appropriate? When is
More informationMemory Allocators. Pradipta De
Memory Allocators Pradipta De pradipta.de@sunykorea.ac.kr Today s Topic How does memory allocators work? Challenges and techniques for memory allocation (Physical) Memory allocation techniques in Linux
More informationPart II: Memory Management. Chapter 7: Physical Memory Chapter 8: Virtual Memory Chapter 9: Sharing Data and Code in Main Memory
Part II: Memory Management Chapter 7: Physical Memory Chapter 8: Virtual Memory Chapter 9: Sharing Data and Code in Main Memory 1 7. Physical Memory 7.1 Preparing a Program for Execution Program Transformations
More informationMemory Management. To do. q Basic memory management q Swapping q Kernel memory allocation q Next Time: Virtual memory
Memory Management To do q Basic memory management q Swapping q Kernel memory allocation q Next Time: Virtual memory Memory management Ideal memory for a programmer large, fast, nonvolatile and cheap not
More informationMemory Management. Today. Next Time. Basic memory management Swapping Kernel memory allocation. Virtual memory
Memory Management Today Basic memory management Swapping Kernel memory allocation Next Time Virtual memory Midterm results Average 68.9705882 Median 70.5 Std dev 13.9576965 12 10 8 6 4 2 0 [0,10) [10,20)
More informationMemory Allocation. Copyright : University of Illinois CS 241 Staff 1
Memory Allocation Copyright : University of Illinois CS 241 Staff 1 Memory allocation within a process What happens when you declare a variable? Allocating a page for every variable wouldn t be efficient
More informationA.Arpaci-Dusseau. Mapping from logical address space to physical address space. CS 537:Operating Systems lecture12.fm.2
UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 537 A. Arpaci-Dusseau Intro to Operating Systems Spring 2000 Dynamic Memory Allocation Questions answered in these notes When is a stack
More informationRequirements, Partitioning, paging, and segmentation
Requirements, Partitioning, paging, and segmentation Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated efficiently to pack as many processes into memory
More informationDOWNLOAD PDF LINKED LIST PROGRAMS IN DATA STRUCTURE
Chapter 1 : What is an application of linear linked list data structures? - Quora A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements
More informationRequirements, Partitioning, paging, and segmentation
Requirements, Partitioning, paging, and segmentation Main Memory: The Big Picture kernel memory proc struct kernel stack/u area Stack kernel stack/u area Stack kernel stack/u area Stack Data Text (shared)
More informationCS61C : Machine Structures
inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #6: Memory Management CS 61C L06 Memory Management (1) 2006-07-05 Andy Carle Memory Management (1/2) Variable declaration allocates
More informationMemory Management III Memory Alloca0on
Memory Management III Memory Alloca0on COMS W4118 Prof. Kaustubh R. Joshi krj@cs.columbia.edu hgp://www.cs.columbia.edu/~krj/os References: Opera0ng Systems Concepts (9e), Linux Kernel Development, previous
More informationBinding and Storage. COMP 524: Programming Language Concepts Björn B. Brandenburg. The University of North Carolina at Chapel Hill
Binding and Storage Björn B. Brandenburg The University of North Carolina at Chapel Hill Based in part on slides and notes by S. Olivier, A. Block, N. Fisher, F. Hernandez-Campos, and D. Stotts. What s
More informationMemory management. Johan Montelius KTH
Memory management Johan Montelius KTH 2017 1 / 22 C program # include int global = 42; int main ( int argc, char * argv []) { if( argc < 2) return -1; int n = atoi ( argv [1]); int on_stack
More informationOperating System Labs. Yuanbin Wu
Operating System Labs Yuanbin Wu CS@ECNU Operating System Labs Project 2 Due 21:00, Oct. 24 Project 3 Group of 3 If you can not find a partner, drop us an email You now have 3 late days, but start early!
More informationMemory Allocation. Static Allocation. Dynamic Allocation. Dynamic Storage Allocation. CS 414: Operating Systems Spring 2008
Dynamic Storage Allocation CS 44: Operating Systems Spring 2 Memory Allocation Static Allocation (fixed in size) Sometimes we create data structures that are fixed and don t need to grow or shrink. Dynamic
More informationMain Memory. Electrical and Computer Engineering Stephen Kim ECE/IUPUI RTOS & APPS 1
Main Memory Electrical and Computer Engineering Stephen Kim (dskim@iupui.edu) ECE/IUPUI RTOS & APPS 1 Main Memory Background Swapping Contiguous allocation Paging Segmentation Segmentation with paging
More informationECE 598 Advanced Operating Systems Lecture 10
ECE 598 Advanced Operating Systems Lecture 10 Vince Weaver http://www.eece.maine.edu/~vweaver vincent.weaver@maine.edu 17 February 2015 Announcements Homework #1 and #2 grades, HW#3 Coming soon 1 Various
More informationChapter 8: Memory Management. Operating System Concepts with Java 8 th Edition
Chapter 8: Memory Management 8.1 Silberschatz, Galvin and Gagne 2009 Background Program must be brought (from disk) into memory and placed within a process for it to be run Main memory and registers are
More information! What is main memory? ! What is static and dynamic allocation? ! What is segmentation? Maria Hybinette, UGA. High Address (0x7fffffff) !
Memory Questions? CSCI [4 6]730 Operating Systems Main Memory! What is main memory?! How does multiple processes share memory space?» Key is how do they refer to memory addresses?! What is static and dynamic
More informationDynamic Memory Management! Goals of this Lecture!
Dynamic Memory Management!!! 1 Goals of this Lecture! Help you learn about:! Dynamic memory management techniques! Garbage collection by the run-time system (Java)! Manual deallocation by the programmer
More informationMemory Management. Memory Management
Memory Management Chapter 7 1 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated efficiently to pack as many processes into memory as possible 2 1 Memory
More informationOptimizing Dynamic Memory Management
Optimizing Dynamic Memory Management 1 Goals of this Lecture Help you learn about: Details of K&R heap mgr Heap mgr optimizations related to Assignment #5 Faster free() via doubly-linked list, redundant
More informationCSCI 4500 / 8506 Sample Questions for Quiz 5
CSCI 4500 / 8506 Sample Questions for Quiz 5 1. Why might a system treat memory allocation requests from the operating system itself differently from those generated by an application? a. The OS typically
More information6.172 Performance Engineering of Software Systems Spring Lecture 9. P after. Figure 1: A diagram of the stack (Image by MIT OpenCourseWare.
6.172 Performance Engineering of Software Systems Spring 2009 Lecture 9 MIT OpenCourseWare Dynamic Storage Allocation Stack allocation: LIFO (last-in-first-out) Array and pointer A used unused P before
More informationCS420: Operating Systems
Main Memory James Moscola Department of Engineering & Computer Science York College of Pennsylvania Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne Background Program must
More informationMemory Management. Memory Management. G53OPS: Operating Systems. Memory Management Monoprogramming 11/27/2008. Graham Kendall.
Memory Management Memory Management Introduction Graham Kendall Memory Management consists of many tasks, including Being aware of what parts of the memory are in use and which parts are not Allocating
More informationMemory Management. Memory Management Requirements
Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable supply of ready processes to consume available processor time 1 Memory Management
More informationOperating Systems Unit 6. Memory Management
Unit 6 Memory Management Structure 6.1 Introduction Objectives 6.2 Logical versus Physical Address Space 6.3 Swapping 6.4 Contiguous Allocation Single partition Allocation Multiple Partition Allocation
More informationFile. File System Implementation. Operations. Permissions and Data Layout. Storing and Accessing File Data. Opening a File
File File System Implementation Operating Systems Hebrew University Spring 2007 Sequence of bytes, with no structure as far as the operating system is concerned. The only operations are to read and write
More informationCS6401- Operating System UNIT-III STORAGE MANAGEMENT
UNIT-III STORAGE MANAGEMENT Memory Management: Background In general, to rum a program, it must be brought into memory. Input queue collection of processes on the disk that are waiting to be brought into
More informationDynamic Memory Allocation. Gerson Robboy Portland State University. class20.ppt
Dynamic Memory Allocation Gerson Robboy Portland State University class20.ppt Harsh Reality Memory is not unbounded It must be allocated and managed Many applications are memory dominated Especially those
More informationChapter 9 Memory Management Main Memory Operating system concepts. Sixth Edition. Silberschatz, Galvin, and Gagne 8.1
Chapter 9 Memory Management Main Memory Operating system concepts. Sixth Edition. Silberschatz, Galvin, and Gagne 8.1 Chapter 9: Memory Management Background Swapping Contiguous Memory Allocation Segmentation
More informationMain Memory and the CPU Cache
Main Memory and the CPU Cache CPU cache Unrolled linked lists B Trees Our model of main memory and the cost of CPU operations has been intentionally simplistic The major focus has been on determining
More information6. Which of the following operating systems was the predecessor of Microsoft MS-DOS? a. Dynix b. Minix c. CP/M
CSCI 4500 / 8506 Sample Questions for Quiz 5 Covers Module 9 1. Why might a system treat memory allocation requests from the operating system itself differently from those generated by an application?
More informationDynamic Memory Management
Dynamic Memory Management Professor Jennifer Rexford http://www.cs.princeton.edu/~jrex 1 Goals of Today s Lecture Dynamic memory management o Garbage collection by the run-time system (Java) o Manual deallocation
More informationVirtual Memory COMPSCI 386
Virtual Memory COMPSCI 386 Motivation An instruction to be executed must be in physical memory, but there may not be enough space for all ready processes. Typically the entire program is not needed. Exception
More informationCS Operating Systems
CS 4500 - Operating Systems Module 9: Memory Management - Part 1 Stanley Wileman Department of Computer Science University of Nebraska at Omaha Omaha, NE 68182-0500, USA June 9, 2017 In This Module...
More informationCS Operating Systems
CS 4500 - Operating Systems Module 9: Memory Management - Part 1 Stanley Wileman Department of Computer Science University of Nebraska at Omaha Omaha, NE 68182-0500, USA June 9, 2017 In This Module...
More informationMachine Problem 1: A Simple Memory Allocator. 100 points Due date: To Be Announced
Machine Problem 1: A Simple Memory Allocator Introduction 100 points Due date: To Be Announced In this machine problem, you are to develop a simple memory allocator that implements the functions my malloc()
More informationCIS Operating Systems Memory Management. Professor Qiang Zeng Fall 2017
CIS 5512 - Operating Systems Memory Management Professor Qiang Zeng Fall 2017 Previous class Uniprocessor policies FCFS, Shortest Job First Round Robin Multilevel Feedback Queue Multiprocessor policies
More informationCS 62 Practice Final SOLUTIONS
CS 62 Practice Final SOLUTIONS 2017-5-2 Please put your name on the back of the last page of the test. Note: This practice test may be a bit shorter than the actual exam. Part 1: Short Answer [32 points]
More informationPerformance of Various Levels of Storage. Movement between levels of storage hierarchy can be explicit or implicit
Memory Management All data in memory before and after processing All instructions in memory in order to execute Memory management determines what is to be in memory Memory management activities Keeping
More informationOperating Systems and Computer Networks. Memory Management. Dr.-Ing. Pascal A. Klein
Operating Systems and Computer Networks Memory Management pascal.klein@uni-due.de Alexander Maxeiner, M.Sc. Faculty of Engineering Agenda 1 Swapping 2 Segmentation Algorithms 3 Memory Allocation 4 Virtual
More informationLinux Operating System
Linux Operating System Dept. of Computer Science & Engineering 1 History Linux is a modern, free operating system based on UNIX standards. First developed as a small but self-contained kernel in 1991 by
More informationSegmentation with Paging. Review. Segmentation with Page (MULTICS) Segmentation with Page (MULTICS) Segmentation with Page (MULTICS)
Review Segmentation Segmentation Implementation Advantage of Segmentation Protection Sharing Segmentation with Paging Segmentation with Paging Segmentation with Paging Reason for the segmentation with
More information22 File Structure, Disk Scheduling
Operating Systems 102 22 File Structure, Disk Scheduling Readings for this topic: Silberschatz et al., Chapters 11-13; Anderson/Dahlin, Chapter 13. File: a named sequence of bytes stored on disk. From
More informationChapter 12: File System Implementation
Chapter 12: File System Implementation Virtual File Systems. Allocation Methods. Folder Implementation. Free-Space Management. Directory Block Placement. Recovery. Virtual File Systems An object-oriented
More informationOperating Systems. 11. Memory Management Part 3 Kernel Memory Allocation. Paul Krzyzanowski Rutgers University Spring 2015
Operating Systems 11. Memory Management Part 3 Kernel Memory Allocation Paul Krzyzanowski Rutgers University Spring 2015 1 Kernel memory The kernel also needs memory User code calls malloc kernel functions
More information1. With respect to space, linked lists are and arrays are.
1. With respect to space, linked lists are and arrays are. 1. With respect to space, linked lists are good and arrays are bad. 2. With respect to time, linked lists are and arrays are. 2. With respect
More informationLectures 13 & 14. memory management
Lectures 13 & 14 Linked lists and memory management Courtesy of Prof. Garcia (UCB) CS61C L05 Introduction to C (pt 3) (1) Review Pointers and arrays are virtually same C knows how to increment pointers
More informationCS307 Operating Systems Main Memory
CS307 Main Memory Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2018 Background Program must be brought (from disk) into memory and placed within a process
More informationFirst-In-First-Out (FIFO) Algorithm
First-In-First-Out (FIFO) Algorithm Reference string: 7,0,1,2,0,3,0,4,2,3,0,3,0,3,2,1,2,0,1,7,0,1 3 frames (3 pages can be in memory at a time per process) 15 page faults Can vary by reference string:
More informationReview! Lecture 5 C Memory Management !
CS61C L05 C Memory Management (1)! inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 5 C Memory Management 2010-06-28!!! Instructor Paul Pearce! Symmetric multiprocessor! MIPS support for
More informationCS61C : Machine Structures
inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 5 C Memory Management 2010-06-28!!! Instructor Paul Pearce! Symmetric multiprocessor! MIPS support for Android MIPS Technologies (founded
More informationHashing file organization
Hashing file organization These slides are a modified version of the slides of the book Database System Concepts (Chapter 12), 5th Ed., McGraw-Hill, by Silberschatz, Korth and Sudarshan. Original slides
More informationDynamic Memory Management
Dynamic Memory Management 1 Goals of this Lecture Help you learn about: Dynamic memory management techniques Garbage collection by the run-time system (Java) Manual deallocation by the programmer (C, C++)
More informationDynamic Memory Allocation. Basic Concepts. Computer Organization 4/3/2012. CSC252 - Spring The malloc Package. Kai Shen
Dynamic Memory Allocation: Basic Concepts Kai Shen Dynamic Memory Allocation Programmers use dynamic memory allocators (such as malloc) to acquire memory at run time. For data structures whose size is
More informationChapter 10: Case Studies. So what happens in a real operating system?
Chapter 10: Case Studies So what happens in a real operating system? Operating systems in the real world Studied mechanisms used by operating systems Processes & scheduling Memory management File systems
More informationProgramming Assignment 3
UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Summer 2017 Programming Assignment 3 Introduction For this programming assignment you are to write a C, C++, Java, or Python
More informationToday. Dynamic Memory Allocation: Basic Concepts. Dynamic Memory Allocation. Dynamic Memory Allocation. malloc Example. The malloc Package
Today Dynamic Memory Allocation: Basic Concepts Basic concepts Performance concerns Approach 1: implicit free lists CSci 01: Machine Architecture and Organization October 17th-nd, 018 Your instructor:
More informationPaging. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University
Paging Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics Virtual memory implementation Paging Segmentation 2 Paging (1) Paging Permits
More informationkey h(key) Hash Indexing Friday, April 09, 2004 Disadvantages of Sequential File Organization Must use an index and/or binary search to locate data
Lectures Desktop (C) Page 1 Hash Indexing Friday, April 09, 004 11:33 AM Disadvantages of Sequential File Organization Must use an index and/or binary search to locate data File organization based on hashing
More informationC13: Files and Directories: System s Perspective
CISC 7310X C13: Files and Directories: System s Perspective Hui Chen Department of Computer & Information Science CUNY Brooklyn College 4/19/2018 CUNY Brooklyn College 1 File Systems: Requirements Long
More informationPaging. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University
Paging Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics Virtual memory implementation Paging Segmentation 2 Paging (1) Paging Permits
More informationDynamic Memory Allocation I Nov 5, 2002
15-213 The course that gives CMU its Zip! Dynamic Memory Allocation I Nov 5, 2002 Topics Simple explicit allocators Data structures Mechanisms Policies class21.ppt Harsh Reality Memory is not unbounded
More informationDynamic Memory Allocation: Basic Concepts
Dynamic Memory Allocation: Basic Concepts CSE 238/2038/2138: Systems Programming Instructor: Fatma CORUT ERGİN Slides adapted from Bryant & O Hallaron s slides 1 Today Basic concepts Implicit free lists
More informationVirtual Memory I. Jo, Heeseung
Virtual Memory I Jo, Heeseung Today's Topics Virtual memory implementation Paging Segmentation 2 Paging Introduction Physical memory Process A Virtual memory Page 3 Page 2 Frame 11 Frame 10 Frame 9 4KB
More informationDynamic Memory Allocation I
Dynamic Memory Allocation I William J. Taffe Plymouth State University Using the Slides of Randall E. Bryant Carnegie Mellon University Topics Simple explicit allocators Data structures Mechanisms Policies
More informationMemory Allocation in VxWorks 6.0 White Paper
Memory Allocation in VxWorks 6.0 White Paper Zoltan Laszlo Wind River Systems, Inc. Copyright 2005 Wind River Systems, Inc 1 Introduction Memory allocation is a typical software engineering problem for
More informationMemory Management. COMP755 Advanced Operating Systems
Memory Management COMP755 Advanced Operating Systems Purpose of Memory Manager Find a place in RAM for programs and data. OS Memory Manager allocates RAM to programs and OS tasks and data. User level memory
More informationSimulation of Memory Management
Simulation of Memory Management - 1 - Memory Management: Memory management is the management of the contents of processor memory (or storage). Applications and data must be in processor memory before they
More informationSelection Queries. to answer a selection query (ssn=10) needs to traverse a full path.
Hashing B+-tree is perfect, but... Selection Queries to answer a selection query (ssn=) needs to traverse a full path. In practice, 3-4 block accesses (depending on the height of the tree, buffering) Any
More informationCSE506: Operating Systems CSE 506: Operating Systems
CSE 506: Operating Systems Memory Management Review We ve seen how paging works on x86 Maps virtual addresses to physical pages These are the low-level hardware tools This lecture: build up to higher-level
More informationA Hardware Implementation of a High-Performance Memory Allocator
A Hardware Implementation of a High-Performance Memory Allocator Khushwinder Jasrotia Electrical and Computer Engineering University of Toronto Oct 26, 2001 ksj@eecg.toronto.edu Synthesis Reading Group
More informationVIRTUAL MEMORY. Operating Systems 2015 Spring by Euiseong Seo
VIRTUAL MEMORY Operating Systems 2015 Spring by Euiseong Seo Today s Topics Virtual memory implementation Paging Segmentation Paging Permits the physical address space of a process to be noncontiguous
More informationToday. Dynamic Memory Allocation: Basic Concepts. Dynamic Memory Allocation. Dynamic Memory Allocation. malloc Example. The malloc Package
Today Dynamic Memory Allocation: Basic Concepts Basic concepts Performance concerns Approach 1: implicit free lists CSci 01: Machine Architecture and Organization Lecture #9, April th, 016 Your instructor:
More informationCS61C Midterm Review on C & Memory Management
CS61C Midterm Review on C & Memory Management Fall 2006 Aaron Staley Some material taken from slides by: Michael Le Navtej Sadhal Overview C Array and Pointer Goodness! Memory Management The Three Three
More informationIntroduction to Computer Systems /18 243, fall th Lecture, Oct. 22 th
Introduction to Computer Systems 15 213/18 243, fall 2009 16 th Lecture, Oct. 22 th Instructors: Gregory Kesden and Markus Püschel Today Dynamic memory allocation Process Memory Image %esp kernel virtual
More informationProcesses, Address Spaces, and Memory Management. CS449 Spring 2016
Processes, Address Spaces, and Memory Management CS449 Spring 2016 Process A running program and its associated data Process s Address Space 0x7fffffff Stack Data (Heap) Data (Heap) Globals Text (Code)
More informationMemory Management (1) Memory Management. CPU vs. memory. No.8. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University
EECS 3221 Operating System Fundamentals No.8 Memory Management (1) Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University Memory Management A program usually resides on a
More informationMemory Management (1) Memory Management
EECS 3221 Operating System Fundamentals No.8 Memory Management (1) Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University Memory Management A program usually resides on a
More informationChapter 7: Main Memory. Operating System Concepts Essentials 8 th Edition
Chapter 7: Main Memory Operating System Concepts Essentials 8 th Edition Silberschatz, Galvin and Gagne 2011 Chapter 7: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure
More informationChapter 8: Memory- Management Strategies. Operating System Concepts 9 th Edition
Chapter 8: Memory- Management Strategies Operating System Concepts 9 th Edition Silberschatz, Galvin and Gagne 2013 Chapter 8: Memory Management Strategies Background Swapping Contiguous Memory Allocation
More informationOperating systems. Part 1. Module 11 Main memory introduction. Tami Sorgente 1
Operating systems Module 11 Main memory introduction Part 1 Tami Sorgente 1 MODULE 11 MAIN MEMORY INTRODUCTION Background Swapping Contiguous Memory Allocation Noncontiguous Memory Allocation o Segmentation
More informationDynamic Memory Allocation: Basic Concepts
Dynamic Memory Allocation: Basic Concepts 15-213: Introduction to Computer Systems 19 th Lecture, March 30, 2017 Instructor: Franz Franchetti & Seth Copen Goldstein 1 Today Basic concepts Implicit free
More informationPaging. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University
Paging Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu SSE3044: Operating Systems, Fall 2016, Jinkyu Jeong (jinkyu@skku.edu) Paging Allows the physical
More information