0Pricing
CUDA Academy · درس

ترحيل الصفحات عند الطلب

تنقل أخطاء الصفحات البيانات إلى مكان استخدامها.

ترحيل الصفحات عند الطلب درس مجاني في CUDA Academy على CoddyKit. هذا هو الدرس 2 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في CUDA Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة CUDA Academy 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

Where Does the Data Live?

With managed memory the data has no fixed home. It quietly moves between CPU and GPU through on-demand page migration, following wherever you use it.

Memory Comes in Pages

The system tracks memory in fixed chunks called pages, often 4 KB or 64 KB. Migration happens one page at a time, not byte by byte.

A Page Fault Triggers It

When the GPU touches a page that lives on the CPU, it raises a page fault. The driver pauses, copies that page over, then lets the thread continue.

Data Follows the Access

The rule is simple: data migrates to whoever uses it. Write on the CPU and pages live there; read in a kernel and they move to the GPU.

First Touch Is the Slow One

The cost shows up on the first access from a new side. After the page arrives, later reads on that same device are fast and local.

Ping-Pong Hurts

If the CPU and GPU keep touching the same pages in turns, they bounce back and forth. This ping-pong migration can quietly wreck your throughput.

Faults Add Up

Each fault carries setup overhead, so thousands of tiny faults are costly. Migrating in bulk beats faulting one scattered page after another.

Locality Still Matters

Even with automatic migration, good access patterns win. Threads reading nearby addresses pull in whole pages efficiently instead of scattering faults.

Oversubscription Is Allowed

Migration lets you allocate more than the GPU holds. Pages flow in as needed and old ones evict, so huge datasets still run, just slower.

You Can See the Faults

Profilers like Nsight Systems show migration traffic and fault counts. Spotting heavy migration tells you exactly where to add hints next.

Convenience With a Catch

On-demand migration is wonderfully automatic, but the faults are not free. Knowing the cost is what lets you fix it with prefetch and advice.

Quick Check

Let us make sure you know what kicks off a migration.

Recap: On-Demand Migration

You saw that managed pages migrate on a fault to whoever uses them. First touch is slow, ping-pong hurts, and bulk movement wins. Onward! 🚀

الأسئلة الشائعة

هل درس «ترحيل الصفحات عند الطلب» مجاني؟

نعم — نص درس «ترحيل الصفحات عند الطلب» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة CUDA Academy، انتقل إلى CoddyKit PRO. تتضمن دورة CUDA Academy 4 دروس في المجموع.

ماذا ستتعلم في «ترحيل الصفحات عند الطلب»؟

تنقل أخطاء الصفحات البيانات إلى مكان استخدامها. تتمرن على CUDA Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ CUDA Academy؟

لا تُشترط خبرة سابقة. CUDA Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 2 من أصل 4.

كم من الوقت يستغرق درس «ترحيل الصفحات عند الطلب»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس CUDA Academy هذا؟

نعم. كل درس في CUDA Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. مؤشر واحد على الجانبين
  2. ترحيل الصفحات عند الطلب
  3. الجلب المسبق باستخدام cudaMemPrefetchAsync
  4. التلميحات عبر cudaMemAdvise
← العودة إلى CUDA Academy