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

monitors

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

Monitors

 

_ High-level synchronization construct that allows the safe sharing

 

of an abstract data type among concurrent processes.

 

monitor monitor-name

 

 {

 

     shared variable declarations

 

         procedure body P1 (…) {

 

             . . .

 

  }

 

         procedure body P2 (…) {

 

              . . .

 

 }

 

          procedure body Pn (…) {

 

              . . .

 

  }

 

{

 

             initialization code

 

}

 

}

 

 

 

 

                           

 

                                          

 

 

Condition Variables

 

To allow a process to wait within the monitor, a condition variable must be declared, as condition x, y;

 

_ Condition variable can only be used with the operations wait and signal.

 

? The operation

 

          x.wait();

 

means that the process invoking this operation is suspended until another process invokes

 

          x.signal();

 

 

? The x.signal operation resumes exactly one suspended process. If no process is suspended,

 

    then the signal operation has no effect.

 


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