1
GATE CSE 2021 Set 1
Numerical
+1
-0
Three processes arrive at time zero with CPU bursts of 16, 20, and 10 milliseconds. If the scheduler has prior knowledge about the length of the CPU bursts, the minimum achievable average waiting for these three processes in a non-preemptive scheduler (rounded to the nearest integer) is ______ milliseconds.
Your input ____
2
GATE CSE 2021 Set 1
MCQ (More than One Correct Answer)
+1
-0
Which of the following standard C library functions will always invoke a system call when executed from a single-threaded process in a UNIX/Linux operating system?
3
GATE CSE 2021 Set 1
MCQ (More than One Correct Answer)
+2
-0.67
Consider the following pseudocode, where S is a semaphore intialized to 5 in line#2 an counter is a shared variable intialized to 0 in line#1. Assume that the increment operation in line#7 is not atomic.
1. int counter = 0;
2. Semaphore S = init(5);
3. void parop(void)
4. {
5. wait (S);
6. wait (S);
7. counter++;
8. signal (S);
9. signal (S);
10. }
If five threads execute the function parop concurrently, which of the following program behavior (s) is/are possible?
4
GATE CSE 2021 Set 1
MCQ (Single Correct Answer)
+2
-0.67
Consider the following ANSI C program.
#include <stdio.h>
int main( ) {
int i, j, count;
count = 0;
i = 0;
for (j = -3; j <= 3; j++) {
if ((j >= 0) && (i++))
count = count + j;
}
count = count + i;
printf("%d", count);
return 0;
}
Which one of the following options is correct?
Paper analysis
Total Questions
Algorithms
5
Compiler Design
4
Computer Networks
5
Computer Organization
3
Data Structures
5
Database Management System
6
Digital Logic
4
Discrete Mathematics
12
Operating Systems
4
Programming Languages
2
Theory of Computation
5
General Aptitude
10
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 2
GATE CSE 2017 Set 1
GATE CSE 2016 Set 2
GATE CSE 2016 Set 1
GATE CSE 2015 Set 1
GATE CSE 2015 Set 3
GATE CSE 2015 Set 2
GATE CSE 2014 Set 2
GATE CSE 2014 Set 3
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