Mind map
MEMORY MANAGEMENT

Map content
MEMORY MANAGEMENT
Tecnológico de Costa Rica, Carrera: Ingeniería en Computación, Sede: Cartago, Curso: Principios de sistemas operativos, Profesor: Esteban Arias Méndez, Estudiante: Jason David Espinoza Siles, Carné: 201223941, II semestre, 2016, Libro: Operating System Concepts: capítulo 8. Reporte #8
BACKGROUND
- 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 CPU can access directly -- Memory unit only sees a stream of addresses + read requests, or address + data and write requests -- Register access in one CPU clock (or less) -- Main memory can take many cycles, causing a stall -- Cache sits between main memory and CPU registers -- Protection of memory required to ensure correct operation
ADDRESS BINDING
- Programs on disk, ready to be brought into memory to execute form an input queue
- Inconvenient to have first user process physical address always at 0000
- BINDING OF INSTRUCTIONS AND DATA MEMORY
- Address binding of instructions and data to memory addresses can happen at three different stages
- COMPILE TIME
- LOAD TIME
- EXECUTION TIME
- Address binding of instructions and data to memory addresses can happen at three different stages
Multistep Processing of a User Program
Logical vs. Physical Address Space
- LAS DIRECCIONES LÓGICAS SON CREADAS POR EL CPU HACIA MEMORIA VIRTUAL, SI VEMOS LA MOMORIA FÍSICA SERÁ LA DIRECCIÓN FÍSICA
- UN PROGRAMA PUEDE UTILIZAR MEMORIA VIRUTAL O FÍSICA
Memory-Management Unit (MMU)
- Hardware device that at run time maps virtual to physical address
- Dynamic Linking
- Static linking – system libraries and program code combined by the loader into the binary program image Dynamic linking –linking postponed until execution time Small piece of code, stub, used to locate the appropriate memory-resident library routine Stub replaces itself with the address of the routine, and executes the routine Operating system checks if routine is in processes’ memory address Dynamic linking is particularly useful for libraries System also known as shared libraries Consider applicability to patching system libraries
- Swapping
- A process can be swapped temporarily out of memory to a backing store, and then brought back into memory for continued execution Total physical memory space of processes can exceed physical memory Backing store – fast disk large enough to accommodate copies of all memory images for all users; must provide direct access to these memory images Roll out, roll in – swapping variant used for priority-based scheduling algorithms; lower-priority process is swapped out so higher-priority process can be loaded and executed Major part of swap time is transfer time; total transfer time is directly proportional to the amount of memory swapped System maintains a ready queue of ready-to-run processes which have memory images on disk
- Dynamic Linking
- Dynamic relocation using a relocation register
- Routine is not loaded until it is called Better memory-space utilization; unused routine is never loaded All routines kept on disk in relocatable load format Useful when large amounts of code are needed to handle infrequently occurring cases
- Hardware device that at run time maps virtual to physical address
CONTIGUOUS ALLOCATION
- Main memory must support both OS and user processes Limited resource, must allocate efficiently Contiguous allocation is one early method ---- Relocation registers used to protect user processes from each other, and from changing operating-system code and data
Dynamic Storage-Allocation Problem
- 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
- Worst-fit: Allocate the largest hole; must also search entire list
FRAGMENTATION
- 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, but not being used
SEGMENTATION
- ARQUITECTURA
- SEGMENT TABLE
- SEGMENT-TABLE REGISTER
- SEMENT-TABLE LENGTH REGISTER
- ARQUITECTURA
PAGING
- Physical address space of a process can be noncontiguous; process is allocated physical memory whenever the latter is available
Associative Memory
- Paging Hardware With TLB
- Effective Access Time
- Memory Protection
- Shared Pages
- Shared code
- Private code and data
Hashed Page Tables
Inverted Page Table
- Rather than each process having a page table and keeping track of all possible logical pages, track all physical pages One entry for each real page of memory Entry consists of the virtual address of the page stored in that real memory location, with information about the process that owns that page Decreases memory needed to store each page table, but increases time needed to search the table when a page reference occurs
Images and files in the map
Information
- Description
- Mind Map on MEMORY MANAGEMENT, created by Jason Espinoza Siles on 04/10/2016.
- Created by
- Jason Espinoza Siles
- Views
- 0
- Rating










