$linuxjunkies
>

syscall vDSO

also: virtual Dynamic Shared Object, vDSO

The virtual Dynamic Shared Object (vDSO) is a kernel-provided virtual shared library that allows certain system calls to execute in user space without the overhead of a traditional context switch to kernel mode.

The vDSO is a memory-mapped page created by the Linux kernel and made available to every process. It contains optimized implementations of frequently-called system calls that don't require full kernel privileges, eliminating the expensive context switch overhead.

Common vDSO syscalls include gettimeofday(), clock_gettime(), and getpid(). When a program calls these functions through the C library, the libc implementation checks if a vDSO version exists and uses it directly from user space, making the call much faster than a traditional syscall.

The vDSO is architecture-specific and automatically loaded by the kernel at process startup. You can inspect it using tools like ldd or by examining /proc/[pid]/maps, where it typically appears as [vdso]. This mechanism provides a transparent performance optimization—applications don't need special code to benefit from it.

Related terms