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

المحاضرة التاسعة-نظم تشغيل 1

الكلية كلية تكنولوجيا المعلومات     القسم قسم البرامجيات     المرحلة 4
أستاذ المادة حوراء شريف حمزة حسين       18/12/2016 18:04:52
Semaphores
A semaphore S is an integer variable that, apart from initialization, is accessed only through two standard atomic operations: wait( ) and signal( ).
The wait() operation was originally termed P (from the Dutch proberen, “to test”); signal( ) was originally called V (from verhogen, “to increment”). The definition of wait( ) is as follows:

wait(S) {
while S <= 0 ; // no-op
S--;
}
The definition of signal ( ) is as follows:

signal(S) {
S++;
}
All modifications to the integer value of the semaphore in the wait( ) and signal( ) operations must be executed indivisibly. That is, when one process modifies the semaphore value, no other process can simultaneously modify that same semaphore value. In addition, in the case of wait(S), the testing of the integer value of S (S ? 0), as well as its possible modification (S--), must be executed without interruption.
Semaphores
A semaphore S is an integer variable that, apart from initialization, is accessed only through two standard atomic operations: wait( ) and signal( ).
The wait() operation was originally termed P (from the Dutch proberen, “to test”); signal( ) was originally called V (from verhogen, “to increment”). The definition of wait( ) is as follows:

wait(S) {
while S <= 0 ; // no-op
S--;
}
The definition of signal ( ) is as follows:

signal(S) {
S++;
}
All modifications to the integer value of the semaphore in the wait( ) and signal( ) operations must be executed indivisibly. That is, when one process modifies the semaphore value, no other process can simultaneously modify that same semaphore value. In addition, in the case of wait(S), the testing of the integer value of S (S ? 0), as well as its possible modification (S--), must be executed without interruption.


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