Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Search results for operating-system+process
112
votes
7
answers
1
GATE CSE 2016 Set 1 | Question: 50
Consider the following proposed solution for the critical section problem. There are $n$ processes : $P_0....P_{n-1}$. In the code, function $\text{pmax}$ ... in the critical section at any time The bounded wait condition is satisfied The progress condition is satisfied It cannot cause a deadlock
Consider the following proposed solution for the critical section problem. There are $n$ processes : $P_0....P_{n-1}$. In the code, function $\text{pmax}$ returns an inte...
Sandeep Singh
47.9k
views
Sandeep Singh
asked
Feb 12, 2016
Operating System
gatecse-2016-set1
operating-system
process-synchronization
difficult
ambiguous
+
–
106
votes
8
answers
2
GATE CSE 2012 | Question: 32
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 in the pseudocode shown below to implement ... take on a non-zero value when the lock is actually available works correctly but may starve some processes works correctly without starvation
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...
gatecse
30.3k
views
gatecse
asked
Sep 26, 2014
Operating System
gatecse-2012
operating-system
process-synchronization
normal
+
–
105
votes
14
answers
3
GATE CSE 2015 Set 1 | Question: 46
Consider a uniprocessor system executing three tasks $T_{1}, T_{2}$ and $T_{3}$ each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of $3, 7$ and $20$ ... $T_{3}$ completes its execution at the end of_____________________milliseconds.
Consider a uniprocessor system executing three tasks $T_{1}, T_{2}$ and $T_{3}$ each of which is composed of an infinite sequence of jobs (or instances) which arrive peri...
makhdoom ghaya
38.6k
views
makhdoom ghaya
asked
Feb 13, 2015
Operating System
gatecse-2015-set1
operating-system
process-scheduling
normal
numerical-answers
+
–
122
votes
7
answers
4
GATE CSE 2017 Set 1 | Question: 27
A multithreaded program $P$ executes with $x$ number of threads and uses $y$ number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock $l$, then it cannot re-acquire lock $l$ without releasing ... $x = 1, y = 2$ $x = 2, y = 1$ $x = 2, y = 2$ $x = 1, y = 1$
A multithreaded program $P$ executes with $x$ number of threads and uses $y$ number of locks for ensuring mutual exclusion while operating on shared memory locations. All...
Arjun
33.6k
views
Arjun
asked
Feb 14, 2017
Operating System
gatecse-2017-set1
operating-system
process-synchronization
normal
+
–
35
votes
6
answers
5
GATE CSE 2015 Set 3 | Question: 1
The maximum number of processes that can be in $\textit{Ready}$ state for a computer system with $n$ CPUs is : $n$ $n^2$ $2^n$ Independent of $n$
The maximum number of processes that can be in $\textit{Ready}$ state for a computer system with $n$ CPUs is :$n$$n^2$$2^n$Independent of $n$
go_editor
30.7k
views
go_editor
asked
Feb 14, 2015
Operating System
gatecse-2015-set3
operating-system
process-scheduling
easy
+
–
57
votes
10
answers
6
GATE CSE 2007 | Question: 58
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) { wants1 = true; while (wants2 == true); /* Critical ... waiting. It requires that processes enter the critical section in strict alteration. It does not prevent deadlocks, but ensures mutual exclusion.
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) { wa...
Kathleen
28.0k
views
Kathleen
asked
Sep 21, 2014
Operating System
gatecse-2007
operating-system
process-synchronization
normal
+
–
51
votes
14
answers
7
GATE CSE 1997 | Question: 6.8
Each Process $P_i, i = 1\ldots 9$ is coded as follows repeat P(mutex) {Critical section} V(mutex) forever The code for $P_{10}$ is identical except it uses V(mutex) in place of P(mutex). What is the largest number of processes that can be inside the critical section at any moment? $1$ $2$ $3$ None
Each Process $P_i, i = 1\ldots 9$ is coded as followsrepeat P(mutex) {Critical section} V(mutex) foreverThe code for $P_{10}$ is identical except it uses V(mutex) in plac...
Kathleen
25.4k
views
Kathleen
asked
Sep 29, 2014
Operating System
gate1997
operating-system
process-synchronization
normal
+
–
115
votes
6
answers
8
GATE CSE 2013 | Question: 39
A certain computation generates two arrays a and b such that $a[i] = f(i)$ for $0 \leq i < n$ and $b[i] = g(a[i])$ for $0 \leq i < n$. Suppose this computation is decomposed into two concurrent processes $X$ and $Y$ such that $X$ computes the array $a$ and $Y$ computes the ... EntryY(R, S) { V(S); P(R); } ExitX(R, S) { V(R); P(S); } EntryY(R, S) { V(S); P(R); }
A certain computation generates two arrays a and b such that $a[i] = f(i)$ for $0 \leq i < n$ and $b[i] = g(a[i])$ for $0 \leq i < n$. Suppose this computation is decompo...
Arjun
28.7k
views
Arjun
asked
Sep 24, 2014
Operating System
gatecse-2013
operating-system
process-synchronization
normal
+
–
61
votes
6
answers
9
GATE CSE 2010 | Question: 45
The following program consists of $3$ concurrent processes and $3$ binary semaphores. The semaphores are initialized as $S0=1, S1=0$ and $S2=0.$ ... $P0$ print '$0$'? At least twice Exactly twice Exactly thrice Exactly once
The following program consists of $3$ concurrent processes and $3$ binary semaphores. The semaphores are initialized as $S0=1, S1=0$ and $S2=0.$$$\begin{array}{|l|l|}\hli...
go_editor
26.6k
views
go_editor
asked
Sep 30, 2014
Operating System
gatecse-2010
operating-system
process-synchronization
normal
+
–
75
votes
11
answers
10
GATE IT 2005 | Question: 41
Given below is a program which when executed spawns two concurrent processes : semaphore $X : = 0 ;$ /* Process now forks into concurrent processes $P1$ & $P2$ ... (II) are true. (I) is true but (II) is false. (II) is true but (I) is false Both (I) and (II) are false
Given below is a program which when executed spawns two concurrent processes :semaphore $X : = 0 ;$/* Process now forks into concurrent processes $P1$ & $P2$ */$\begin{ar...
Ishrat Jahan
24.3k
views
Ishrat Jahan
asked
Nov 3, 2014
Operating System
gateit-2005
operating-system
process-synchronization
normal
+
–
92
votes
4
answers
11
GATE CSE 2003 | Question: 77
A uni-processor computer system only has two processes, both of which alternate $10$ $\text{ms}$ CPU bursts with $90$ $\text{ms}$ I/O bursts. Both the processes were created at nearly the same time. The I/O of both processes ... Static priority scheduling with different priorities for the two processes Round robin scheduling with a time quantum of $5$ $\text{ms}$
A uni-processor computer system only has two processes, both of which alternate $10$ $\text{ms}$ CPU bursts with $90$ $\text{ms}$ I/O bursts. Both the processes were crea...
Kathleen
19.9k
views
Kathleen
asked
Sep 17, 2014
Operating System
gatecse-2003
operating-system
process-scheduling
normal
+
–
43
votes
5
answers
12
GATE CSE 2006 | Question: 64
Consider three processes (process id $0$, $1$, $2$ respectively) with compute time bursts $2$, $4$ and $8$ time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF) scheduling algorithm. In LRTF ties are broken by ... the process with the lowest process id. The average turn around time is: $13$ units $14$ units $15$ units $16$ units
Consider three processes (process id $0$, $1$, $2$ respectively) with compute time bursts $2$, $4$ and $8$ time units. All processes arrive at time zero. Consider the lon...
Rucha Shelke
25.2k
views
Rucha Shelke
asked
Sep 26, 2014
Operating System
gatecse-2006
operating-system
process-scheduling
normal
+
–
61
votes
9
answers
13
GATE CSE 2013 | Question: 34
A shared variable $x$, initialized to zero, is operated on by four concurrent processes $W, X, Y, Z$ as follows. Each of the processes $W$ and $X$ reads $x$ from memory, increments by one, stores it to memory, and then terminates. Each of the ... initialized to two. What is the maximum possible value of $x$ after all processes complete execution? $-2$ $-1$ $1$ $2$
A shared variable $x$, initialized to zero, is operated on by four concurrent processes $W, X, Y, Z$ as follows. Each of the processes $W$ and $X$ reads $x$ from memory, ...
Arjun
22.9k
views
Arjun
asked
Sep 24, 2014
Operating System
gatecse-2013
operating-system
process-synchronization
normal
+
–
21
votes
5
answers
14
GATE CSE 2023 | Question: 17
Which one or more of the following $\text{CPU}$ scheduling algorithms can potentially cause starvation? First-in First-Out Round Robin Priority Scheduling Shortest Job First
Which one or more of the following $\text{CPU}$ scheduling algorithms can potentially cause starvation?First-in First-OutRound RobinPriority SchedulingShortest Job First
admin
14.9k
views
admin
asked
Feb 15, 2023
Operating System
gatecse-2023
operating-system
process-scheduling
multiple-selects
1-mark
+
–
60
votes
7
answers
15
GATE CSE 2006 | Question: 65
Consider three processes, all arriving at time zero, with total execution time of $10$, $20$ and $30$ units, respectively. Each process spends the first $\text{20%}$ of execution time doing I/O, the next $\text{70%}$ ... percentage of time does the CPU remain idle? $\text{0%}$ $\text{10.6%}$ $\text{30.0%}$ $\text{89.4%}$
Consider three processes, all arriving at time zero, with total execution time of $10$, $20$ and $30$ units, respectively. Each process spends the first $\text{20%}$ of e...
Rucha Shelke
32.0k
views
Rucha Shelke
asked
Sep 26, 2014
Operating System
gatecse-2006
operating-system
process-scheduling
normal
+
–
45
votes
6
answers
16
GATE CSE 2010 | Question: 23
Consider the methods used by processes $P1$ and $P2$ for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables $S1$ and $S2$ ... ? Mutual exclusion but not progress Progress but not mutual exclusion Neither mutual exclusion nor progress Both mutual exclusion and progress
Consider the methods used by processes $P1$ and $P2$ for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables...
go_editor
18.1k
views
go_editor
asked
Sep 29, 2014
Operating System
gatecse-2010
operating-system
process-synchronization
normal
+
–
40
votes
4
answers
17
GATE CSE 2019 | Question: 41
Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below: ... Time First scheduling algorithm. If the average waiting time of the processes is $1$ millisecond, then the value of $Z$ is _____
Consider the following four processes with arrival times (in milliseconds) and their length of CPU bursts (in milliseconds) as shown below:$$\begin{array}{|c|c|c|c|c|} \h...
Arjun
29.3k
views
Arjun
asked
Feb 7, 2019
Operating System
gatecse-2019
numerical-answers
operating-system
process-scheduling
2-marks
+
–
104
votes
6
answers
18
GATE CSE 2006 | Question: 61
The atomic fetch-and-set $x, y$ instruction unconditionally sets the memory location $x$ to $1$ and fetches the old value of $x$ in $y$ without allowing any intervening access to the memory location $x$ ... a pair of normal load/store can be used The implementation of $V$ is wrong The code does not implement a binary semaphore
The atomic fetch-and-set $x, y$ instruction unconditionally sets the memory location $x$ to $1$ and fetches the old value of $x$ in $y$ without allowing any intervening a...
Rucha Shelke
27.8k
views
Rucha Shelke
asked
Sep 26, 2014
Operating System
gatecse-2006
operating-system
process-synchronization
normal
+
–
63
votes
5
answers
19
GATE CSE 2013 | Question: 10
A scheduling algorithm assigns priority proportional to the waiting time of a process. Every process starts with zero (the lowest priority). The scheduler re-evaluates the process priorities every $T$ time units and decides the next process ... is equivalent to the shortest-job-first algorithm. This algorithm is equivalent to the shortest-remaining-time-first algorithm.
A scheduling algorithm assigns priority proportional to the waiting time of a process. Every process starts with zero (the lowest priority). The scheduler re-evaluates th...
Arjun
28.9k
views
Arjun
asked
Sep 23, 2014
Operating System
gatecse-2013
operating-system
process-scheduling
normal
+
–
16
votes
2
answers
20
GATE CSE 2022 | Question: 32
Consider four processes $\text{P, Q, R,}$ and $\text{S}$ scheduled on a $\text{CPU}$ as per round robin algorithm with a time quantum of $4\text{ units.}$ The processes arrive in the order $\text{P, Q, R, S,}$ all at time $\text{t = 0}.$ ... $\text{P = 4, Q = 12, R = 5, S = 4}$ $\text{P = 3, Q = 7, R = 7, S = 3}$
Consider four processes $\text{P, Q, R,}$ and $\text{S}$ scheduled on a $\text{CPU}$ as per round robin algorithm with a time quantum of $4\text{ units.}$ The processes a...
Arjun
10.8k
views
Arjun
asked
Feb 15, 2022
Operating System
gatecse-2022
operating-system
process-scheduling
round-robin-scheduling
2-marks
+
–
Page:
1
2
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register