Tagged articles
4 articles
Page 1 of 1
Liangxu Linux
Liangxu Linux
Jul 6, 2021 · Fundamentals

How Linux Implements CPU Affinity: From sched_setaffinity to Task Migration

This article explains why binding a process to a specific CPU improves cache performance, shows how to set CPU affinity on Linux using the sched_setaffinity system call, and walks through the kernel's internal implementation—including run‑queue structures, migrate_task, and __migrate_task—illustrated with code and diagrams.

CPU affinityLinuxkernel migration
0 likes · 9 min read
How Linux Implements CPU Affinity: From sched_setaffinity to Task Migration
Efficient Ops
Efficient Ops
Feb 28, 2019 · Operations

What Is Linux loadavg? Understanding Run Queues and Kernel Calculation

This article explains the Linux load average metric, the run queue structure, why both running (R) and uninterruptible (D) processes are counted, and how the kernel uses an exponential weighted moving average to compute the 1‑, 5‑, and 15‑minute load values.

LinuxLoad Averagekernel
0 likes · 8 min read
What Is Linux loadavg? Understanding Run Queues and Kernel Calculation
MaGe Linux Operations
MaGe Linux Operations
Oct 13, 2015 · Fundamentals

Linux CPU Scheduling Explained: Context Switches, Run Queues & Monitoring

This article outlines how the Linux CPU scheduler manages threads and interrupts, explains context switches, run queue length, CPU utilization metrics, typical performance thresholds, and introduces monitoring tools like vmstat and mpstat, followed by real‑world troubleshooting examples.

CPU schedulingLinux performanceMonitoring Tools
0 likes · 6 min read
Linux CPU Scheduling Explained: Context Switches, Run Queues & Monitoring