当前位置:网站首页>Memory Management
Memory Management
2022-08-04 05:33:00 【学习溢出】
Memory Management
Memory management is the functionality of an operating system which handles or manages primary memory and moves processes back and forth between main memory and disk during execution.
It checks how much memory is to be allocated to processes. It decides which process will get memory at what time.
Process Address Space
The process address space is the set of logical addresses that a process references in its code.
The set of all logical addresses generated by a program is referred to as a logical address space. The set of all physical addresses corresponding to these logical addresses is referred to as a physical address space.
The runtime mapping from virtual to physical address is done by the memory management unit (MMU) which is a hardware device.
Static vs Dynamic Loading
Static loading, the absolute program (and data) is loaded into memory in order for execution to start.
Dynamic loading, dynamic routines of the library are stored on a disk in relocatable form and are loaded into memory only when they are needed by the program.
Fragmentation
As processes are loaded and removed from memory, the free memory space is broken into little pieces. It happens after sometimes that processes cannot be allocated to memory blocks considering their small size and memory blocks remains unused. This problem is known as Fragmentation.
Paging
Paging is a memory management technique in which process address space is broken into blocks of the same size called pages.
Main memory is divided into small fixed-sized blocks of (physical) memory called frames
And the size of a frame is kept the same as that of a page to have optimum utilization of the main memory and to avoid external fragmentation.
Address Translation
Page address is called logical address and represented by page number and the offset.
Logical Address = Page number + page offset
Frame address is called physical address and represented by a frame number and the offset.
Physical Address = Frame number + page offset
Reference
https://www.tutorialspoint.com/operating_system/os_memory_management.htm
边栏推荐
猜你喜欢
随机推荐
(位操作符)按位与、按位或、按位异或
冰歇webshell初探
JVM三大常量池与方法区
基于Event Stream操作JSON
数据库实体类对应daoimpl,基础的增删改查。
安装Apache服务时出现的几个问题, AH00369,AH00526,AH00072....
C# 剪裁图片内容区域
Unity Day03
Uos统信系统控制台欢迎登陆后消息及所处区域配置
Uos统信系统 本地APT源配置
【HIT-SC-LAB1】哈工大2022软件构造 实验1
注册表设置默认浏览器 win7,winserver 2008,winserver 2012
[Development miscellaneous][Debug]debug into kernel
JDBC第一学之进行数据库连接时出现The server time zone.....解决办法
通用解决端口占用问题
MySQL stored procedure study notes (based on 8.0)
调用时序错误导致webrtc无法建立链接
无一技之长学什么可以做到月入上万?
bitnami/mongodb-sharded在AWS EKS扩展shard失败解决
线性表之动态数组(ArrayList)的自实现









