该【Linux操作系统课程指导:Ch15-Process-Address-Space-(进程地址空间) 】是由【红色的种子】上传分享,beplayapp体育下载一共【17】页,该beplayapp体育下载可以免费在线阅读,需要了解更多关于【Linux操作系统课程指导:Ch15-Process-Address-Space-(进程地址空间) 】的内容,可以使用beplayapp体育下载的站内搜索功能,选择自己适合的beplayapp体育下载,以下文字是截取该文章内的部分文字,如需要获得完整电子版,请下载此beplayapp体育下载到您的设备,方便您编辑和打印。Process Address Space(进程地址空间)Process Address Space?Process has own address space:?Can access whole physical memory?Larger than physical memory size?Virtual as it owns the whole system?Important idea?Flat address space?Unique to each process?Different data at same address?Share address space, thread?Memory area: permissions, sections2022/4/21Liang Shi:Linux Operating Systems2Outline?Address Space?The Memory Descriptor?Virtual Memory Areas?Manipulating Memory Areas?Page Tables?Conclusions2022/4/21Liang Shi:Linux Operating Systems3The Memory Descriptor2022/4/21Liang Shi:Linux Operating Systems4The Memory Descriptor?Allocating a Memory Descriptor?copy_mm()?allocate_mm()?If CLONE_VM is set, it is thread2022/4/21Liang Shi:Linux Operating Systems5The Memory Descriptor?Destroying a Memory Descriptor?exit_mm()?mmput()–decrements the memory descriptor’smm_users?Mmdrop()–decrement the mm_count usage counter?Free_mm()–reduce mm_struct the mm_cachep slabcache via kmem_cache_free()2022/4/21Liang Shi:Linux Operating Systems6The Memory Descriptor?Themm_structand Kernel Threads?kernel threads use the memory descriptor ofwhatever task ran previously?Kernel threads do not have an address space andmm is NULL2022/4/21Liang Shi:Linux Operating Systems7Virtual Memory Areas?The vm_area_struct structure describes a single memory areaover a contiguous interval in a given address space2022/4/21Liang Shi:Linux Operating Systems8Virtual Memory Areas?VMA Operations2022/4/21Liang Shi:Linux Operating Systems9Virtual Memory Areas?Lists and Trees of Memory Areas?mmap, links together all the memory area objects in asingly linked list.?mm_rb, links together all the memory area objects in ared-black tree.?The linked list is used when every node needs to betraversed?The red-black tree isused when locating a specificmemory area in the address space2022/4/21Liang Shi:Linux Operating Systems10