当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
JUC并发容器——阻塞队列
基于Event Stream操作JSON
【HIT-SC-LAB2】哈工大2022软件构造 实验2
使用cef离屏渲染技术实现在线教育课件和webrtc视频回放融合录制
vim的介绍
C语言静态变量static的分析
如何在网页标题栏中加入图片!
【HIT-SC-MEMO3】哈工大2022软件构造 复习笔记3
华为鲲鹏arm服务器下使用webrtc和boost踩坑记--编译篇
【HIT-SC-MEMO4】哈工大2022软件构造 复习笔记4
Unity Day03
IP 核之 MMCM/PLL 实验
Rules.make - suitable for viewing in edit mode
C# 剪裁图片内容区域
gRPC intro 1:RPC
ssm pom文件依赖 web.xml配置
沉浸式体验参加网络安全培训班,学习过程详细到底!
[Daily office][shell] Common code snippets
Pfsense漏洞复现(CVE-2021-41282)
C#找系统文件夹路径









