Concurrency and Synchronization questions

Q23

GATE CS 2019 CSConcurrency and SynchronizationNAT1 mark
Consider three concurrent processes P1, P2 and P3 as shown below, which access a shared variable D that has been initialized to 100.
P1P2P3
⋮\vdots⋮\vdots⋮\vdots
D=D+20\text{D} = \text{D} + 20D=D−50\text{D} = \text{D} - 50D=D+10\text{D} = \text{D} + 10
⋮\vdots⋮\vdots⋮\vdots
The processes are executed on a uniprocessor system running a time-shared operating system. If the minimum and maximum possible values of D after the three processes have completed execution are X and Y respectively, then the value of Y−XY - X is __________.
Show answer without attempting

Answer: 80

0/10 correct0 marks

Related topics in Operating Systems