Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged fork-system-call
4
4 votes
2
2 answers
389
389 views
GO Classes DPP | GATE CS | Operating System | Fork System Call
Consider the following C program. Assume that every $\texttt{fork()}$ call succeeds.int main(void) { unsigned long int i; for (i = 0; i < 6; i++) if (fork() >= 0) continu...
GO Classes
389
views
asked
Jul 15
Operating System
goclasses
goclasses-cs-dpp
operating-system
goclasses-cs-dpp-day-323
goclasses-os-practice-questions
fork-system-call
+
–
2
2 votes
1
1 answer
254
254 views
GO Classes DPP | GATE CS | Operating System | Fork System Call
Assume that every $\texttt{fork()}$ call succeeds.int main() { int a = 0; int rc = fork(); a++; if (rc == 0) { rc = fork(); a++; } else { a++; } printf("a is %d\n", a); }...
GO Classes
254
views
asked
Jul 15
Operating System
goclasses
goclasses-cs-dpp
operating-system
goclasses-cs-dpp-day-323
goclasses-os-practice-questions
fork-system-call
+
–
2
2 votes
1
1 answer
246
246 views
GO Classes DPP | GATE CS | Operating System | Fork System Call
Assume that every $\texttt{fork()}$ call succeeds.int main() { int pid; pid = fork() && fork(); if (!pid) printf("A\n"); else printf("B\n"); return 0; }How many times are...
GO Classes
246
views
asked
Jul 15
Operating System
goclasses
goclasses-cs-dpp
operating-system
goclasses-cs-dpp-day-323
goclasses-os-practice-questions
fork-system-call
+
–
4
4 votes
1
1 answer
231
231 views
GO Classes DPP | GATE CS | Operating System | Fork System Call
Consider the following program. Assume that every $\texttt{fork()}$ call succeeds.int main() { int p1 = 1, p2 = 2, p3 = 3; p1 = fork(); if (p2 0) p2 = fork(); if (p1 0)...
GO Classes
231
views
asked
Jul 15
Operating System
goclasses
goclasses-cs-dpp
operating-system
goclasses-cs-dpp-day-323
goclasses-os-practice-questions
fork-system-call
numerical-answers
+
–
4
4 votes
2
2 answers
224
224 views
GO Classes DPP | GATE CS | Operating System | Fork System Call
Consider the following C program. When the execution reaches line $5$, how many processes and threads, respectively, exist in the process hierarchy?int main() { int i; fo...
GO Classes
224
views
asked
Jul 15
Operating System
goclasses
goclasses-cs-dpp
operating-system
goclasses-cs-dpp-day-323
goclasses-os-practice-questions
fork-system-call
+
–
3
3 votes
1
1 answer
239
239 views
GO Classes DPP | GATE CS | Operating System | Fork System Call
Consider the following statement:After $\texttt{fork()}$, the child’s standard input, standard output, and standard error are reset to their default states.True False
GO Classes
239
views
asked
Jul 14
Operating System
goclasses
goclasses-cs-dpp
operating-system
goclasses-cs-dpp-day-322
goclasses-os-practice-questions
fork-system-call
+
–
4
4 votes
2
2 answers
258
258 views
GO Classes DPP | GATE CS | Operating System | Fork System Call
Assume that every $\texttt{fork()}$ call succeeds.int value = 0; int main() { fork(); value++; fork(); value++; if (fork() == 0) printf("Child\n"); else printf("Parent\n"...
GO Classes
258
views
asked
Jul 14
Operating System
goclasses
goclasses-cs-dpp
operating-system
goclasses-cs-dpp-day-322
goclasses-os-practice-questions
fork-system-call
+
–
3
3 votes
1
1 answer
190
190 views
GO Classes DPP | GATE CS | Operating System | Process-State Transitions
ssume that the process priorities are $X Y Z$.Process $X$ is initially running. $X$ creates process $Y$ using $\texttt{fork()}$. $X$ requests a disk operation and becom...
GO Classes
190
views
asked
Jul 14
Operating System
goclasses
goclasses-cs-dpp
operating-system
goclasses-cs-dpp-day-322
goclasses-os-practice-questions
fork-system-call
+
–
5
5 votes
2
2 answers
236
236 views
GO Classes DPP | GATE CS | Operating System | Fork System Call
Assuming that no error occurs, which statement about $\texttt{fork()}$ is correct?It is called once and returns once. It is called once and returns twice. It is called on...
GO Classes
236
views
asked
Jul 14
Operating System
goclasses
goclasses-cs-dpp
operating-system
goclasses-cs-dpp-day-322
goclasses-os-practice-questions
fork-system-call
+
–
3
3 votes
1
1 answer
185
185 views
GO Classes DPP | GATE CS | Operating System | Fork System Call
When a process creates a child using $\texttt{fork()}$, which of the following is shared between the parent and child?Stack Heap Shared-memory segments All of the above
GO Classes
185
views
asked
Jul 14
Operating System
goclasses
goclasses-cs-dpp
operating-system
goclasses-cs-dpp-day-322
goclasses-os-practice-questions
fork-system-call
+
–
7
7 votes
1
1 answer
281
281 views
GO Classes DPP | GATE CS | Operating System | Fork System Call
When a child process is created using the $\texttt{fork()}$ system call, its state is set to running.True False
GO Classes
281
views
asked
Jul 13
Operating System
goclasses
goclasses-cs-dpp
operating-system
goclasses-cs-dpp-day-321
goclasses-os-practice-questions
fork-system-call
+
–
17
17 votes
5
5 answers
3.1k
3.1k views
GATE CSE 2026 | Set 1 | Question: 53
Consider the following program snippet. Assume that the program compiles and runs successfully. Further, assume that the fork() system call is always successful in creati...
gatecse
3.1k
views
asked
Feb 23
Operating System
gatecse-2026-set1
numerical-answers
operating-system
fork-system-call
two-marks
+
–
1
1 vote
0
0 answers
266
266 views
Resource recommendation for Kernel mode, User mode and System call
Can anyone please give suggest some resource for studying1. System calls2. User mode and Kernel mode3. Threads.The system calls part of galvin is only 4 pages long and I ...
TanayH
266
views
asked
Dec 15, 2025
Operating System
fork-system-call
operating-system
threads
+
–
1
1 vote
2
2 answers
671
671 views
ISI2025-MCS-PCB (CS) | Question: 10
Suppose the following code is compiled, and run for different values of N .int main() { for (int i = 1; i <= N; i++) { fprintf(stderr, "OPERATING\n"); fork(); fork(); } f...
Shubham Sharma 2
671
views
asked
Jun 12, 2025
Operating System
isi2025-mcs-pcb
operating-system
fork-system-call
+
–
1
1 vote
2
2 answers
688
688 views
#operating-system #fork-system-calls
How to draw the tree diagram for these types of questions fork() calls ?1.main() { if( fork() ) { if(!fork()) { fork(); printf(" 1 "); } else { fork(); printf(" 2 "); } }...
js__
688
views
asked
Apr 18, 2025
Operating System
fork-system-call
operating-system
gate-preparation
self-doubt
general-topic-doubt
process
+
–
Page:
1
2
3
4
5
6
next »