CPU/GPU Core & Memory Mapping · 1 · 3 Lessons
English

CPU/GPU Core & Memory Mapping

Module 1 – CPU/GPU Core & Memory Mapping · 1

Page 3 of 3 · About 15 minutes per lesson, including practice.

Affinity and migration

15-minute session: read for 3 minutes, trace for 3, experiment for 7, and complete the check for 2. Spend longer whenever you need.

CPU affinity restricts which logical CPUs a thread may run on. It can reduce migration or accidentally create contention. Pinning does not reserve a core from other workloads. Compare unpinned and pinned runs only on a machine where topology and policy are known. Record affinity, competing load, frequency behavior, and sample count. Do not change a production server’s scheduling policy for a lesson.

Practice and evidence: Predict the example or draw its state transitions. Change one assumption, test the boundary, and record the actual result. Explain what this small model does not establish about a production system.

import os
print(sorted(os.sched_getaffinity(0)))

Practice and evidence

Keep three notes: your prediction, the actual result, and why they match or differ. The completion check grades understanding; the practice task builds skill.

Language reference: git.agilaos.com

Language reference: docs.nvidia.com

Example code on Agila Forge ↗

Complete this lesson

Answer every check correctly to earn your lesson certificate. Feedback helps you review and try again.

Sign in · Save your progress and earn a certificate for this lesson.