Time Left - 10:00 mins

GATE 2020 : Operating System Quiz 5

Attempt now to get your rank among 671 students!

Question 1

When several processes access the same data concurrently and the outcome of the execution depends on the particular order in which the access takes place is called ________

Question 2

Consider the following three concurrent processes.

Initially A = 3 , B = 0
What is the minimum number of 1’s printed by the execution of the above processes?

Question 3

Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes:

Here, wants1 and wants2 are shared variables, which are initialized to false.
Which one of the following statements is TRUE about the above construct?

Question 4

Consider the following code for two processes .

Assume A and B are binary semaphore variable initialized with values 1 and 0 respectively. X and y are shared variable initialized with 5 and 0 respectively. There is no deadlock occurs while executing then what are the values of x and y respectively after the execution of given code?

Question 5

Assume threads P1 and P2 executes the codes with the following shared data: Share data and Semaphore variables

Which of the following satisfies for the above two concurrent threads

Question 6

Consider a process ‘P’ tries to acquire a lock using the test-and-set instruction as following.
while (Test-and-Set (lock));
If the lock is busy (some other process acquired the lock) and all interrupts are disabled then which of the following is correct?
  • 671 attempts
  • 2 upvotes
  • 8 comments
Apr 10GATE & PSU CS