- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
HYPERLINK /gustavo/blog/post/anatomy-of-a-program-in-memory Anatomy of a Program in Memory
Memory management is the heart of operating systems; it is crucial for both programming and system administration. In the next few posts I’ll cover memory with an eye towards practical aspects, but without shying away from internals. While the concepts are generic, examples are mostly from Linux and Windows on 32-bit x86. This first post describes how programs are laid out in memory.
Each process in a multi-tasking OS runs in its own memory sandbox. This sandbox is the?virtual address space, which in 32-bit mode is?always a 4GB block of memory addresses. These virtual addresses are mapped to physical memory by?page tables, which are maintained by the operating system kernel and consulted by the processor. Each process has its own set of page tables, but there is a catch. Once virtual addresses are enabled, they apply to?all software?running in the machine,?including the kernel itself. Thus a portion of the virtual address space must be reserved to the kernel:
This does?not?mean the kernel uses that much physical memory, only that it has that portion of address space available to map whatever physical memory it wishes. Kernel space is flagged in the page tables as exclusive to? HYPERLINK /gustavo/blog/post/cpu-rings-privilege-and-protection privileged code?(ring 2 or lower), hence a page fault is triggered if user-mode programs try to touch it. In Linux, kernel space is constantly present and maps the same physical memory in all processes. Kernel code and data are always addressable, ready to handle interrupts or system calls at any time. By contrast, the mapping for the user-mode portion of the address space changes whenever a process switch happens:
Blue regions represent virtual addresses that are mapped to physical memory, whereas white regions are unmapped. In the example above, Firefox has used far more of its virtual address space due to its legendary memory hunge
您可能关注的文档
- WTO管理英语整理版.doc
- ZC-FSHB5反渗透海水淡化装置 中英文技术规格书.doc
- ZTE English 900 中兴英语900句.doc
- Н. М. Раевская -- Modern English Grammar.doc
- 艾莱克斯”少儿英语培训学校创业计划书.doc
- 爱丽丝梦游仙境__Alice adventures in wonder land.doc
- 安徽省蚌埠二中11—12学年高三上学期期中考试(英语试题及答案).doc
- 安徽省名校2012届高三第五次联考试卷(英语)附答案.doc
- 安徽省省城名校2012届高三第四次联考试题(英语试题及答案)WORD版.doc
- 安徽省省城名校2012届高三上学期第三次联考试题(英语试题及答案)WORD版.doc
最近下载
- 施工企业现场质量管理制度及奖惩办法.pdf VIP
- 传感器原理及应用 教案.pdf VIP
- 砂石料供应、运输、售后服务方案14627.pdf VIP
- 传承雷锋精神争做时代新人--主题班会课件.pptx VIP
- 气管切开非机械通气患者气道管理考试题及答案.doc
- 横河flxa21两线制电导率变送器快速启动手册.pdf VIP
- 图集规范-天津图集-12J5-1图集(2012版)平屋面 DBJT29-18-2013.pdf VIP
- 第2课+丰富多彩的中华传统体育+课件 2025-2026学年人教版(2024)初中体育与健康八年级全一册.pptx VIP
- 第12课 闭环控制助稳定 教案 义务教育人教版信息科技六年级全一册.pdf VIP
- 生命教育PPT模板.pptx VIP
文档评论(0)