当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
Uos统信系统 DNS
使用cef离屏渲染技术实现在线教育课件和webrtc视频回放融合录制
webrtc技术名词和关键技术要点:SVC,REMB,SVC...
strlen 转义字符
淘宝分布式文件系统存储(二)
网络通信与Socket编程概述
使用JS在浏览器中打印菱形
数据库JDBC DAO层方法
Uos统信系统 SSH
【HIT-SC-MEMO4】哈工大2022软件构造 复习笔记4
LeetCode_Nov_5th_Week
文件编辑器
Pfsense漏洞复现(CVE-2021-41282)
指针运算相关面试题详解【C语言】
vs2017 redist 下载地址
Object.requireNonNull 方法说明
Uos统信系统控制台欢迎登陆后消息及所处区域配置
【c语言】整数的二进制表现形式是什么?
位段-C语言
最全的最详细的指针讲解(C语言)