incr() {
wait(s);
X = X + 1;
signal(s);
}
decr() {
wait(s);
X = X - 1;
signal(s);
}Related Operating Systems PYQs
Which one or more of the following need to be saved on a context switch from one thread (T1) of a process to another thread (T2) o…
Which one or more of the following options guarantee that a computer system will transition from user mode to kernel mode?
Consider the following two-dimensional array D in the C programming language, which is stored in row-major order: ```c int D[128][…
Consider a computer system with 57-bit virtual addressing using multi-level tree-structured page tables with L levels for virtual …
With respect to deadlocks in an operating system, which of the following statements is/are FALSE?
Consider a system consisting of k instances of a resource R, being shared by 5 processes. Assume that each process requires a maxi…
Free account benefits
Turn practice into measurable progress
Public PYQs and reference pages stay free. Sign in when you want GATEverse to remember what you studied and guide what to practise next.