Tagged articles
16 articles
Page 1 of 1
Deepin Linux
Deepin Linux
Mar 29, 2025 · Fundamentals

Deep Dive into Linux task_struct: Core Data Structure for Process Management

This article provides a comprehensive overview of the Linux kernel's task_struct structure, detailing its key fields, process and thread identification, state definitions, memory and credential handling, kernel stack layout, and includes a practical kernel module example for iterating over all processes.

CSchedulingprocess management
0 likes · 41 min read
Deep Dive into Linux task_struct: Core Data Structure for Process Management
Linux Code Review Hub
Linux Code Review Hub
Feb 12, 2025 · Fundamentals

Stop Being a Linux Kernel Code Parrot: Embrace Reality‑First Understanding

The author, with over two decades of development experience, argues that many learners treat Linux kernel code as a rote exercise instead of mapping real‑world scheduling problems to code, and outlines essential questions about task_struct management, scheduling policies, CPU placement, fairness, and universal scheduler design.

CPU schedulingLinux kernelOperating Systems
0 likes · 5 min read
Stop Being a Linux Kernel Code Parrot: Embrace Reality‑First Understanding
Linux Kernel Journey
Linux Kernel Journey
Dec 25, 2024 · Fundamentals

Stop Being a Linux Kernel Code Parrot: Think Like a Scheduler Designer

The author, with over two decades of development experience, argues that learning the Linux kernel requires understanding real-world scheduling problems rather than merely copying kernel code, and outlines key questions about task_struct management, priority, preemption, CPU placement, fairness, and universal scheduler design.

CPU schedulingLinux kernelScheduler
0 likes · 4 min read
Stop Being a Linux Kernel Code Parrot: Think Like a Scheduler Designer
Deepin Linux
Deepin Linux
Dec 22, 2024 · Fundamentals

Deep Dive into Linux Kernel task_struct: Structure, Fields, and Usage

This article provides a comprehensive analysis of the Linux kernel's task_struct data structure, detailing its members such as task IDs, parent‑child relationships, state flags, credentials, scheduling information, signal handling, memory and file management, kernel stack layout, and its role in process creation via system calls like fork.

CKernelLinux
0 likes · 22 min read
Deep Dive into Linux Kernel task_struct: Structure, Fields, and Usage
Liangxu Linux
Liangxu Linux
Dec 7, 2024 · Fundamentals

Understanding Linux Processes: From Program to Process Control Block

An in‑depth guide explains what a program and a process are, details the Linux task_struct fields, describes process states, creation functions like fork, vfork, clone, kthread_create, the do_fork core, copy‑on‑write, termination methods, and the roles of zombie, orphan, and init processes.

Linuxforkos
0 likes · 20 min read
Understanding Linux Processes: From Program to Process Control Block
Linux Kernel Journey
Linux Kernel Journey
Sep 25, 2024 · Fundamentals

Process Management & Scheduling (Part 0): Essential Kernel Structures

This article introduces the core Linux kernel data structures involved in process management and scheduling—task_struct, sched_entity, rq, and sched_avg—explaining their key fields, relationships, and how they enable the kernel to track process state, timing, memory, and load‑balancing decisions.

Linuxkernel structuresprocess scheduling
0 likes · 15 min read
Process Management & Scheduling (Part 0): Essential Kernel Structures
Refining Core Development Skills
Refining Core Development Skills
Oct 12, 2022 · Fundamentals

Deep Comparison of Linux Processes and Threads from the Kernel Implementation Perspective

This article explains how Linux implements processes and threads, showing that both are represented by the same task_struct structure, detailing thread creation via pthread_create and clone, and comparing the kernel‑level steps—including flag handling, copy_process, and resource sharing—that differentiate threads from full processes.

LinuxThreadclone
0 likes · 17 min read
Deep Comparison of Linux Processes and Threads from the Kernel Implementation Perspective
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Feb 25, 2022 · Fundamentals

Inside Linux’s fork: How the Kernel Creates a New Process

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
Inside Linux’s fork: How the Kernel Creates a New Process
Liangxu Linux
Liangxu Linux
Jun 16, 2021 · Fundamentals

Understanding Linux Scheduler: Structures, Policies, and Context Switch Mechanics

Learn how Linux selects the next process for CPU execution by exploring key scheduler structures such as task_struct, sched_class, runqueue, the various scheduling policies (CFS, RT, Deadline, etc.), the scheduling flow, and the low‑level context_switch mechanism that swaps address spaces and registers.

CFSLinuxcontext switch
0 likes · 8 min read
Understanding Linux Scheduler: Structures, Policies, and Context Switch Mechanics
ITPUB
ITPUB
Oct 25, 2016 · Fundamentals

How Linux Implements Signals Across Threads and Thread Groups

This article explains the POSIX requirements for signals in multithreaded Linux programs, details the kernel structures such as task_struct and signal_struct that enable shared signal handling, and walks through the key code paths—including copy_signal, copy_sighand, __send_signal, tkill/tgkill, and group exit—that manage signal delivery and thread‑group termination.

LinuxPOSIXThreads
0 likes · 12 min read
How Linux Implements Signals Across Threads and Thread Groups
ITPUB
ITPUB
Jul 8, 2016 · Fundamentals

How Linux Threads Share Signals: Inside task_struct and Signal Handling

This article explains how Linux implements POSIX signal handling in multithreaded applications, detailing the relationship between signals and threads, the kernel structures like task_struct, signal_struct, and how signals are delivered, blocked, and cause group exits within a thread group.

LinuxPOSIXThreads
0 likes · 15 min read
How Linux Threads Share Signals: Inside task_struct and Signal Handling