PYQBOOK
Filter Questions
Found 475 question(s)
Q161
MCQ
GATE
CS
Easy
1 Mark
2024
OS → Process Management
Which of the following process state transitions is NOT possible?
Q162
MCQ
GATE
CS
Hard
2 Marks
2024
OS → Concurrency
Consider functions incr() { wait(s); X=X+1; signal(s); } and decr() { wait(s); X=X-1; signal(s); }. There are 5 threads invoking incr and 3 threads invoking decr on a shared variable X (initial value 10). Implementation I-1 uses a binary semaphore (s=1). Implementation I-2 uses a counting semaphore (s=2). Let V1, V2 be the minimum possible values of X at the end of execution with I-1 and I-2. Which choice represents V1, V2?
Q163
MCQ
GATE
CS
Hard
2 Marks
2024
OS → Concurrency
Consider two threads T1 and T2 that update two shared variables a and b. Assume that initially a=b=1. Though context switching between threads can happen at any time, each statement of T1 or T2 is executed atomically without interruption. T1: { a=a+1; b=b+1; } T2: { b=2*b; a=2*a; } Which one of the following options lists all the possible combinations of values of a and b after both T1 and T2 finish execution?
Q164
MCQ
GATE
CS
Hard
2 Marks
2024
OS → Concurrency
Consider two threads T1 and T2 that update two shared variables a and b. Assume that initially a=b=1. Though context switching between threads can happen at any time, each statement of T1 or T2 is executed atomically without interruption. T1: { a=a+1; b=b+1; } T2: { b=2*b; a=2*a; } Which one of the following options lists all the possible combinations of values of a and b after both T1 and T2 finish execution?
Q165
NAT
GATE
CS
Easy
2 Marks
2024
OS → Secondary Storage