The Chinese company ByteDance, which develops the TikTok service, has released patches for the Linux kernel developers' mailing list that implement the Parker (PARtitioned KERnel) system, allowing multiple Linux kernels to run simultaneously on one computer without traditional virtualization. In terms of tasks to be solved, Parker resembles the Multikernel project introduced a few days ago but differs in its architecture and implementation.
Parker utilizes the partitioning of available CPU cores, memory, and devices. Each running kernel instance is based on a common kernel image but can use different settings and optimizations. The first loaded kernel (Boot Kernel) handles the allocation and partitioning of hardware devices. Other Linux kernel instances (Application Kernel) only work with their assigned CPU cores, memory, and input/output devices.
In its initial version, to reduce overhead and simplify implementation, there is no management mechanism, and all kernels use a single isolation area (domain), meaning that an error in any kernel instance can lead to issues across the entire system. In the future, separate hardware capabilities are planned to be utilized for isolating kernel instances. Parker is mentioned to be applicable to computers with a large number of CPU cores, which face problems when scaling tasks.
Parker has an interface based on kernfs for management, and kexec is used to load additional kernel instances into reserved memory areas. Before launching additional kernels, the primary kernel releases CPU cores, reserves physical memory, and unbinds PCI devices for their use in the partitioned kernel. Each kernel should have its own PCIe device for input/output, such as an NVMe drive or network adapter. Once a kernel instance is launched, it cannot interact with other kernels.
Source: opennet.ru
