Online English Summarizer tool, free and accurate!
"expected".Concurrent access to shared data may result in data inconsistency ??Executed atomically 2.Priority Inversion - Scheduling problem when lower-priority process holds a lock needed by higher-priority process.Initially, counter is set to 0.This lock therefore called a spinlock.Because the process spins while waiting until the lock is available.Happens in systems with more than 2 priorities.???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????.??????????????????????????????????????????????????????????????????????????????????????.?????????????????????????????????????????????0 ?????????????????????????.???????????????????????????????????????????????????????????????????????????????????????????
Processes can execute concurrently
يمكن تنفيذ العمليات في وقت واحد
May be interrupted at any time, partially completing
execution
قد تتم مقاطعته في أي وقت، مما يؤدي إلى استكمال التنفيذ جزئيًا
Concurrent access to shared data may result in data
inconsistency
قد يؤدي الوصول المتزامن إلى البيانات المشتركة إلى عدم تناسق البيانات
Maintaining data consistency requires mechanisms to ensure
the orderly execution of cooperating processes
يتطلب الحفاظ على اتساق البيانات آليات لضمان التنفيذ المنظم للعمليات المتعاونة
5.3 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Illustration of the problem:
Suppose that we wanted to provide a solution to the consumer-producer
problem that fills all the buffers. We can do so by having an integer
counterthat keeps track of the number of full buffers. Initially, counter
is set to 0. It is incremented by the producer after it produces a new buffer
and is decremented by the consumer after it consumes a buffer.
. نفترض أننا أردنا تقديم حل لمشكلة المستهلك والمنتج الذي يملأ جميع المخازن المؤقتة
لك من يمكننا القيام بذ
. خلال وجود عداد صحيح يتتبع عدد المخازن المؤقتة الكاملة
0 في البداية، يتم ضبط العداد على
.
ويتم
زيادته من قبل المنتج بعد أن ينتج مخزنًا مؤقتًا جديدًا ويتم إنقاصه من قبل المستهلك بعد أن يستهل
ك المخزن
المؤقت
5.4 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Producer
while (true) {
/* produce an item in next produced /
while (counter == BUFFER_SIZE) ;
/ do nothing /
buffer[in] = next_produced;
in = (in + 1) % BUFFER_SIZE;
counter++;
}
5.5 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Consumer
while (true) {
while (counter == 0)
; / do nothing /
next_consumed = buffer[out];
out = (out + 1) % BUFFER_SIZE;
counter--;
/ consume the item in next consumed */
}
5.6 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Race Condition
counter++ could be implemented as
register1 = counter
register1 = register1 + 1
counter = register1
counter-- could be implemented as
register2 = counter
register2 = register2 - 1
counter = register2
Consider this execution interleaving with “count = 5” initially:
S0: producer execute register1 = counter {register1 = 5}
S1: producer execute register1 = register1 + 1 {register1 = 6}
S2: consumer execute register2 = counter {register2 = 5}
S3: consumer execute register2 = register2 – 1 {register2 = 4}
S4: producer execute counter = register1 {counter = 6 }
S5: consumer execute counter = register2 {counter = 4}
Race condition:
Several processes access
and manipulate the same data
concurrently and the outcome
depends on the order in which
the access takes place.
5.7 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Critical Section Problem
Consider system of n processes {p0, p1, … pn-1}
Each process has critical section segment of code
Process may be changing common variables, updating
table, writing file, etc
When one process in critical section, no other may be in
its critical section
Critical section problem is to design protocol to solve this
Each process must ask permission to enter critical section in
entry section, may follow critical section with exit section,
then remainder section
5.8 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Critical Section
General structure of process Pi
Request permission to
enter the critical section
One process is allowed
To execute this section
The remaining of the
code
Notify the system that
it finished processing in
the critical section.
5.9 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition
Solution to Critical-Section Problem
Summarize English and Arabic text using the statistical algorithm and sorting sentences based on its importance
You can download the summary result with one of any available formats such as PDF,DOCX and TXT
ٌYou can share the summary link easily, we keep the summary on the website for future reference,except for private summaries.
We are working on adding new features to make summarization more easy and accurate
أولا شعر الحزب الزبيري بدا يتنصيب عبد الله بن الزبير نفسه خليفة على الحجاز، واستمر تسع سنوات، وانته...
ث- الصراع: يعتبر من المفاهيم الأقرب لمفهوم الأزمة، حيث أن العديد من الأزمات تنبع من صراع بين طرفين...
تعرض مواطن يدعى عادل مقلي لاعتداء عنيف من قبل عناصر مسلحة تابعة لمليشيا الحوثي أمام زوجته، في محافظة...
زيادة الحوافز والدعم المالي للأسر الحاضنة لتشجيع المشاركة. تحسين تدريب ومراقبة العاملين الاجتماعيين...
Because learning changes everything.® Chapter 13 Mutations and Genetic Testing Essentials of Biology...
ذكرت صحيفة نيويورك تايمز نقلا عن مصادر استخباراتية في الشرق الأوسط ومسؤولين إسرائيليين أن عز الدين ا...
تُعد طرائق التدريس من أهم العوامل التي تؤثر في جودة العملية التعليمية وفاعليتها. ومع تطور أساليب الت...
تعتبر بروفايلات الدول مهمة للغاية في تحسين الفهم والتواصل الثقافي والاقتصادي بين الدول، وكذلك بين ال...
هدفت هذه الدراسة إلى تحليل العلاقة بين السياحة والتنويع الاقتصادي وأثرهما المشترك على تحقيق النمو ال...
is a comprehensive document that outlines a business's goals, strategies, and operational structure....
شدد الفريق أول عبدالمجيد صقر، على أهمية التنسيق بين القوات المسلحة المصرية ونظيراتها الدولية من أجل ...
تواصل مليشيا الحوثي الإرهابية حملة ميدانية موسعة منذ أكثر من أسبوعين، استهدفت خلالها الباعة المتجولي...