514 views
1 votes
1 votes

Variable X starts at zero and is a shared variable.  Variables A and B are not shared variables.

If Processes P1 and P2 execute only once at any speed, the largest possible value of X is ____.

1 Answer

0 votes
0 votes

The largest value of X possible is 4.

P2 will run only one time and P1 will run for two times so we execute P2 first and then two times P1.

Giving us X = 4.

Related questions

0 votes
0 votes
1 answer
1
lalitver10 asked Jan 22, 2022
648 views
Question→ Given a system with 3 processes where each process requires at least 2 resources to complete their execution, then the largest number of resources which will ...
2 votes
2 votes
2 answers
3
Dheeraj Varma asked Nov 16, 2021
1,153 views
What is answer for this question and also please explain the approach