载入中。。。

载入中。。。

公告

载入中。。。

文章

评论

留言

连接

   流媒体世界

信息

登陆

搜索

2006-10-11 18:08:00
Linux MMU summary(5)

Process and the VM
 
1. how it works when we make an alloc call.
 
When a process allocates virtual memory, Linux does not actually reserve physical memory for the process. Instead, it describes the virtual memory by creating a new vm_area_struct data structure. This is linked into the process's list of virtual memory. When the process attempts to write to a virtual address within that new virtual memory region then the system will page fault. The processor will attempt to decode the virtual address, but as there are no Page Table Entries for any of this memory, it will give up and raise a page fault exception, leaving the Linux kernel to fix things up. Linux looks to see if the virtual address referenced is in the current process's virtual address space. If it is, Linux creates the appropriate PTEs and allocates a physical page of memory for this process. The code or data may need to be brought into that physical page from the filesystem or from the swap disk. The process can then be restarted at the instruction that caused the page fault and, this time as the memory physically exists, it may continue.
 
2. ... (待续)


  • 标签:Linux MMU 
  • 发表评论:
    载入中。。。
    Powered by Oblog.