1,681 views
0 votes
0 votes

. Consider a concurrent program with two processes P & Q, where A, B, C, D & E are arbitrary atomic statements; assume that main program does a Par begin of the two processes:

Void P( )                              Void Q( )

                                         {

                                          D;

                                          E;

                                          }

{ A; 

B;

C;

}

Which of the following statement is True?

(a) It is never possible to generate output ‘C’ before output ‘E’

(b) The order of Execution of statements will be same independent of the process execution

(c) The relative order among the statements of P & Q is always maintained

(d) None

1 Answer

2 votes
2 votes
relative order among statements of p and q is maintained ....because wherever preemption take place,it is guranted that statements in p and q is not altered... like A D E B C or A B D E C but it cannot be like E D A C B or ANYthing like that.

Related questions

5 votes
5 votes
1 answer
1
amrendra pal asked Aug 28, 2017
502 views
#include<stdio.h int Abc(){ static int i = 19; return i; } int main(){ for(Abc() ; Abc() ; Abc()){ printf("%d ", Abc()); } return 0; }
0 votes
0 votes
1 answer
2
Gate Mm asked Dec 21, 2015
410 views
0 votes
0 votes
0 answers
3
Gate Mm asked Dec 21, 2015
174 views
1 votes
1 votes
1 answer
4