In concurrent programming, a "critical section" is a part of a multi-process program that (a) may not be concurrently executed by more than one of the program's thread. Let us consider a 2 processes solution: do { flag(i] - TRUE; while(flag[j]); %wait CRITICAL SECTION flag[i] - FALSE; REMAINDER SECTION } while (TRUE); Pseudo-code of $P_i$ (the one of $P_j$ is symmetric)

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter11: Operating Systems
Section: Chapter Questions
Problem 20VE
icon
Related questions
Question
Modern Operating Systems must tackle the challenges of Synchronization and Deadlock. 'Pro-
vess Synchronization' is the task of coordinating the execution of processes in a way that no two processes
can have access to the same shared data or resource. A process requesting a resource may have to wait, if the
resource is not available at that time. Sometimes, a waiting process is never able to change state, because
the resources it has requested are held by other waiting processes; this situation is called 'Deadlock'.
,In concurrent programming, a "critical section" is a part of a multi-process program that
(a)
may not be concurrently executed by more than one of the program's thread. Let us consider a 2
processes solution:
do {
flag(i] - TRUE;
while (flag[j]); %wait
CRITICAL SECTION
flag[i] - FALSE;
REMAINDER SECTION
} while (TRUE);
Pseudo-code of $P_i$ (the one of $P_j$ is symmetric)
(i) {
simple 'yes-no' answer is NOT enough. What is the mutual exclusion requirement? Why is
(not?) sattisfied?)
} Does the given solution sattisfy the mutual exclusion requirement? Explain (a
(ii
} Does the given solution sattisfy the progress requirement? Explain
Transcribed Image Text:Modern Operating Systems must tackle the challenges of Synchronization and Deadlock. 'Pro- vess Synchronization' is the task of coordinating the execution of processes in a way that no two processes can have access to the same shared data or resource. A process requesting a resource may have to wait, if the resource is not available at that time. Sometimes, a waiting process is never able to change state, because the resources it has requested are held by other waiting processes; this situation is called 'Deadlock'. ,In concurrent programming, a "critical section" is a part of a multi-process program that (a) may not be concurrently executed by more than one of the program's thread. Let us consider a 2 processes solution: do { flag(i] - TRUE; while (flag[j]); %wait CRITICAL SECTION flag[i] - FALSE; REMAINDER SECTION } while (TRUE); Pseudo-code of $P_i$ (the one of $P_j$ is symmetric) (i) { simple 'yes-no' answer is NOT enough. What is the mutual exclusion requirement? Why is (not?) sattisfied?) } Does the given solution sattisfy the mutual exclusion requirement? Explain (a (ii } Does the given solution sattisfy the progress requirement? Explain
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Race Condition
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning