ApH
ApH
知名人士
知名人士
  • 铜币0枚
  • 威望0点
  • 贡献值0点
阅读:450回复:4

[求助]关于操作系统

楼主#
更多 发布于:2003-10-27 13:20
1. 我们知道多任务操作系统中两个进程的虚拟地址空间是毫无关系的(可重叠),但其物理地址空间一定是分开的,我想问的是在使用分段分页机制的系统中,进程的线性地址是否重叠/分开?
2. 物理内存中有一个区域总是被内核占用,此部分放置的是不是内核代码段和内核数据段,而内核堆栈应该是放在进程中的吧,即进程中的高地址部分3G~4G?
kmwang
小有名气
小有名气
  • 铜币0枚
  • 威望0点
  • 贡献值0点
1C#
发布于:2003-10-27 20:03
Re: [求助]关于操作系统
把我那两本书给你,自己找答案吧:).
不知道哪位大虾(在校)可以回答这个问题(第一个应当不少)
ApH
ApH
知名人士
知名人士
  • 铜币0枚
  • 威望0点
  • 贡献值0点
2C#
发布于:2003-10-28 09:15
Re: [求助]关于操作系统
我手头上的一本linux的书在不同的两章对第一个问题有不同的答案,把我搞糊了!
ApH
ApH
知名人士
知名人士
  • 铜币0枚
  • 威望0点
  • 贡献值0点
3C#
发布于:2003-10-29 11:34
Re: [求助]关于操作系统
第一个问题解决:
Forum: 80386 Memory Management
Date: Tue, 23 Jul 1996 09:39:45 GMT
From: Lennart Benschop

The user code and data segments of a process are no longer in the LDT, but in the GDT instead. The code and data segment of each process starts at linear address 0 anyway, only the physical address is different (different page directory =CR3)

Processes still have an LDT, this can be used by certain applications (WINE).

In very early versions of Linux, user space was restricted to 64 MB and there were a maximum of 64 processes (including process 0, which had the kernel in its user space). Back then each process had a different linear address. making a total of 4GB. There was only one page directory, and there were per-process code and data segments, included in the LDT. This (somewhat elegant) scheme was abandoned to allow more than 64 processes and a per process virtual address space of more than 64MB. That's why certain kernels had they suer code and data segments in the LDT, though they were in fact the same segments for all processes.
[ 2003-10-29 15:25:30 ApH 修改 ]
ApH
ApH
知名人士
知名人士
  • 铜币0枚
  • 威望0点
  • 贡献值0点
4C#
发布于:2003-10-29 15:48
Re: [求助]关于操作系统
第二个问题解决了一点:

From: linux-2.4.22/arch/i386/boot/head.S

系统启动后物理内存中的内容分别是:
0x000000   null page
0x001000   swapper_pg_dir       '?
0x002000   pg0
0x003000   pg1
0x004000   empty_zero_page      '?
0x005000   stext                '指的是head.S中的内容么?
           sdata
           gdt_table             '重要!!!

下面是比较早版本的定义,新的不知道^_^!
0x060000   FREE
0x0A0000   RESERVED
0x100000   pg*                   '还存在么?
0x110000   FREE

[ 2003-10-29 15:49:56 ApH 修改 ]
游客

返回顶部