1
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
A uni-processor computer system only has two processes, both of which alternate $$10$$ $$ms$$ $$CPU$$ bursts with $$90$$ $$ms$$ $${\rm I}/O$$ bursts. Both the processes were created at nearly the same time. The $${\rm I}/O$$ of both processes can proceed in parallel. Which of the following scheduling strategies will result in the least $$CPU$$ utilization (over a long period of time) for this system?
2
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
Suppose we want to synchronize two concurrent processes P and Q using binary semaphores S and T. The code for the processes P and Q is shown below.
Process P:
Process Q:
Process P:
while(1){
W:
Print '0';
Print '0';
X:
}
Process Q:
while(1){
Y:
Print '1';
Print '1';
Z:
}
Synchronization statements can be inserted only at points W, X, Y, and Z.Which of the following will ensure that the output string never contains a substring of the form 01n0 or 10n1 where n is odd?
3
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
Suppose we want to synchronize two concurrent processes P and Q using binary semaphores S and T. The code for the processes P and Q is shown below.
Process P:
Process Q:
Process P:
while(1){
W:
Print '0';
Print '0';
X:
}
Process Q:
while(1){
Y:
Print '1';
Print '1';
Z:
}
Synchronization statements can be inserted only at points W, X, Y, and Z.Which of the following will always lead to an output starting with 001100110011
4
GATE CSE 2003
MCQ (Single Correct Answer)
+2
-0.6
Consider the C program shown below.
#include < stdio.h >
#define print(x) printf("%d ", x)
int x;
void Q(int z) {
z += x; print(z);
}
void P(int *y) {
int x = *y+2;
Q(x); *y = x-1;
print(x);
}
main(void) {
x = 5;
P(&x);
print(x);
}
The output of this program isPaper analysis
Total Questions
Algorithms
9
Compiler Design
9
Computer Networks
5
Computer Organization
2
Data Structures
4
Database Management System
5
Digital Logic
5
Discrete Mathematics
11
Operating Systems
8
Programming Languages
7
Theory of Computation
8
More papers of GATE CSE
GATE CSE 2024 Set 2
GATE CSE 2024 Set 1
GATE CSE 2023
GATE CSE 2022
GATE CSE 2021 Set 2
GATE CSE 2021 Set 1
GATE CSE 2020
GATE CSE 2019
GATE CSE 2018
GATE CSE 2017 Set 1
GATE CSE 2017 Set 2
GATE CSE 2016 Set 1
GATE CSE 2016 Set 2
GATE CSE 2015 Set 1
GATE CSE 2015 Set 3
GATE CSE 2015 Set 2
GATE CSE 2014 Set 3
GATE CSE 2014 Set 2
GATE CSE 2014 Set 1
GATE CSE 2013
GATE CSE 2012
GATE CSE 2011
GATE CSE 2010
GATE CSE 2009
GATE CSE 2008
GATE CSE 2007
GATE CSE 2006
GATE CSE 2005
GATE CSE 2004
GATE CSE 2003
GATE CSE 2002
GATE CSE 2001
GATE CSE 2000
GATE CSE 1999
GATE CSE 1998
GATE CSE 1997
GATE CSE 1996
GATE CSE 1995
GATE CSE 1994
GATE CSE 1993
GATE CSE 1992
GATE CSE 1991
GATE CSE 1990
GATE CSE 1989
GATE CSE 1988
GATE CSE 1987
GATE CSE
Papers
2023
2022
2020
2019
2018
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997
1996
1995
1994
1993
1992
1991
1990
1989
1988
1987