GATE Operating System: Concurrency and Synchronization – Previous Year Questions
11 GATE previous year questions on Concurrency and Synchronization (Operating System, Computer Science) with answers and explanations, from every paper.
- GATE 2016 CS 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 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 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…