同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Different from a common dynamic shared library, which stores its .so files in the file system, the virtual dynamic shared object (VDSO) has its .so files stored in the system image. The kernel determines the .so files needed and provides them to the application program. That is why the VDSO is called a virtual dynamic shared library.
The VDSO mechanism allows OpenHarmony user-mode programs to quickly obtain kernel-related data. It can accelerate certain system calls and implement quick read of non-sensitive data (hardware and software configuration).
The VDSO can be regarded as a section of memory (read-only) maintained by the kernel and mapped to the address space of the user-mode applications. By linking vdso.so, the applications can directly access this mapped memory instead of invoking system calls, accelerating application execution.
VDSO can be divided into:
The VDSO mechanism involves the following steps:
Creates the VDSO data page during kernel initialization.
Creates the VDSO code page during kernel initialization.
Updates kernel data to the VDSO data page based on the system clock interrupts.
Maps the code page to the user space when a user process is created.
Binds the VDSO symbols when the user program creates dynamic linking.
The VDSO code page intercepts specific system calls (for example, clock_gettime(CLOCK_REALTIME_COARSE, &ts)).
The VDSO code page allows direct read of the mapped VDSO data page rather than invoking a system call.
Returns data from the VDSO data page to the VDSO code page.
Returns the data obtained from the VDSO data page to the user program.
NOTE:
- The VDSO mechanism supports the CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE functions of the clock_gettime API in the LibC library. For details about how to use the clock_gettime API, see the POSIX standard. You can call clock_gettime(CLOCK_REALTIME_COARSE, &ts) or clock_gettime(CLOCK_MONOTONIC_COARSE, &ts) of the LibC library to use the VDSO.
- When VDSO is used, the time precision is the same as that of the tick interrupt of the system. The VDSO mechanism is applicable to the scenario where there is no demand for high time precision and clock_gettime or gettimeofday is frequently triggered in a short period of time. The VDSO mechanism is not recommended for the system demanding high time precision.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。