virtual-address-space

Is a process' page table mapped to Kernel address space?

独自空忆成欢 提交于 2021-02-05 09:38:18
问题 I was doing Windows system programming and wondered if I can access a process' page table on source code level. Here is what I know about page table related to virtual memory. Let's suppose an user just runs a process called 'A' process on Windows OS(32bit). First of all, the OS creates and maintains 4GB virtual address space for A process. (2GB of it is Kernel address space and the other 2GB is User address space. Any codes in User address space cannot directly access Kernel address space.)

Is a process' page table mapped to Kernel address space?

眉间皱痕 提交于 2021-02-05 09:37:28
问题 I was doing Windows system programming and wondered if I can access a process' page table on source code level. Here is what I know about page table related to virtual memory. Let's suppose an user just runs a process called 'A' process on Windows OS(32bit). First of all, the OS creates and maintains 4GB virtual address space for A process. (2GB of it is Kernel address space and the other 2GB is User address space. Any codes in User address space cannot directly access Kernel address space.)

Why do we need address virtualization in an operating system?

▼魔方 西西 提交于 2021-01-05 12:55:32
问题 I am currently taking a course in Operating Systems and I came across address virtualization. I will give a brief about what I know and follow that with my question. Basically, the CPU(modern microprocessors) generates virtual addresses and then an MMU(memory management unit) takes care of translating those virtual address to their corresponding physical addresses in the RAM. The example that was given by the professor is there is a need for virtualization because say for example: You compile

x86-64 canonical address?

放肆的年华 提交于 2020-07-15 07:08:08
问题 During reading of an Intel manual book I came across the following: On processors that support Intel 64 architecture, the IA32_SYSENTER_ESP field and the IA32_SYSENTER_EIP field must each contain a canonical address. What is a 'canonical address'? 回答1: I suggest that you download the full software developer's manual. The documentation is available in separate volumes, but that link gives you all seven volumes in a single massive PDF, which makes it easier to search for things. The answer is

x86-64 canonical address?

隐身守侯 提交于 2020-07-15 07:08:07
问题 During reading of an Intel manual book I came across the following: On processors that support Intel 64 architecture, the IA32_SYSENTER_ESP field and the IA32_SYSENTER_EIP field must each contain a canonical address. What is a 'canonical address'? 回答1: I suggest that you download the full software developer's manual. The documentation is available in separate volumes, but that link gives you all seven volumes in a single massive PDF, which makes it easier to search for things. The answer is

Behind Windows x64's 44-bit virtual memory address limit

不羁岁月 提交于 2020-01-04 06:07:08
问题 http://www.alex-ionescu.com/?p=50. I read the above post. The author explains why Windows x64 supports only 44-bit virtual memory address with singly linked list example. struct { // 8-byte header ULONGLONG Depth:16; ULONGLONG Sequence:9; ULONGLONG NextEntry:39; } Header8; The first sacrifice to make was to reduce the space for the sequence number to 9 bits instead of 16 bits, reducing the maximum sequence number the list could achieve. This still only left 39 bits for the pointer — a

x86-64: canonical addresses and actual available range

霸气de小男生 提交于 2019-12-21 17:04:03
问题 Intel and AMD documentation says that for 64 bit mode only 48 bits are actually available for virtual addresses, and bits from 48 to 63 must replicate bit 47 (sign-extension). As far as I know, all current CPU are implemented this way, but nothing (in theory) forbids to extend the available space in future implementations (and this won't break the binary compatibility). Is there a standard way to programatically determine the number of meaningful bits? (i.e. some specific CPUID, as happens

Multi-level page tables - hierarchical paging

為{幸葍}努か 提交于 2019-12-20 08:43:11
问题 Example question from a past operating system final, how do I calculate this kind of question? A computer has a 64-bit virtual address space and 2048-byte pages. A page table entry takes 4 bytes. A multi-level page table is used because each table must be contained within a page. How many levels are required? How would I calculate this? 回答1: Since page table must fit in a page, page table size is 2048 bytes and each entry is 4 bytes thus a table holds 2048/4=512 entries. To address 512

virtual memory concepts

前提是你 提交于 2019-12-19 11:40:16
问题 I am confused about some topics regarding virtual memory. So, i am going to pointwise list them and ask questions. While answering i will prefer if you also list some source where i can clear that doubt. I will be talking with reference to a linux elf executable file. I have heard that every process has the address space of 4gb in a 32 bit system. When i checked the objdump of one of my executable relocatable file i saw that it had limits from 00000000 to ffffffff. Also it contained the

How are same virtual address for different processes mapped to different physical addresses

让人想犯罪 __ 提交于 2019-12-18 11:27:38
问题 I have taken a course about Operating System design and concept and now I am trying to study Linux kernel thoroughly. I have a question that I cannot get rid of. In modern operating systems each process has own virtual address space(VAS) (eg, 0 to 2^32-1 in 32-bit systems). This provides many advantages. But in the implementation I am confused at some points. Let me explain it by giving an example: Let's say we have two processes p1, p2; p1 and p2 have their own VASes. An address 0x023f4a54