GATE Operating System: Concurrency and Synchronization – Previous Year Questions
23 GATE previous year questions on Concurrency and Synchronization (Operating System, Computer Science) with answers and explanations, from every paper.
23 questions worth 41 marks in all (5 1-mark, 18 2-mark). Asked between 2007 and 2026, so you can see how the topic has been tested over time.
- GATE 2007 CS Q58 – Two processes share wants1, wants2, initially false, and use the following construct. Which is TRUE?
- GATE 2008 CS Q63 – Counting semaphore s uses P: decrement s, wait if s<0; V: increment s, wake one waiter if s≤0. Binary primitives Pb, Vb implement it as below. What…
- GATE 2009 CS Q33 – Critical-section entry/exit are implemented with test-and-set; X starts at0. Which statements are TRUE? I. Deadlock-free. II. Starvation-free. III.…
- GATE 2015 CS (CS3) Q31 – Shared varP,varQ start false. These loops deliberately put the critical sections INSIDE the while bodies. Which property holds?
- GATE 2010 CS Q33 – Shared Boolean S1,S2 start with arbitrary values. P1 waits while S1==S2, enters its critical section, then assigns S1=S2. P2 waits while S1!=S2,…
- GATE 2010 CS Q55 – Binary semaphores S0,S1,S2 start at 1,0,0. Concurrent processes execute: How many times is zero printed?
- GATE 2013 CS Q44 – x initially zero is shared by W,X,Y,Z. Each process waits on counting semaphore S=2, reads x, computes and stores its update, signals S and…
- GATE 2013 CS Q49 – X computes a[i]=f(i), then ExitX(R,S), for i=0,…,n−1. Y calls EntryY(R,S), then computes b[i]=g(a[i]), for each i. R,S are binary semaphores initially…
- GATE 2012 CS Q42 – Fetch And Add(L,i) atomically returns old L and increments L by i. Shared unsigned L initially zero means unlocked; nonzero means locked. Assess this…
- GATE 2016 CS (CS2) Q58 – Shared turn starts at zero. Process 0 waits while turn == 1, enters its critical section, then sets turn = 1. Process 1 waits while turn == 0, enters…
- GATE 2016 CS (CS2) Q59 – A nonnegative counting semaphore S uses P (decrement, blocking if unavailable) and V (increment). During execution twenty P and twelve V operations…
- GATE 2014 CS (CS2) Q41 – Producer–consumer uses semaphores n = 0 and s = 1. producer: repeat forever produce(); semWait(s); addToBuffer(); semSignal(s); semSignal(n);…
- GATE 2016 CS (CS1) Q60 – Consider the following proposed solution for the critical section problem. There are n processes: P 0 P n-1. In the code, function `pmax` returns an…
- GATE 2015 CS (CS1) Q30 – The following two functions `P1` and `P2` that share a variable `B` with an initial value of 2 execute concurrently. The number of distinct values…
- GATE 2018 CS Q50 – Consider the following solution to the producer-consumer synchronization problem. The shared buffer size is N. Three semaphores empty, full and mutex…
- GATE 2019 CS Q33 – Consider three concurrent processes P1, P2 and P3 as shown below, which access a shared variable D that has been initialized to 100. P1 P2 P3 --- ---…
- GATE 2026 CS (CS2) Q51 – Consider three processes P 1, P 2, and P 3 running identical code shown below. A and B are binary semaphores initialized to 1 and 0, respectively. X…
- GATE 2024 CS (CS2) Q46 – Consider a multi-threaded program with two threads T1 and T2 sharing semaphores s1 (initialized to 1) and s2 (initialized to 0) and a global variable…
- GATE 2024 CS (CS1) Q40 – Two threads T1 (a=a+1; b=b+1;) and T2 (b=2*b; a=2*a;) update shared variables a and b, initially a=b=1. Each statement is atomic. Which option lists…
- GATE 2023 CS Q38 – Consider the two functions incr and decr shown below. There are 5 threads each invoking incr once, and 3 threads each invoking decr once, on the same…
- GATE 2022 CS Q19 – Consider the following threads, T1, T2, and T3 executing on a single processor, synchronized using three binary semaphore variables, S1, S2, and S3,…
- GATE 2021 CS (CS1) Q56 – Consider the following pseudocode, where S is a semaphore initialized to 5 in line#2 and counter is a shared variable initialized to 0 in line#1.…
- GATE 2020 CS Q44 – Each of a set of n processes executes the following code using two semaphores a and b initialized to 1 and 0, respectively. Assume that count is a…