Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Self doubt -OS-FORK()
Warrior
asked
in
Operating System
Nov 10, 2018
1,356
views
1
vote
1
vote
operating-system
fork-system-call
Warrior
asked
in
Operating System
Nov 10, 2018
by
Warrior
1.4k
views
answer
comment
Follow
share this
share
4 Comments
Show 4 previous comments
by
Shaik Masthan
commented
Nov 11, 2018
reply
Follow
share this
The order of execution of processes are not unique, i mean they can execute in any manner.
but there should be 2-A's and 4-B's and 8-C's in the result.
5
5
by
Warrior
commented
Nov 11, 2018
reply
Follow
share this
@
Shaik Masthan
thank you. I got it.
0
0
by
Mk Utkarsh
commented
Nov 26, 2018
reply
Follow
share this
which test series is this?
0
0
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
2
Answers
1
vote
1
vote
In first fork() call no of process is 2 - AA is printed
In second fork() call no of process is 2^2 - BBBB is printed
In third fork() call no of process is 2^3 - CCCCCCCC is printed
Ans is D.
Shailendra_
answered
Aug 25, 2019
by
Shailendra_
comment
Follow
share this
0 Comments
Please
log in
or
register
to add a comment.
0
votes
0
votes
Answer is D . AA BBBB CCCCCCCC
Sanandan
answered
Aug 28, 2020
by
Sanandan
comment
Follow
share this
0 Comments
Please
log in
or
register
to add a comment.
← Previous
Next →
← Previous in category
Next in category →
Related questions
11
votes
11
votes
3
answers
1
Kaluti
asked
in
Operating System
Aug 20, 2017
1,369
views
self doubt OS fork()
find total no of processes i am getting 29 as answer as all will be child process except one parent process plz explain how answer is 24 here i am very confused in such question by drawing diagram #include<stdio.h> #include<stdlib.h> int main(void) { pid_t pid = fork(); pid = fork(); pid = fork(); if(pid == 0) { fork(); } fork(); return 0; }
Kaluti
asked
in
Operating System
Aug 20, 2017
by
Kaluti
1.4k
views
fork-system-call
operating-system
0
votes
0
votes
1
answer
2
abhinowKatore
asked
in
Operating System
Jan 13, 2023
1,396
views
Fork() | OS
int doWork(){ fork(); fork(); printf("Hello world!\n"); } int main() { doWork(); printf("Hello world!\n"); exit(0); }
abhinowKatore
asked
in
Operating System
Jan 13, 2023
by
abhinowKatore
1.4k
views
fork-system-call
operating-system
1
vote
1
vote
0
answers
3
Souvik33
asked
in
Operating System
Nov 28, 2022
779
views
Fork System Call and Threads | OS | MSQ
MSQ Consider the following statements, which one of the following is/are TRUE In fork() system call, child process inherits all the open file descriptors of parent process In fork() system call, child process copies the code of the ... system call, child process shares the code of the parent process User level threads shares the code segment of the process
Souvik33
asked
in
Operating System
Nov 28, 2022
by
Souvik33
779
views
operating-system
fork-system-call
unix
process-and-threads
threads
multiple-selects
1
vote
1
vote
2
answers
4
junaid ahmad
asked
in
Operating System
Jan 1, 2019
1,515
views
OS FORK---OUTPUT
int main(void) { int var1=100; int pid; if(pid==fork()) var1=200; fork(); printf("%d",var1); return 0; } what could be the output ? a)100 100 200 200 b)200 200 200 200 c)none
junaid ahmad
asked
in
Operating System
Jan 1, 2019
by
junaid ahmad
1.5k
views
operating-system
fork-system-call
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy