COE 558Lecture 01المحاضرة 01Part 06الجزء 06
Why layering: the continuum ideaلماذا الطبقات: فكرة السلسلة المتصلة (continuum)
What a continuum is, and how networks and the memory hierarchy already use layers to trade distance and speed.ما معنى السلسلة المتصلة (continuum)، وكيف تستخدم الشبكات وتسلسل الذاكرة الهرمي الطبقات أصلًا للموازنة بين المسافة والسرعة.
- Conceptsالمفاهيم
- 4
- Slidesالشرائح
- 46-50
- Readingمدة القراءة
- 24 min24 دقيقة
Why this part mattersلماذا يهمّ هذا الجزء
Every design decision in COE 558 is a placement decision. Does this task run on the device, at the edge, on a fog node or in the cloud? Before the physics of latency (Part 07) and the named tiers (Part 08), you need the pattern underneath all of them.
Computing has already solved this problem twice. Networks split a long path into segments, each built for its own span. Processors stack registers, caches and RAM so that urgent data sits close to the CPU. Edge computing applies the same trade, nearness against capacity, to the whole Internet. For your research project, this analogy is the cleanest way to justify putting a component at the edge.
كل قرار تصميمي في مقرر COE 558 هو في جوهره قرار تحديد مكان: هل تعمل هذه المهمة على الجهاز نفسه، أم على الـ edge، أم على عقدة fog، أم في الـ cloud؟ قبل أن ندخل في فيزياء الـ latency (الجزء 07) والمستويات المسمّاة (الجزء 08)، تحتاج أن تفهم النمط الذي تقوم عليه كلها.
لقد حلّت الحوسبة هذه المشكلة مرتين من قبل. الشبكات تقسّم المسار الطويل إلى مقاطع، كل مقطع مبنيّ ليناسب امتداده الخاص. والمعالجات ترتّب الـ registers والـ caches والـ RAM فوق بعضها بحيث تبقى البيانات العاجلة قريبة من الـ CPU. والـ edge computing يطبّق المقايضة نفسها، القرب مقابل السعة، على الإنترنت كلها. وفي مشروعك البحثي، هذا التشبيه هو أوضح طريقة لتبرير وضع أحد المكوّنات على الـ edge.
By the end you canفي نهاية هذا الجزء ستستطيع
- Explain why the space between client and server is a continuum of candidate locations, and why edge and cloud are regions of one range rather than separate worlds.أن تشرح لماذا تُعدّ المسافة بين العميل والخادم سلسلة متصلة من المواقع المرشّحة، ولماذا يُعدّ الـ edge والـ cloud منطقتين من نطاق واحد لا عالمين منفصلين.
- Explain why a user-to-printer path is split into LAN switching and WAN routing tiers, and never confuse tier positions with protocol stack layers.أن تشرح لماذا يُقسَّم المسار من المستخدم إلى الطابعة إلى مستويات تبديل LAN switching ومستويات توجيه WAN routing، وألّا تخلط أبدًا بين مواقع المستويات على المسار وطبقات حزمة البروتوكولات.
- Explain the memory hierarchy as a placement policy driven by urgency and locality, and say why a small fast layer is enough.أن تشرح هرمية الذاكرة memory hierarchy بوصفها سياسة لتحديد مكان البيانات تقودها درجة الإلحاح ومبدأ المحلية locality، وأن تقول لماذا تكفي طبقة صغيرة وسريعة.
- Use T = S/B + L with measured bandwidth and latency to say when latency dominates, and justify the analogy that CPU cache is to RAM as edge is to cloud.أن تستخدم المعادلة T = S/B + L مع قيم bandwidth و latency المقاسة لتحدد متى يكون الـ latency هو العامل الحاسم، وأن تبرّر التشبيه: الـ CPU cache بالنسبة إلى الـ RAM مثل الـ edge بالنسبة إلى الـ cloud.
Part 05 ended with a simple picture: a web app is a Client talking to a Server. The natural next question is where that server should actually sit, and the answer turns out to be "not in one place, but anywhere along a range".
انتهى الجزء 05 بصورة بسيطة: تطبيق الويب هو client يتحدث مع server. والسؤال الطبيعي التالي هو: أين يجب أن يقع هذا الخادم فعلًا؟ ويتبيّن أن الجواب هو "ليس في مكان واحد، بل في أي نقطة على امتداد نطاق كامل".
The path is not an empty wireالمسار ليس مجرد سلك فارغ
Picture a student in Dhahran opening a web app whose only server is in a data center on another continent. Every click travels the full distance out as a request and the full distance back as a response. Now add three stops along the way: one in the campus building, one in the city, one in the region. Each stop is closer to the client than the far server is, so any work that can run at a nearer stop comes back sooner.
تخيّل طالبًا في الظهران يفتح تطبيق ويب خادمه الوحيد موجود في مركز بيانات في قارة أخرى. كل نقرة تقطع المسافة كاملة ذهابًا على شكل طلب request، وتقطعها كاملة عودةً على شكل استجابة response. أضف الآن ثلاث محطات على الطريق: واحدة في مبنى الجامعة، وواحدة في المدينة، وواحدة في المنطقة. كل محطة أقرب إلى العميل من الخادم البعيد، لذلك أي عمل يمكن تنفيذه في محطة أقرب ستعود نتيجته أسرع.
Seen this way, the space between client and server is a range of places where compute and storage can live. Latency grows as you move away from the client, and so does capacity, because far sites are larger. Placing layers along that range lets each request be answered by the nearest layer that is powerful enough to handle it.
بهذه النظرة، تصبح المسافة بين العميل والخادم نطاقًا من الأماكن التي يمكن أن توجد فيها قدرات الحوسبة والتخزين. يزداد الـ latency كلما ابتعدت عن العميل، وتزداد السعة أيضًا لأن المواقع البعيدة أكبر حجمًا. ووضع layers (طبقات) على امتداد هذا النطاق يسمح بأن يُجاب كل طلب من أقرب طبقة تملك القدرة الكافية للتعامل معه.
Starts every request
Nearest, smallest
Farther, larger
Farther still
Largest capacity
This is not an invented teaching device. NIST describes fog computing as a layered model for accessing a shared continuum of computing resources, with nodes organized by their latency and distance to the end devices, and with different layers providing different services while working together as a continuum (NIST SP 500-325).
هذه ليست أداة تعليمية مخترعة. فالمعهد NIST يصف الـ fog computing بأنه نموذج طبقي للوصول إلى سلسلة متصلة مشتركة من موارد الحوسبة، تُنظَّم فيها العقد بحسب الـ latency والمسافة بينها وبين الأجهزة الطرفية، وتقدّم فيها الطبقات المختلفة خدمات مختلفة بينما تعمل معًا كسلسلة متصلة (NIST SP 500-325).
What makes a range a continuumما الذي يجعل النطاق سلسلة متصلة
The word Continuum is doing real work here, so pin it down with the clearest example there is: visible light. Walk along the spectrum from 400 nm to 700 nm. Move one nanometer and the color does not visibly change. There is no single nanometer where blue stops and green starts. Yet 400 nm (violet) and 700 nm (red) are obviously different colors. That is the whole definition in one picture: neighboring points barely differ, while the two ends differ a lot. The Britannica Dictionary and Wiktionary put it the same way: a continuous series where no part is noticeably different from its neighbors, although the ends are very different from each other.
كلمة continuum (السلسلة المتصلة) تؤدي هنا دورًا حقيقيًا، فلنحدد معناها بأوضح مثال ممكن: الضوء المرئي. امشِ على الطيف من 400 nm إلى 700 nm. إذا تحركت نانومترًا واحدًا فلن يتغيّر اللون تغيّرًا مرئيًا. ولا يوجد نانومتر واحد بعينه ينتهي عنده الأزرق ويبدأ الأخضر. ومع ذلك فإن 400 nm (البنفسجي) و700 nm (الأحمر) لونان مختلفان بوضوح. هذا هو التعريف كله في صورة واحدة: النقاط المتجاورة تكاد لا تختلف، بينما يختلف الطرفان اختلافًا كبيرًا. ويصوغه قاموس Britannica وموقع Wiktionary بالطريقة نفسها: سلسلة متصلة لا يختلف فيها أي جزء اختلافًا ملحوظًا عن جيرانه، مع أن الطرفين مختلفان جدًا أحدهما عن الآخر.
The familiar names on the wider electromagnetic spectrum (gamma, X-ray, UV, infrared, microwaves, radio) are labels people put on that smooth range because labels are useful. They are not walls that nature built.
الأسماء المألوفة على الطيف الكهرومغناطيسي الأوسع (gamma، وX-ray، وUV، وinfrared، والموجات الدقيقة microwaves، وradio) هي تسميات وضعها الناس على هذا النطاق الناعم لأن التسميات مفيدة. إنها ليست جدرانًا بنتها الطبيعة.
Now map it back to computing. In the Edge-to-cloud (E2C) continuum, the two endpoints are "computing on the device itself" and "computing in a hyperscale cloud region". Everything between them is a candidate location for the layers above. The names you will meet in Part 08, Mist, Edge, Fog and Cloud, work exactly like UV and infrared: convenient labels on one range, where latency to the client and available capacity both grow as you move away from the device.
لنُعِد هذا الآن إلى الحوسبة. في edge-to-cloud continuum، يكون الطرفان هما "الحوسبة على الجهاز نفسه" و"الحوسبة في منطقة cloud ضخمة من نوع hyperscale". وكل ما بينهما موقع مرشّح للطبقات التي تحدثنا عنها. والأسماء التي ستقابلها في الجزء 08، وهي mist وedge وfog وcloud، تعمل تمامًا مثل UV وinfrared: تسميات مريحة على نطاق واحد، يزداد فيه كلٌّ من الـ latency إلى العميل والسعة المتاحة كلما ابتعدت عن الجهاز.
Recall
As you move from the client toward a distant server, what grows, and why would you add layers in between?كلما تحركت من العميل نحو خادم بعيد، ما الذي يزداد، ولماذا تضيف طبقات بينهما؟
Recall
In your own words, what makes something a continuum rather than a set of separate categories?بكلماتك الخاصة، ما الذي يجعل شيئًا ما سلسلة متصلة لا مجموعة من الفئات المنفصلة؟
Quick checkاختبار سريع
What best describes a continuum, as used for the edge-to-cloud continuum?ما الوصف الأدق للسلسلة المتصلة continuum، بالمعنى المستخدم في الـ edge-to-cloud continuum؟
Layering along a distance is not new. The network you use every day already splits one long path into segments, each built with the technology that suits its span.
ترتيب الطبقات على امتداد مسافة ليس أمرًا جديدًا. فالشبكة التي تستخدمها كل يوم تقسّم أصلًا المسار الطويل الواحد إلى مقاطع، كل مقطع مبنيّ بالتقنية التي تناسب امتداده.
Make it concrete. A student sits in a KFUPM lab and sends a print job to a partner office in Riyadh. The first hop is the lab's Ethernet switch. The middle of the journey crosses routers in a wide area network. The last hop is the office's own switch, which delivers the job to the printer. Three segments, three tiers along the distance.
لنجعل الأمر ملموسًا. طالب يجلس في معمل في KFUPM ويرسل مهمة طباعة إلى مكتب شريك في الرياض. القفزة الأولى هي الـ Ethernet switch الخاص بالمعمل. ومنتصف الرحلة يعبر أجهزة routers في شبكة واسعة WAN. والقفزة الأخيرة هي الـ switch الخاص بالمكتب، الذي يوصل المهمة إلى الطابعة. ثلاثة مقاطع، أي ثلاثة مستويات tiers على امتداد المسافة.
Why one technology cannot run end to endلماذا لا تستطيع تقنية واحدة أن تغطي المسار من أوله إلى آخره
A switch works at the Data link layer and forwards frames by MAC address. It fills its forwarding table by flooding and learning, which is cheap and automatic inside one building but does not scale to the whole world: flooding every unknown frame to every port of every network on Earth would be absurd. A router works at the Network layer and forwards by IP address, using tables computed by routing algorithms over hierarchical address blocks, which is exactly what scales across many networks (Kurose and Ross, Chapter 6). Each technology is excellent inside its own range and poor outside it, so the path is built from pieces that each fit a stretch of it.
يعمل الـ switch في data link layer ويمرّر الإطارات frames بحسب MAC address. وهو يملأ جدول التمرير الخاص به عن طريق الإغراق flooding والتعلّم learning، وهذا رخيص وتلقائي داخل مبنى واحد لكنه لا يتوسّع ليشمل العالم كله: فإغراق كل إطار مجهول الوجهة إلى كل منفذ في كل شبكة على الأرض أمر عبثي. أما الـ router فيعمل في network layer ويمرّر بحسب IP address، مستخدمًا جداول تحسبها خوارزميات التوجيه على كتل عناوين هرمية، وهذا بالضبط ما يتوسّع عبر شبكات كثيرة (Kurose وRoss، الفصل 6). كل تقنية ممتازة داخل نطاقها وضعيفة خارجه، لذلك يُبنى المسار من قطع تناسب كل واحدة منها جزءًا منه.
| Segmentالمقطع | Spanالامتداد | Deviceالجهاز | Addresses usedالعناوين المستخدمة | Stack layerطبقة الحزمة |
|---|---|---|---|---|
| LAN 1 (tier 1)LAN 1 (tier 1) | One building or campusمبنى واحد أو حرم جامعي | SwitchSwitch | MACMAC | Linkالربط (Link) |
| WAN (tier 2)WAN (tier 2) | Between citiesبين المدن | RouterRouter | IPIP | Networkالشبكة (Network) |
| LAN 2 (tier 3)LAN 2 (tier 3) | One building or officeمبنى واحد أو مكتب | SwitchSwitch | MACMAC | Linkالربط (Link) |
This is the networking Continuum: distance grows along the path, and connectivity is assembled from tiers that each serve one stretch. Keep the shape in mind, because the edge-to-cloud continuum does the same with compute instead of connectivity, and the memory hierarchy, next, does it with time instead of distance.
هذه هي الـ continuum في الشبكات: المسافة تزداد على امتداد المسار، والاتصال يُركَّب من مستويات يخدم كل منها جزءًا واحدًا. احتفظ بهذا الشكل في ذهنك، لأن الـ edge-to-cloud continuum يفعل الشيء نفسه بقدرة الحوسبة بدلًا من الاتصال، وهرمية الذاكرة، وهي موضوعنا التالي، تفعله بالزمن بدلًا من المسافة.
Recall
In the user-to-printer example, which device handles each segment, and why doesn't one technology run end to end?في مثال المستخدم والطابعة، أي جهاز يتولى كل مقطع، ولماذا لا تغطي تقنية واحدة المسار كله؟
Quick checkاختبار سريع
In the user-to-printer path, which standard stack layer does the first LAN's switching operate at?في المسار من المستخدم إلى الطابعة، في أي طبقة من طبقات الحزمة القياسية يعمل التبديل switching في شبكة الـ LAN الأولى؟
The second place layering already exists is inside every computer. Here the axis is not kilometers but time: how long it takes the CPU to reach a piece of data.
المكان الثاني الذي توجد فيه الطبقات أصلًا هو داخل كل حاسوب. وهنا لا يكون المحور هو الكيلومترات بل الزمن: كم يستغرق الـ CPU ليصل إلى قطعة من البيانات.
Imagine a loop that sums a large array. The running total is touched on every instruction, so it lives in a register, right inside the processor. The chunk of the array being read right now is touched thousands of times a second, so it lives in cache. The rest of the dataset sits in RAM, and the file it came from sits on disk. Each step outward is slower to reach, but holds more.
تخيّل حلقة loop تجمع عناصر مصفوفة كبيرة. المجموع الجاري يُستخدم في كل تعليمة، لذلك يعيش في register داخل المعالج نفسه. والجزء من المصفوفة الذي يُقرأ الآن يُستخدم آلاف المرات في الثانية، لذلك يعيش في الـ cache. وبقية البيانات موجودة في الـ RAM، والملف الذي جاءت منه موجود على القرص disk. كل خطوة إلى الخارج أبطأ في الوصول إليها، لكنها تتسع لأكثر.
This arrangement is the Memory hierarchy, a Continuum of access times. The rule is simple: the more urgently and frequently data is needed, the closer to the CPU it lives. Hennessy and Patterson describe the same picture: as you move away from the processor, each level is slower and larger, with times ranging from picoseconds up to milliseconds for magnetic disks. Notice the match with the network path: near tiers are small and fast, far tiers are large and slow.
هذا الترتيب هو memory hierarchy (هرمية الذاكرة)، وهو continuum من أزمنة الوصول. والقاعدة بسيطة: كلما كانت البيانات مطلوبة بإلحاح وتكرار أكبر، عاشت أقرب إلى الـ CPU. ويصف Hennessy وPatterson الصورة نفسها: كلما ابتعدت عن المعالج، يصبح كل level (مستوى) أبطأ وأكبر، وتمتد الأزمنة من picoseconds إلى milliseconds في الأقراص المغناطيسية. لاحظ التطابق مع مسار الشبكة: المستويات القريبة صغيرة وسريعة، والمستويات البعيدة كبيرة وبطيئة.
Why a small fast layer is enoughلماذا تكفي طبقة صغيرة وسريعة
If fast memory holds only a tiny fraction of the data, why does it help at all? Because of locality. Programs tend to reuse data they touched recently (temporal locality) and data stored near it (spatial locality). So a small, fast layer that keeps those items can answer most requests. Denning notes that this one principle shapes processor caches, disk caches, storage hierarchies and edge caches for the Web. That last item is the bridge to this course: an edge site works for the same reason a CPU cache does.
إذا كانت الذاكرة السريعة لا تحمل إلا جزءًا ضئيلًا من البيانات، فلماذا تفيد أصلًا؟ بسبب مبدأ المحلية locality. البرامج تميل إلى إعادة استخدام البيانات التي لمستها مؤخرًا (المحلية الزمنية temporal locality) والبيانات المخزّنة بالقرب منها (المحلية المكانية spatial locality). لذلك تستطيع طبقة صغيرة وسريعة تحتفظ بهذه العناصر أن تجيب عن معظم الطلبات. ويشير Denning إلى أن هذا المبدأ الواحد يشكّل الـ caches في المعالجات، والـ caches للأقراص، وهرميات التخزين، والـ edge caches للويب. والعنصر الأخير هو الجسر إلى هذا المقرر: موقع الـ edge ينجح للسبب نفسه الذي ينجح به الـ CPU cache.
Recall
What decides which level of the memory hierarchy a piece of data lives in, and why can a small cache serve most reads?ما الذي يحدد المستوى الذي تعيش فيه قطعة من البيانات في هرمية الذاكرة، ولماذا يستطيع cache صغير أن يخدم معظم عمليات القراءة؟
Quick checkاختبار سريع
Why can a small CPU cache serve most of the memory reads a program makes?لماذا يستطيع CPU cache صغير أن يخدم معظم عمليات قراءة الذاكرة التي يقوم بها البرنامج؟
A ranking tells you the order of the levels; measurements tell you how much each step costs. To measure a level you need two quantities: bandwidth (how much data per second it can move) and latency (the fixed access delay paid on every fetch). Storage is simply the size of each level.
الترتيب يخبرك بتسلسل المستويات؛ أما القياسات فتخبرك بكلفة كل خطوة. ولقياس أي مستوى تحتاج إلى كميتين: الـ bandwidth (كمية البيانات التي يستطيع نقلها في الثانية) والـ latency (تأخير الوصول الثابت الذي يُدفع في كل عملية جلب). أما التخزين storage فهو ببساطة حجم كل مستوى.
Start with a video editing workstation. The frame on screen right now sits in cache or registers, because it is touched constantly. Today's raw clips are pulled from the SSD into RAM so they can be processed quickly. Last year's projects stay on slow archive storage and are fetched only when you open them. That is the Memory hierarchy used as a placement policy, and the question is how big the gaps between levels really are.
ابدأ بمحطة عمل لتحرير الفيديو. الإطار الظاهر على الشاشة الآن موجود في الـ cache أو الـ registers، لأنه يُستخدم باستمرار. ومقاطع اليوم الخام تُسحب من الـ SSD إلى الـ RAM لكي تُعالج بسرعة. ومشاريع العام الماضي تبقى على تخزين أرشيفي بطيء ولا تُجلب إلا عندما تفتحها. هذه هي memory hierarchy مستخدمة كسياسة لتحديد مكان البيانات، والسؤال هو: ما حجم الفجوات بين المستويات فعلًا؟
The measured hierarchyالهرمية المقاسة
The Cornell Virtual Workshop publishes figures measured on Intel Skylake server processors. Reading outward, bandwidth is roughly cut in half at each level while latency roughly quadruples. The real steps vary, so read this as a rule of thumb.
ينشر Cornell Virtual Workshop أرقامًا مقاسة على معالجات خوادم Intel Skylake. وإذا قرأتها من الداخل إلى الخارج، فإن الـ bandwidth ينخفض تقريبًا إلى النصف في كل مستوى، بينما يتضاعف الـ latency تقريبًا أربع مرات. والخطوات الحقيقية تتفاوت، لذلك اقرأ هذا على أنه قاعدة تقريبية.
| Levelالمستوى | Size per socketالحجم لكل مقبس socket | Read bandwidthread bandwidth | Latencyالـ latency |
|---|---|---|---|
| L1 cacheL1 cache | 768 KB768 KB | ~84 GB/s~84 GB/s | 2 ns2 ns |
| L2 cacheL2 cache | 24 MB24 MB | ~60 GB/s~60 GB/s | 7 ns7 ns |
| L3 cache (shared by cores)L3 cache (مشترك بين الأنوية) | 33 MB33 MB | ~30 GB/s~30 GB/s | 26 ns26 ns |
| Main memoryالذاكرة الرئيسية | 96 GB96 GB | ~10 GB/s~10 GB/s | 90 ns90 ns |
The bandwidth figures come from a Sandia National Laboratories evaluation of Skylake (Hammond, Vaughan and Hughes, 2018), and the latencies were measured on a closely related Xeon model. Latency is also quoted in clock cycles, such as "4 cyc." and "14 cyc.". 2 ns in 4 cycles implies about 0.5 ns per cycle, a clock of roughly 2 GHz (our own arithmetic, not a published figure).
أرقام الـ bandwidth مأخوذة من تقييم أجرته Sandia National Laboratories لمعالج Skylake (Hammond وVaughan وHughes، 2018)، أما أرقام الـ latency فقد قيست على طراز Xeon قريب جدًا منه. ويُذكر الـ latency أيضًا بعدد دورات الساعة، مثل "4 cyc." و"14 cyc.". فإذا كانت 2 ns تساوي 4 دورات، فهذا يعني نحو 0.5 ns لكل دورة، أي تردد ساعة يقارب 2 GHz (هذا حسابنا الخاص، وليس رقمًا منشورًا).
Turning two resources into one timeتحويل موردين إلى زمن واحد
Bandwidth and latency only become useful for decisions once you combine them into the time a fetch actually takes. Cornell gives a simple model for any level:
لا يصبح الـ bandwidth والـ latency مفيدين لاتخاذ القرارات إلا عندما تجمعهما في الزمن الذي تستغرقه عملية الجلب فعلًا. ويقدّم Cornell نموذجًا بسيطًا لأي مستوى:
Here T is time, S is the size of the data, B is bandwidth and L is latency. For a tiny fetch, S/B is close to zero, so latency decides everything. For a huge transfer, the S/B term dominates and bandwidth decides.
هنا T هو الزمن، وS هو حجم البيانات، وB هو الـ bandwidth، وL هو الـ latency. في عملية جلب صغيرة جدًا يكون S/B قريبًا من الصفر، فيحسم الـ latency كل شيء. وفي نقل ضخم يهيمن الحد S/B، فيكون الـ bandwidth هو الحاسم.
Worked exampleمثال محلول
Fetching from L1 cache vs main memoryالجلب من L1 cache مقارنةً بالذاكرة الرئيسية
A 16 KB fetch from L1جلب 16 KB من L1
Treat 16 KB as 1.6 × 10⁻⁵ GB. S/B = 1.6 × 10⁻⁵ / 84 s ≈ 190 ns, plus 2 ns latency, so about 192 ns. Latency is about 1 percent.اعتبر 16 KB تساوي 1.6 × 10⁻⁵ GB. إذن S/B = 1.6 × 10⁻⁵ / 84 s ≈ 190 ns، يُضاف إليها 2 ns من الـ latency، فيكون المجموع نحو 192 ns. أي أن الـ latency يمثّل نحو 1 بالمئة فقط.The same 16 KB from main memoryالـ 16 KB نفسها من الذاكرة الرئيسية
S/B = 1.6 × 10⁻⁵ / 10 s = 1.6 µs, plus 90 ns, so about 1.69 µs. Bandwidth sets the cost.S/B = 1.6 × 10⁻⁵ / 10 s = 1.6 µs، يُضاف إليها 90 ns، فيكون المجموع نحو 1.69 µs. هنا الـ bandwidth هو الذي يحدد الكلفة.A 64-byte fetchجلب 64 بايت
64 bytes ≈ 6.4 × 10⁻⁸ GB. From L1: S/B ≈ 0.76 ns against 2 ns latency. From main memory: S/B = 6.4 ns against 90 ns latency. Now latency is most of the time.64 bytes ≈ 6.4 × 10⁻⁸ GB. من L1: S/B ≈ 0.76 ns مقابل 2 ns من الـ latency. ومن الذاكرة الرئيسية: S/B = 6.4 ns مقابل 90 ns من الـ latency. الآن أصبح الـ latency يشكّل معظم الزمن.Resultالنتيجة
Small fetches are latency-bound; large ones are bandwidth-bound. (Our arithmetic from the Cornell figures.)عمليات الجلب الصغيرة يحكمها الـ latency (latency-bound)؛ والكبيرة يحكمها الـ bandwidth (bandwidth-bound). (هذا حسابنا انطلاقًا من أرقام Cornell.)
The analogy the course is built onالتشبيه الذي بُني عليه المقرر
Now every piece is in place. CPU cache is to RAM as Edge is to Cloud. Both put a small, fast, nearby tier in front of a large, slower, distant one. Both answer most requests from the near tier because of locality, and both fall back to the far tier on a miss. Interactive requests are small, so by T = S/B + L they are latency-bound and benefit most from a nearer tier. Bulk analytics is not interactive, so a few extra milliseconds of latency cost it little, and it needs far more compute than an edge site has. That is why Offloading it to the cloud, where capacity is, makes sense, as long as the data can be moved there or already lives there.
الآن اكتملت كل القطع. الـ CPU cache بالنسبة إلى الـ RAM مثل edge بالنسبة إلى cloud. كلاهما يضع مستوى صغيرًا وسريعًا وقريبًا أمام مستوى كبير وأبطأ وبعيد. وكلاهما يجيب عن معظم الطلبات من المستوى القريب بفضل الـ locality، ويرجع كلاهما إلى المستوى البعيد عند حدوث إخفاق miss. الطلبات التفاعلية صغيرة، لذلك وفقًا لـ T = S/B + L يحكمها الـ latency وتستفيد أكثر من غيرها من مستوى أقرب. أما التحليلات الضخمة bulk analytics فليست تفاعلية، لذلك لا تكلّفها بضع milliseconds إضافية من الـ latency إلا القليل، وهي تحتاج قدرة حوسبة أكبر بكثير مما يملكه موقع edge. ولهذا يكون offloading لها إلى الـ cloud، حيث توجد السعة، أمرًا منطقيًا، بشرط أن يمكن نقل البيانات إلى هناك أو أن تكون موجودة هناك أصلًا.
Recall
From the Cornell Skylake measurements, how do bandwidth and latency change from L1 out to main memory, and what are the end values?من قياسات Cornell على Skylake، كيف يتغيّر الـ bandwidth والـ latency من L1 إلى الذاكرة الرئيسية، وما القيم عند الطرفين؟
Recall
Using T = S/B + L, why does latency matter more than bandwidth for a small interactive request?باستخدام T = S/B + L، لماذا يهمّ الـ latency أكثر من الـ bandwidth في طلب تفاعلي صغير؟
Recall
Complete and justify: CPU cache is to RAM as ___ is to ___.أكمل وبرّر: الـ CPU cache بالنسبة إلى الـ RAM مثل ___ بالنسبة إلى ___.
Quick checkاختبار سريع
Per the Cornell Skylake data, what happens at each step outward from L1 cache toward main memory?بحسب بيانات Cornell على Skylake، ماذا يحدث في كل خطوة نحو الخارج من L1 cache باتجاه الذاكرة الرئيسية؟
Quick checkاختبار سريع
Using T = S/B + L, what dominates retrieval time for a tiny, interactive request?باستخدام T = S/B + L، ما الذي يهيمن على زمن الجلب في طلب تفاعلي صغير جدًا؟
Quick checkاختبار سريع
In the cache and edge analogy, what does a cache miss correspond to?في تشبيه الـ cache والـ edge، ما الذي يقابل حالة الإخفاق cache miss؟
Recapالخلاصة
If you remember nothing elseإن لم تتذكر شيئاً آخر فتذكّر هذا
- A continuum is a range whose neighbors barely differ but whose ends differ greatly. Device, mist, edge, fog and cloud are labels on one range.السلسلة المتصلة continuum نطاقٌ تكاد نقاطه المتجاورة لا تختلف، لكن طرفيه يختلفان كثيرًا. والـ device والـ mist والـ edge والـ fog والـ cloud تسميات على نطاق واحد.
- Layering places resources at points along the path, so each request is served by the nearest layer with enough capacity.ترتيب الطبقات layering يضع الموارد في نقاط على امتداد المسار، بحيث يُخدم كل طلب من أقرب طبقة تملك سعة كافية.
- Networks already do this: switches serve LANs by MAC address, routers serve the WAN by IP address. Tier positions 1, 2, 3 are not stack layers.الشبكات تفعل هذا أصلًا: الـ switches تخدم شبكات الـ LAN بحسب MAC address، والـ routers تخدم الـ WAN بحسب IP address. ومواقع المستويات 1 و2 و3 ليست طبقات في حزمة البروتوكولات.
- The memory hierarchy trades capacity for nearness, and locality lets a small fast layer serve most reads.هرمية الذاكرة memory hierarchy تقايض السعة بالقرب، ومبدأ الـ locality يسمح لطبقة صغيرة وسريعة بأن تخدم معظم عمليات القراءة.
- On Skylake: L1 about 84 GB/s and 2 ns, L2 60 GB/s and 7 ns, L3 30 GB/s and 26 ns, RAM 10 GB/s and 90 ns.على Skylake: الـ L1 نحو 84 GB/s و2 ns، والـ L2 نحو 60 GB/s و7 ns، والـ L3 نحو 30 GB/s و26 ns، والـ RAM نحو 10 GB/s و90 ns.
- Retrieval time is about S/B + L. Small interactive fetches are latency-bound, so nearness matters most.زمن الجلب يساوي تقريبًا S/B + L. عمليات الجلب التفاعلية الصغيرة يحكمها الـ latency، لذلك يكون القرب هو الأهم.
- CPU cache is to RAM as edge is to cloud: a small, fast, near tier in front of a large, slow, far one, justified by locality.الـ CPU cache بالنسبة إلى الـ RAM مثل الـ edge بالنسبة إلى الـ cloud: مستوى صغير وسريع وقريب أمام مستوى كبير وبطيء وبعيد، ومبرّر ذلك هو مبدأ الـ locality.
Sourcesالمصادر
- NIST SP 500-325: Fog Computing Conceptual Model (2018)DocsNational Institute of Standards and Technology(opens in a new tab)(يفتح في تبويب جديد)
- Memory Access Times (Code Optimization)DocsCornell Virtual Workshop, Cornell University Center for Advanced ComputingNew location of the page cited on slide 50الموقع الجديد للصفحة المذكورة في الشريحة 50(opens in a new tab)(يفتح في تبويب جديد)
- Memory Hierarchy (Code Optimization)DocsCornell Virtual Workshop, Cornell University Center for Advanced Computing(opens in a new tab)(يفتح في تبويب جديد)
- Computer Architecture: A Quantitative Approach, 6th ed., Chapter 2 Memory Hierarchy Design, Hennessy and PattersonBookElsevier (Morgan Kaufmann)(opens in a new tab)(يفتح في تبويب جديد)
- Computer Networking: A Top-Down Approach, 8th ed., Chapter 6 The Link Layer and LANs, Kurose and RossBookPearson(opens in a new tab)(يفتح في تبويب جديد)
- The Locality Principle, Peter J. Denning, Communications of the ACM 48(7), 2005PaperAssociation for Computing Machinery(opens in a new tab)(يفتح في تبويب جديد)
- Evaluating the Intel Skylake Xeon Processor for HPC Workloads (Hammond, Vaughan, Hughes, 2018)PaperSandia National Laboratories / U.S. DOE OSTI(opens in a new tab)(يفتح في تبويب جديد)
- Latency Numbers Every Programmer Should Know (after Jeff Dean and Peter Norvig)ArticleGitHub Gistcirca 2012 values, order-of-magnitude onlyقيم من نحو عام 2012، تدل على رتبة المقدار فقط(opens in a new tab)(يفتح في تبويب جديد)
- continuum (definition)DocsWiktionary(opens in a new tab)(يفتح في تبويب جديد)
- continuum (dictionary entry)DocsBritannica Dictionarycited on the slideمذكور في الشريحة(opens in a new tab)(يفتح في تبويب جديد)