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
384
384 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
384
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
251
251 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
251
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
242
242 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
242
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
229
229 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
229
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
+
–
3
3 votes
2
2 answers
220
220 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
220
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
237
237 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
237
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
254
254 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
254
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
188
188 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
188
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
233
233 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
233
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
182
182 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
182
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
278
278 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
278
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
265
265 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
265
views
asked
Dec 15, 2025
Operating System
fork-system-call
operating-system
threads
+
–
1
1 vote
2
2 answers
670
670 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
670
views
asked
Jun 12, 2025
Operating System
isi2025-mcs-pcb
operating-system
fork-system-call
+
–
1
1 vote
2
2 answers
684
684 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__
684
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 »