Tagged articles
process creation
10 articles · Page 1 of 1
This article explains Linux’s Copy‑On‑Write mechanism, detailing how it avoids full memory duplication during process creation, the underlying page‑table workflow, its implementation in the kernel, and real‑world applications such as Redis persistence, Docker image layering, and filesystem snapshots, while also discussing its advantages and drawbacks.
Linuxcopy-on-writememory management
0 likes · 73 min read

This article explains what ELF files are, details their header, program header table, sections and section header table, and walks through how Linux uses fork and execve to clone a child process and load an ELF binary into a new address space.
Binary FormatELFLinux
0 likes · 13 min read

This article walks through the Linux kernel mechanisms for creating and destroying processes, covering copy‑on‑write, the fork/vfork/clone system calls, the kernel_clone implementation in kernels 5.0 and 6.5, the copy_process workflow, and the steps the kernel takes to wake up a new task and clean up a terminated one.
CloneLinuxeBPF
0 likes · 26 min read

This article explains Linux process creation and termination, covering kernel functions like kernel_thread, kthread_create, kthread_run, the central _do_fork implementation, and user‑space interfaces such as fork, vfork, and pthread_create, with code snippets and diagrams.
Linuxforkkernel
0 likes · 7 min read

This article explains step by step how a simple Hello World program is compiled, linked, and executed on Linux, covering the ELF executable format, the role of the file command, the fork‑execve process creation sequence, and the kernel’s binary loader implementation.
ELFLinuxbinary loading
0 likes · 28 min read

A Linux server repeatedly reports “fork: cannot allocate memory” not because RAM is exhausted but due to excessive Java threads causing PID allocation failures, and the kernel mistakenly maps those failures to the ENOMEM error code.
ENOMEMalloc_pidfork
0 likes · 12 min read


ITPUBMar 9, 2022 · Fundamentals
The article explains why Linux’s fork() can return a misleading “fork: cannot allocate memory” error, tracing the issue to PID allocation failures in the kernel’s do_fork and alloc_pid functions, and shows how excessive threads, not actual memory shortage, trigger the problem.
ENOMEMLinuxPiD
0 likes · 12 min read

The article explains why Linux reports "fork: cannot allocate memory" when the real issue is PID allocation failure caused by excessive threads, analyzes the kernel's do_fork and alloc_pid implementations, and shows that newer kernels still return ENOMEM for non‑memory errors.
ENOMEMLinuxfork
0 likes · 13 min read

This article dissects the Linux kernel’s fork implementation, explaining why the child receives a return value of 0, how parent and child share code execution, the internal steps of sys_fork, kernel_clone, copy_process, thread handling, scheduling initialization, and the final insertion of the new task into the run‑queue.
LinuxSchedulingfork
0 likes · 10 min read

This article explains how a Windows PE executable is launched, detailing the creation of the process and main thread, the role of the OEP, and how the runtime startup functions like _tmainCRTStartup ultimately invoke the user-defined main/wmain function.
C++CRT startupPE
0 likes · 7 min read
