Tag:Virtual address

  • memory management


    Virtual memory space management User mode virtual memory structure As shown in the following figure, the virtual space layout The growth direction of the stack is from high address to low address, so you can see that the assembly instruction sub RSP is used to allocate stack space for local variables after entering the function […]

  • Memory virtual address mapping physical address


    First explain what is a virtual address. Linux kernel toPer processBoth provide an independent virtual address space, and this address space is continuous. The virtual address space is divided into kernel space and user space. Processors with different word lengths (that is, the maximum length of data that can be processed by a single CPU […]

  • User mode memory mapping and kernel mode kernel mapping


    User mode memory mapping Principle of MMAP In the virtual address space section, we know that each process has a list VM_ area_ Struct, which points to different memory blocks in the virtual address space. The name of this variable is MMAP. In fact, memory mapping is not justMapping between physical memory and virtual memoryIt […]

  • [xv6 source code snooping (0)] page table


    preface The default reader has a basic understanding of the structure of the three-level page table; All of the following contents can be found in the xv6 book, experimental instructions and xv6 source code; When you find errors or improvements, please don’t be stingy with your keyboard. 1、 Preparatory work 1. Kernel memory layout On […]

  • Deep understanding of zero copy


    Title: in depth understanding of zero copy date: 2021/5/21 16:11 1、 I / O concept 1.1 buffer zone Buffer is the basis of all I / O. I / O is nothing more than moving data into or out of the buffer; When a process performs I / O operations, it sends a request to […]

  • Deep parsing segmentation and paging


    Segmentation and paging introduction What are fragments? Predecessor of segment model: base address plus boundary register (dynamic relocation) Segmented management Segmented thought Segmented address translation Another advantage of segment: good support for sharing Virtual address translation is too slow? Disadvantages of segment: too many external fragments Paging management Pagination thought Paging address translation Disadvantages of […]

  • Virtual Memory Essence


    Blog original Virtual Memory Essence introduction Virtual memory is one of the most important abstract concepts in today’s computer system. It is proposed to manage memory more effectively and reduce the probability of memory error. Virtual memory affects all aspects of computer, including hardware design, file system, shared objects and process / thread scheduling. Every […]

  • Memory segmentation


    The program is composed of several logical segments, such as code segments, data segments, stack segments and heap segments. Different segments have different properties, so they are separated in the form of segmentation. How do virtual addresses and physical addresses map under segmentation mechanism? The virtual address under the segmentation mechanism consists of two parts, […]

  • 15 minutes! A text helps Xiaobai understand the memory of the operating system


    preface Operating system is a difficult course to learn. At the same time, operating system knowledge is very important for developers. I believe that when you learn the operating system, there are too many abstract words and concepts that are difficult to understand, which directly dissuade us. Even if you learn the operating system with […]

  • Fork analysis of Linux process creation


       inLinuxIn the kernel, processes are maintained all the time. From process creation to process destruction, every environment has complex details. IntroductionLinuxHow does the kernel create processesforkThe creation of functions and subprocesses is also crucial for understanding multi process development. catalogue Fork() function Fork() example Virtual address space of parent-child process Fork() function First, let’s […]

  • [operating system virtualization] memory paging


    introduce There is an inherent problem in segmented memory management: after the space is divided into different lengths, the space itself will be fragmented, and it will become more difficult to allocate memory over time. Therefore, it is worth considering another method: dividing the space into fixed length pieces. In virtual memory, we call this […]

  • TLS and asynclocal in. Net


    1、 TLS Thread local storage literally means the storage space of a thread. Variables are generally divided into global variables and local variables. All threads in a process share the address space, which is divided into several inherent areas, such as stack area and global variable area. Global variables are stored in the global variable […]