Given below is a program which when executed spawns two concurrent processes:

Semaphore X: = 0;

/* Process now forks into concurrent processes P1 & P2 */

P1 : repeat forever              P2 : repeat forever

V(X);                                    P(X);

Compute;                            Compute;

P(X);                                    V(X);

Consider the following statements about processes P1 and P2:

I: It is possible for process P1 to starve.

II: It is possible for process P2 to starve.

Which of the following holds?

1
Both I and II are true
2
I is true but II is false
3
II is true but I is false
4
Both I and II are false

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation