في صيف عام 1997، حطت مركبة ناسا الاستكشافية على سطح المريخ، وبدأت بإرسال صور مذهلة ورائعة إلى الأرض. ولكن بعد عدة أيام، حدث شيءٌ مهول. انقطعت عملية الإرسال. ونتيجةً لذلك، كانت المركبة تقوم بالتأجيل؛ مُبقيةً نفسها مشغولة بشكل تام وفشلت في أداء عملها الأهم.
In the summer of 1997, NASA's Pathfinder spacecraft landed on the surface of Mars, and began transmitting incredible, iconic images back to Earth. But several days in, something went terribly wrong. The transmissions stopped. Pathfinder was, in effect, procrastinating: keeping itself fully occupied but failing to do its most important work.
ما الذي كان يحدث؟ تبيّن أن هناك مشكلة في جدولتها.
What was going on? There was a bug, it turned out, in its scheduler.
كل نظام عمل يتضمن ما يُدعى بالجدولة والذي يُخبر وحدة المعالجة المركزيّة بالزمن الذي يجب أن تستغرقه في أداء مهمّة ما قبل التبديل، وما هي المهمة المراد التبديل إليها. وعلى أكمل وجه، يقوم الحاسوب بالانتقال بانسيابيّة كبيرة ما بين مهامّه المختلفة، يوهم الحاسوب بأنّه يقوم بكل شيء بشكل متزامن. ولكننّا جميعاً نعرف ما الذي يحصل عندما يحدث خطأ ما.
Every operating system has something called the scheduler that tells the CPU how long to work on each task before switching, and what to switch to. Done right, computers move so fluidly between their various responsibilities, they give the illusion of doing everything simultaneously. But we all know what happens when things go wrong. This should give us, if nothing else, some measure of consolation.
وهذا يمنحنا على الأقل شعوراً بالمواساة. حتى الحواسيب من الممكن أن ترتبك أحياناً.
Even computers get overwhelmed sometimes. Maybe learning about the computer science of scheduling
ربما دراسة علم الحاسوب وجدولته يستطيع أن يمنحنا حلولاً لمعاناة البشر مع الوقت.
can give us some ideas about our own human struggles with time. One of the first insights is that all the time you spend prioritizing your work
أُولى الأفكار هي أن كلّ الوقت الذي تستغرقه في ترتيب أولويات وظائفك هو وقت لا تستغرقه في أدائها. على سبيل المثال، عندما تعاين بريدك الوارد، وتفحص جميع الرسائل، مُختاراً أكثرها أهميّة. بعد أن تقرأها، فإنك تعاود الكرة. يبدو ذلك معقولاً، ولكن هناك مشكلة هنا.
is time you aren't spending doing it. For instance, let's say when you check your inbox, you scan all the messages, choosing which is the most important. Once you've dealt with that one, you repeat. Seems sensible, but there's a problem here. This is what's known as a quadratic-time algorithm.
هذا ما يُدعى بخوارزميّة من الدرجة الثانية. إذا كان صندوقك الوارد يحوي ضعف الكميّة، فإن هذه الخطوات ستستغرق ضعف الوقت بالإضافة إلى أنك ستقرأ ضعف الكميّة أيضاً! وهذا يعني أربعة أضعاف من العمل.
With an inbox that's twice as full, these passes will take twice as long and you'll need to do twice as many of them! This means four times the work. The programmers of the operating system Linux
مبرمجو نظام التشغيل لينكس واجهوا مشكلة مشابهة في عام 2003. كانت لينكس تقوم بترتيب كل مهمّة من مهامها حسب أهميّتها، مستغرقةً أحياناً وقتاً أكثر في ترتيبها بدلاً من أدائها. كان الحلّ المبتكر من قبل المبرمجين يقضي بالتخلي عن كل عملية الترتيب لصالح عدد محدود من مجموعات الأولويّة. الطريقة كانت أقل تحديداً لما يجب فعله تالياً ولكنها زادت عن تعويض ذلك باستغراق المزيد من الوقت في إحراز التقدم.
encountered a similar problem in 2003. Linux would rank every single one of its tasks in order of importance, and sometimes spent more time ranking tasks than doing them. The programmers’ counterintuitive solution was to replace this full ranking with a limited number of priority “buckets.” The system was less precise about what to do next but more than made up for it by spending more time making progress. So with your emails, insisting on always doing the very most important thing first
بالنسبة لرسائلك الالكترونية، فإن الإصرار دوماً على قراءة الأكثر أهميّة أولاً قد يؤدي للانهيار. إذ أن الاستيقاظ على صندوق وارد يحوي ثلاثة أضعاف ما يحويه في العادة قد يستغرق تسعة أضعاف الزمن اللازم لإنهائه. إنّ من الأفضل لك أن ترد حسب الترتيب الزمني، أو حتى بشكل عشوائي! مما يثير الدهشة، أنّ التخلّي عن أداء المهام حسب الترتيب الأمثل قد يكون أحياناً سبباً لإنهائهم.
could lead to a meltdown. Waking up to an inbox three times fuller than normal could take nine times longer to clear. You’d be better off replying in chronological order, or even at random! Surprisingly, sometimes giving up on doing things in the perfect order may be the key to getting them done. Another insight that emerges from computer scheduling
فكرة أخرى تم استنتاجها من طريقة الجدولة في الحواسيب لها علاقة بواحدة من الصفات السائدة في الحياة العصريّة: المقاطعة.
has to do with one of the most prevalent features of modern life: interruptions. When a computer goes from one task to another,
عندما ينتقل الحاسوب من مهمّة لأخرى، فإنه يقوم بما يسمّى بتغيير المحتوى، بحيث يحتفظ بما وصل إليه في مهمّة ما، مُخرجاً البيانات القديمة من ذاكرته ومُدخلاً البيانات الجديدة. كلٌّ من هذه العمليات يسبب كلفة.
it has to do what's called a context switch, bookmarking its place in one task, moving old data out of its memory and new data in. Each of these actions comes at a cost. The insight here is that there’s a fundamental tradeoff
تكمن الفكرة هنا في وجود تنازل أساسي ما بين الإنجاز والاستجابة. أداء المهام الهامة يعني تقليل التغيير بين المحتويات. ولكن أن تكون مستجيباً هو أن تتصرف دوماً عندما يطرأ شيء ما. هذان المبدآن أساسيّان في حالة الضغط.
between productivity and responsiveness. Getting serious work done means minimizing context switches. But being responsive means reacting anytime something comes up. These two principles are fundamentally in tension. Recognizing this tension allows us
التعرّف على هذا الضغط يمكننا من أن نقرر أين نريد أن نحقق هذا التوازن.
to decide where we want to strike that balance. The obvious solution is to minimize interruptions.
الحل الأوضح هو تقليل المقاطعات. الأقل وضوحاً هو تجميعهم. إذا لم يتطلّب إشعارٌ أو رسالة الكترونيّة ما رداً بشكل عاجل بأقل من ساعة على سبيل المثال. فإن هذا يمثّل تماماً كم مرّة يجب أن تتحقق منه، وليس أكثر من ذلك.
The less obvious one is to group them. If no notification or email requires a response more urgently than once an hour, say, then that’s exactly how often you should check them. No more. In computer science, this idea goes by the name of interrupt coalescing.
في علم الحاسوب، هذا ما يُعرف بتجميع المقاطعات. عوضاً عن التعامل مع المهام حسب ظهورها - اوه، تم تحريك المؤشر؟ ضُغط مفتاح ما؟ تم تحميل المزيد من هذا الملف؟ - يقوم النظام بتجميع هذه المقاطعات معاً حسب الزمن الممكن أن ينتظروا خلاله.
Rather than dealing with things as they come up – Oh, the mouse was moved? A key was pressed? More of that file downloaded? – the system groups these interruptions together based on how long they can afford to wait. In 2013, interrupt coalescing
في عام 2013، تجميع المقاطعات أثمر تطوّراً ملحوظاً في عمر بطارية الحواسيب المحمولة. وهذا لأن تأجيل المقاطعات يُمكّن النظام من التحقق من كل شيء على حدة، وثمّ إعادة إدخال وضعيّة الطاقة المنخفضة.
triggered a massive improvement in laptop battery life. This is because deferring interruptions lets a system check everything at once, then quickly re-enter a low-power state. As with computers, so it is with us.
كما في الحواسيب، يمكننا أيضاً فعل ذلك. ربما اعتماد طريقة مشابهة قد يمكننا نحن المستخدمين من استعادة اهتمامنا الخاص، ويُعيد لنا واحداً من أكثر الأمور ندرة في الحياة العصريّة: الراحة.
Perhaps adopting a similar approach might allow us users to reclaim our own attention, and give us back one of the things that feels so rare in modern life: rest.