How to manage system process memory
This article mainly explains "how to manage system process memory". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought. Let's study and learn how to manage system process memory.
1. The virtual address size of a process is determined by the system, and the maximum virtual address of a 32-bit system is 4G. The virtual address space is divided into NULL pointer area, user area, 64KB forbidden area, kernel area and so on.
Understanding: the actual memory size of 4G required by a process is sufficient. An APP program has only a few hundred megabytes of memory. So 4G is enough for virtual address allocation.
2. Thread memory model
Volatile visibility ensures the atomicity of each thread's working memory to main memory operation, that is, each thread can get the latest variable value from main memory.
Consistency of multiple CPU accesses to the same variable
Do not access main memory directly, but access main memory indirectly through virtual memory
Cpu cache (a piece of high-speed and small memory), cache is the cache of main memory, and main memory is the cache of disk.
Cpu write data cache- > main memory-> disk
Thank you for your reading. the above is the content of "how to manage system process memory". After the study of this article, I believe you have a deeper understanding of how to manage system process memory. Specific use also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!