The process descriptor task_struct contains the instances of structure mm_struct named mm and active_mm. For now mm is important for us, as for normal processes mm and active_mm point to same address. However for kernel threads the mm is null (as kernel threads dont have user_mode memory allocated. Here the active_mm points to some mm of some other process. More about it later.
The mm_struct contains the information about all the virtual memory that has been allocated for the process. There is a pointer to list of all virtual memory areas (pointed to by mmap of type vm_area_struct). The memory is also managed in a red-black tree for easy searches. The tree also has a pointer in mm_struct.
The vm_area_struct contains the start_address and end_address of the virtual memory area. Each of this vm_area_struct is also associated with a node in red_black tree. The node pointer is present in vm_rb.
These are core elements of the node structures used to manage the virtual memory.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment