Your SSD lies and that's ok .. I think
About this video
### الخلاصة النهائية: تتناول هذه المادة التعقيدات المرتبطة بالتفاعل بين مكونات أنظمة التخزين، بدءًا من أقراص التخزين (HDDs وSSDs) إلى أنظمة التشغيل وقواعد البيانات، مع التركيز على التوازن بين الأداء والموثوقية. يُظهر الكاتب أن كل طبقة من النظام تضيف تعقيداتها الخاصة، مثل ذاكرات التخزين المؤقت (caches)، وبيانات التعريف (metadata)، وأوامر الكتابة القسرية مثل `fsync`. هذه الطبقات تعمل بشكل مستقل لتحقيق أهداف متباينة: بعضها يركز على تحسين الأداء، بينما تسعى الأخرى إلى ضمان استمرارية البيانات. #### النقاط الرئيسية: 1. **التفاعل بين المكونات**: هناك نقص في التواصل بين المهندسين الذين يعملون على مكونات مختلفة (مثل أقراص التخزين وأنظمة التشغيل وقواعد البيانات)، مما يؤدي إلى سوء فهم حول كيفية عمل البيانات عبر الطبقات. 2. **التخزين المؤقت (Caching)**: - تتضمن العملية طبقات متعددة من التخزين المؤقت (database buffers، file system caches، disk caches)، حيث يتم تأجيل كتابة البيانات إلى القرص لتحسين الأداء. - قد يؤدي ذلك إلى افتراضات خاطئة بأن البيانات محفوظة عند تنفيذ عمليات مثل "Ctrl+S"، بينما قد تكون لا تزال في ذاكرة التخزين المؤقت. 3. **تأثير أوامر الكتابة القسرية (`fsync`)**: - يمكن أن تؤدي الاستخدامات المتكررة لأوامر مثل `fsync` إلى إبطاء الأداء، كما حدث في إصدارات قديمة من Firefox. - بعض SSDs تتجاهل أوامر `fsync` بسبب آليات الحماية ضد فقدان الطاقة (مثل البطاريات أو المكثفات)، مما يزيد من تعقيد إدارة البيانات. 4. **دور قواعد البيانات**: - قواعد البيانات مثل PostgreSQL توفر أدوات تحكم دقيقة في كيفية كتابة البيانات وضبطها، بما في ذلك خيارات الكتابة المتزامنة أو غير المتزامنة. - تقنية الوصول المباشر إلى الذاكرة (DMA) تتيح للتطبيقات تجاوز بعض الطبقات الوسيطة، مما يحسن الكفاءة ولكنه يتطلب حذرًا أكبر من المطورين. 5. **تحديات الأنظمة السحابية**: - موفرو الخدمات السحابية غالبًا ما يقومون بتحسين الأداء عبر التفاعل المباشر مع برامج تشغيل NVMe دون المرور عبر طبقات نظام التشغيل التقليدية. 6. **التعقيد مقابل التبسيط**: - رغم أن تبسيط الأنظمة قد يبدو جذابًا، إلا أن ذلك قد يؤدي إلى فقدان المرونة والأمان. الكشف عن التعقيد للمستخدمين يمنحهم حرية الاختيار بناءً على احتياجاتهم. - الشركات الكبرى مثل Apple تحقق أداءً عاليًا من خلال التحكم الكامل في الأجهزة والبرمجيات، لكن هذا يأتي على حساب قابلية النقل. #### الرسالة الأساسية: تحقيق الأداء الأمثل في أنظمة التخزين يتطلب فهمًا دقيقًا للتفاعلات بين الطبقات المختلفة وإدارة التوازن بين الأداء والموثوقية. على الرغم من أن تقنيات مثل DMA وتجاوز طبقات التخزين المؤقت يمكن أن تحسن الكفاءة، إلا أنها تتطلب حذرًا كبيرًا لتجنب المخاطر المرتبطة بفقدان البيانات. في النهاية، يجب على المصممين والمستخدمين اتخاذ قرارات مدروسة بناءً على الاحتياجات العملية لكل نظام، مع مراعاة التعقيدات الفنية وعدم الاكتفاء بالمظاهر البسيطة فقط. **الخلاصة:** الأنظمة الحديثة هي نتيجة لسلسلة من التنازلات بين الأداء والموثوقية، حيث يتطلب تحقيق الكفاءة فهمًا عميقًا للتفاعل بين المكونات وتقبل التعقيد كجزء لا يتجزأ من التصميم.
Course: OS Fundamentals
### Course Description: OS Fundamentals The **OS Fundamentals** course provides a comprehensive exploration of core operating system concepts, focusing on process management, scheduling, and resource allocation in Linux-based systems. Students will gain hands-on knowledge of how processes are prioritized and managed within the Linux environment, including an in-depth understanding of "niceness" values and their impact on CPU resource distribution. The course begins with foundational topics such as assigning priority levels to processes, where values range from -20 (highest priority) to 19 (lowest priority). Through practical demonstrations using tools like `top` and `renice`, students will learn how to monitor and adjust process priorities dynamically, ensuring optimal system performance. Additionally, the course delves into advanced concepts such as real-time processes and their dominance over standard processes, equipping learners with the skills to manage complex workloads effectively. A significant portion of the course is dedicated to understanding workload types and their implications for system scalability. Students will explore two primary categories of workloads: I/O-bound and CPU-bound tasks. Using real-world examples, such as PostgreSQL for I/O-bound applications and custom C programs for CPU-intensive tasks, learners will analyze how different workloads affect system resources. The course emphasizes the importance of vertical scaling (adding more resources to a single machine) versus horizontal scaling (distributing workloads across multiple machines) and provides strategies for achieving cost-effective scalability. By leveraging Linux commands like `top`, students will gain insights into CPU metrics, memory usage, and system-level operations, enabling them to diagnose and optimize performance bottlenecks. Throughout the course, students will engage in interactive experiments using Raspberry Pi devices, simulating multi-core environments to observe process behavior under varying conditions. These hands-on exercises will reinforce theoretical concepts and encourage creative problem-solving. By the end of the course, participants will have a solid grasp of Linux process management, workload optimization, and system monitoring techniques. Whether you're a beginner looking to understand the basics of operating systems or an experienced developer aiming to enhance your system administration skills, this course offers valuable insights and practical tools to help you succeed in managing modern computing environments.
View Full Course