מערכות הפעלה מערכות הפעלה

לחץ כאן לכל השאלות

Consider the methods used by processes P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1 and S2 are randomly assigned. Method Used by P1 while (S1 == S2) ; Critica1 Section S1 = S2; Method Used by P2 while (S1 != S2) ; Critica1 Section S2 = not (S1); Which one of the following statements describes the properties achieved?

1
done
It can be easily observed that the Mutual Exclusion requirement is satisfied by the above solution, P1 can enter critical section only if S1 is not equal to S2, and P2 can enter critical section only if S1 is equal to S2. Progress Requirement is not satisfied. Let us first see definition of Progress Requirement. Progress Requirement: If no process is executing in its critical section and there exist some processes that wishes to enter their critical section, then the selection of the processes that will enter the critical section next cannot be postponed indefinitely. If P1 or P2 want to re-enter the critical section, then they cannot even if there is other process running in critical section.
by
מיין לפי

* השאלה נוספה בתאריך: 20-07-2020