1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Olegator [25]
3 years ago
6

Consider the following code segment. How many unique new (do not count the starting process) processes are created? (you may wan

t to supply some reasoning/diagram )
pid = fork();
if (pid >= 0) // pid greater than or equal to zero
fork();
fork()
Computers and Technology
1 answer:
valkas [14]3 years ago
3 0

The number of unique processes that are created is in the original process, you get the PID of the child process. In the child process, you get 0.

<h3>What is a Code Segment?</h3>

This refers to the portion of an object file that is in the virtual space of a computer that contains executable instructions.

Hence, we can note that since PID >= 0, then there would be the creation of two identical processes in which the original process returns the PID of the child process, and the output in the child process would be zero.

If we make use of a canonical tag,

p = fork();\\if (0 == p)

{

   // We're the child process

}

else if (p > 0)

{

   // We're the parent process

}

else

{

   // We're the parent process, but the child couldn't be created

}

Read more about code segments here:

brainly.com/question/25781514

#SPJ1

You might be interested in
List three things that scientists learned about earth beginning in the 1800s
Nataly [62]
They learned the earth was much older than they had previously thought.
Gradual processes changed the earth's surface.
Fossils could tell the age they came from.
8 0
4 years ago
A computerized spreadsheet program is useful for
Vaselesa [24]
Its c storing and charting data from surveys
6 0
4 years ago
Read 2 more answers
In Microsoft Word, when you highlight existing text you want to replace, you're in <br>     
IRISSAK [1]
You are in a formatting toolbar.
5 0
4 years ago
Read 2 more answers
IN C++ PLEASE!!! Read integers from input and store each integer into a vector until -1 is read. Do not store -1 into the vector
ololo11 [35]
#include
#include
using namespace std;

int main(){

int input[] = {-19, 34, -54, 65, -1};
std::vector voutput:
std::vector vinput (input, input + sizeof(input) / sizeof(int) );

for (std::vector::iterator it = vinput.begin(); it != vinput.end(); ++it)
if(*it > 0) voutput.insert(voutput.begin(), *it);
for(std::vector::iterator it = voutput.begin(); it < voutput.end(); ++it)
std::cout << *it << ‘\n’ ;

return 0;
}
6 0
3 years ago
A <br> is usually written in block style with the body text aligned along the left margin.
Fiesta28 [93]

Answer:

can you give the question and the rest of the answers? (if possible)

Explanation:

i dont really get it, are you answering a question or something?

7 0
3 years ago
Read 2 more answers
Other questions:
  • Which part of color theory deals with how colors on a web page relate to each other?
    11·2 answers
  • using unsafe sites may be a. harmful to your computer c. okay as long as you don���t leave any personal information b. okay as l
    9·2 answers
  • Create a query that will list all technician names, employee numbers, and year hired in order by year hired (Newest to Oldest).
    5·1 answer
  • if your computer is frozen, what is something you would do to troubleshoot the problem? A. check if the monitor is plugged in B.
    15·2 answers
  • Maia notices that her paragraphs are too close to one another. She wants to increase the space. Which arrangement of steps does
    6·2 answers
  • Design a ROM of size 64X8 bit in VHDL. Your ROM takes as input an address and a clock and output the content of the ROM at the c
    7·1 answer
  • Which of the following SNSs has been associated with art work display?
    14·2 answers
  • .input devices are pieces of equipment that are used to put data into the computer true or false​
    13·1 answer
  • Hubs connect network hosts in which configuration?
    7·1 answer
  • What report indicates where users start or exit the conversion funnel?.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!