انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

Semaphore-part1

الكلية كلية العلوم للبنات     القسم قسم الحاسبات     المرحلة 4
أستاذ المادة سحر عادل كاظم عبود باوي       5/31/2011 6:38:19 AM

Semaphore

 

All that busy waiting in all algorithms for mutual exclusion is pretty annoying. It’s just wasted time on the CPU. If we have just one CPU, it doesn’t make sense for that process to take up its whole quantum spinning away waiting for a shared variable to change that can’t change until the current process relinquishes the CPU!. This inspired the development of the semaphore. The name comes from old-style railroad traffic control signals where mechanical arms swing down to block a train from a section of track that another train is currently using. When the track was free, the arm would swing up, and the waiting train could now proceed.

·        Synchronization tool that does not require busy waiting

 

·        Semaphore S – integer variable

 

·        Two standard operations modify S: wait() and signal()

 

·        Originally called P() and V()

 

·        Less complicated

 

·        Can only be accessed via two indivisible (atomic) operations

 

 


المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .