CS/IT Gate Yearwise
CS/IT Gate 2026 (Set 2)
CS/IT Gate 2025 (Set 1)
CS/IT Gate 2025 (Set 2)
CS/IT Gate 2024 (Set 1)
CS/IT Gate 2024 (Set 2)
CS/IT Gate 2023
CS/IT Gate 2022
CS/IT Gate 2021 (Set 1)
CS/IT Gate 2021 (Set 2)
CS/IT Gate 2020
CS/IT Gate 2019
CS/IT Gate 2018
CS/IT Gate 2017 (Set 1)
CS/IT Gate 2017 (Set 2)
CS/IT Gate 2016 (Set 1)
CS/IT Gate 2016 (Set 2)
CS/IT Gate 2015 (Set 1)
CS/IT Gate 2015 (Set 2)
CS/IT Gate 2015 (Set 3)
CS/IT Gate 2014 (Set 1)
CS/IT Gate 2014 (Set 2)
CS/IT Gate 2014 (Set 3)
CS and IT Gate 2017 Set-1 Questions with Answer
Ques 53 Gate 2017 Set-1
Let X be a Gaussian random variable with mean 0 and variance σ2. Let Y = max(X,0) where max(a,b) is the maximum of a and b. The median of Y is _____.
Ques 54 Gate 2017 Set-1
Consider the following CPU processes with arrival times (in milliseconds) and length of CPU bursts (in milliseconds) as given below:
| Process | Arrival Time | Brust Time |
|---|---|---|
| P1 | 0 | 7 |
| P2 | 3 | 3 |
| P3 | 5 | 5 |
| P4 | 6 | 2 |
If the pre-emptive shortest remaining time first scheduling algorithm is used to schedule the processes, then the average waiting time across all processes is _______ milliseconds.
Ques 55 Gate 2017 Set-1
Recall that Belady’s anomaly is that the pages-fault rate may increase as the number of allocated frames increases. Now consider the following statements:
S2: LRU page replacement algorithm suffer from Belady’s anomaly .
Which of the following is CORRECT?
Given:
Two statements regarding Belady's anomaly:
S1: Random page replacement algorithm suffers from Belady’s anomaly.
S2: LRU page replacement algorithm suffers from Belady’s anomaly.
To find:
Which of the statements S1 and S2 are correct.
Solution:
Let me check statement S2 first.
A page replacement algorithm is free from Belady's anomaly if it belongs to the class of stack algorithms.
For a stack algorithm, the set of pages in memory for n frames is always a subset of the pages in memory for n + 1 frames.
Since LRU (Least Recently Used) is a stack algorithm, it can never suffer from Belady's anomaly.
So, statement S2 is false.
Now let me check statement S1.
The Random page replacement algorithm randomly picks a page to replace.
Because of this random choice, it does not satisfy the inclusion property of stack algorithms.
Since it is not a stack algorithm, it can exhibit Belady's anomaly where increasing the number of frames leads to more page faults.
So, statement S1 is true.
Therefore, S1 is true and S2 is false.
Answer: (B) S1 is true, S2 is false
Ques 56 Gate 2017 Set-1
A multithreaded program P executes with x number of threads and uses y number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock l, then it cannot re-acquire lock l without releasing it. If a thread is unable to acquire a lock, it blocks until the lock becomes available. The minimum value of x and the minimum value of y together for which execution of P can result in a deadlock are:
PROCESSED
Ques 57 Gate 2017 Set-1
Threads of a process share
Total Unique Visitors