linux两个进程相同的地址,linux – 为什么内核映射到与进程相同的地址空间

This might be a silly question but it just popped up in my mind. All

the text about process address space and virtual memory layout

mentions that the process address space has space reserved for kernel.

For e.g. on 32 bit systems the process address space is 4GB of which 1

GB is reserved for kernel in Linux (Might be different on other OS).

I am just wondering why kernel is said to be in the process address

space when a process cannot address the kernel directly. Why don’t we

say that the kernel has a separate address space than a process and

why can’t we have a different page table for kernel itself which is

separate from the page tables of the processes?

我可以获得有关linux(debian或ubuntu)特定操作系统的解释.

解决方法:

进程“拥有”这里的整个虚拟地址空间,内核及其用户部分.

它无法窥视和戳戳内核代码和数据不是由于不同的地址空间,而是由于页表中设置的不同访问权限/权限.内核页面的设置方式使常规应用程序无法访问它们.

然而,习惯上将整个事物的两个部分称为内核空间和用户空间,这可能令人困惑.

标签:linux,operating-system,memory-management,kernel

来源: https://codeday.me/bug/20190930/1834800.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值