Processes p1,p2,p3,p4,p5 share a semaphore variable mutex, initialized to 1. Suppose a processes executes in the following manner :
signal(mutex);
.....
critical section
.....
wait(mutex);
In this situation :
Semaphore S=1, there are 5 processes po,p1,p2,p3,p4 execute the following code
p0 to p3 execute while (1) { P(S) <CS.> V(S) } | p4 execute {V(S) <CS.> V(S)} |
|---|
How many maximum number of processes can be present in critical section at any point of time?
Význam etického jednání pro organizaci spočívá především v tom, že:
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 0.
Method used by P1 :
while(S1==S2);
Critical section
S1 = S2;
Method used by P2 :
while(S1!=S2);
Critical section
S2 = not(S1);
which process will execute first? the above construct fails to provide ---Možnost etického rozhodování je závislá na celé řadě faktorů. Vyberte správný výčet:
K moderním nástrojům etického řízení patří: