Skip to content
Early access — you're among the first to try PYQLabs. Share feedback
Concept drill

synchronization

GATE CSE & IT · Synchronization · 1990-2023

23
PYQs
91%
keyed
0
elite explanations
19
years appeared

Study anchor

Galvin — Operating System Concepts

Processes, scheduling, memory, files, deadlocks

Practice action

Start latest PYQ

PYQs in this concept

All concepts →
2023 PYQ

Consider the two functions incr and decr shown below. incr() { wait(s); X = X+1; signal(s); } decr() { wait(s); X = X-1; signal(s); } There are 5 threads each invoking incr once, a...

hardanswer keybasic explanation
2022 PYQ

Consider the following threads, T 1 , T 2 and T 3 executing on a single processor, synchronized using three binary semaphore variables, S 1 , S 2 and S 3 , operated upon using stan...

mediumanswer keybasic explanation
2016 PYQ

Consider a non-negative counting semaphore $$S.$$ The operation $$P(S)$$ decrements $$S,$$ and $$V(S)$$ increments $$S.$$ During an execution, $$20$$ $$P(S)$$ operations and $$12$$...

medium
2014 PYQ

Consider the procedure below for the Producer-Consumer problem which uses semaphores: semaphore n = 0; semaphore s = 1; void producer() { while(true) { produce(); semWait(s); addTo...

mediumanswer key
2013 PYQ

Three concurrent processes X, Y, and Z execute three different code segments that access and update certain shared variables. Process X executes the P operation (i.e., wait) on sem...

mediumanswer key
2012 PYQ

Fetch_And_Add (X, i) is an atomic Read-Modify-Write instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is used...

hardanswer key
2009 PYQ

The enter_CS() and leave_CS() functions to implement critical section of a process are realized using test-and-set instruction as follows: void enter_CS(X) { while test-and-set(X)...

mediumanswer key
2008 PYQ

The P and V operations on counting semaphores, where s is a counting semaphore, are defined as follows: P(s): s = s-1; if s < 0 then wait; V(s) : s = s-1; ifs <= 0 then wakeup a pr...

mediumanswer key
2007 PYQ

Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes: /* P1 */ while(true){ want s1=true; whi...

mediumanswer key
2006 PYQ

Barrier is a synchronization construct where a set of processes synchronizes globally i.e. each process in the set arrives at the barrier and waits for all others to arrive and the...

hardanswer key
2002 PYQ

In serial data transmission, every byte of data is padded with a $$‘0’$$ in the beginning and one or two $$‘1’s$$ at the end of byte because

easyanswer key
2001 PYQ

Consider Peterson’s algorithm for mutual exclusion between two concurrent processes i and j. The program executed by process is shown below. Repeat flag[i]=true; turn=j; while (P)...

easyanswer key
2000 PYQ

Let m[0] ..m[4] be mutexes (binary semaphores) and P[0] ...P[4] be processes. Suppose each process P[i] executes the following: wait (m[i]); wait (m(m[(i+1) mod 4]))0; ....... rele...

mediumanswer key
1998 PYQ

A counting semaphore was initialized to 10. Then 6 P (wait) operations and 4 V (signal) operations were completed on this semaphore. The resulting value of the semaphore

easyanswer key
1998 PYQ

When the result of a computation depends on the speed of the processes involved there is said to be

easyanswer key
1997 PYQ

Each process P i ,i=1.....9 is coded as follows Repeat P(mutex){ critical section } V(mutex) Forever The code for P 10 is identical except that it uses V(mutex) in place of P(mutex...

mediumanswer key
1996 PYQ

A solution to the Dining Philosophers Problem which avoids deadlock is

easyanswer key
1996 PYQ

A critical section is a program segment

easyanswer key
1992 PYQ

Start and stop bits do not contain 'information' but these are used in serial communication for

easyanswer key
1992 PYQ

At a particular time of computation the value of a counting semaphore is 7. Then 20 P operations and 15 V operations were completed on this semaphore. The resulting value of the se...

easyanswer key
1991 PYQ

State whether the following statement TRUE or FALSE. The use of monitors ensures that no dead -locks will be caused.

easyanswer key
1991 PYQ

State whether the following statement TRUE or FALSE. Any implementation of a critical section requires the use of an indivisible machine instruction such as test-and-set.

easyanswer key
1990 PYQ

Semaphore operations are atomic because they are implemented within the OS

easy