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]
2 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]2 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
Preesure is drived quantity? why​
Marrrta [24]

Answer:

Basically, anything quantity that is not defined as one of the 7 base quantities is a derived quantity by definition. Pressure is not one of the 7 base quantities. Hence it is a derived quantity.

6 0
4 years ago
Read 2 more answers
Which of the following loop conditions will read all the data in the file assuming that each line in the file contains two integ
PSYCHO15rus [73]

Answer:

while(inFile >> intOne >> intTwo)

Explanation:

Options are missing but the line of code that does the illustration in the question is while(inFile >> intOne >> intTwo)

Considering two variables, intOne and intTwo

Suppose that a file location has been specified, the infile statement identifies file which could either be an external data or an in-stream data from which data should be read.

while(inFile >> intOne >> intTwo)

Declares a while loop, with the help of the inFile statement, values in the first column are entered into intOne while the second column are entered into intTwo through with the help of then input channel symbol (>>).

3 0
4 years ago
Assume you're using a three-button mouse. To access shortcut menus, you would
irina1246 [14]
If you are using the three-button mouse, in order to access the shortcut menus, you would right click the mouse. 
If you right click your mouse, it will show shortcut menus that can be easily accessed.
5 0
3 years ago
To what would you compare the transport layer?
GarryVolchara [31]
The above question has multiple choices as below

<span>A. Data links
B. The post office
C. Driving a car
D. A train

The answer is (B) The Post Office.

In layman’s terms, transport layer is similar to the post office functions of delivering parcels and letters at the agreed delivery deadlines. It also notices any dropped info and re-transmits it.
Just like the post office, the transport layer directs messages and information between specific end users. If by mistake you write a letter to the wrong person, the letter will be returned and the postal employee will stamp it as address unknown.

</span>
4 0
3 years ago
Which best describes how information is sent on the internet?
V125BC [204]

Answer:

a. The information is first sent via a Broadband for efficient transmission, and if not successful, only then it is resent via a Baseband that exists as a backup network as packets b. The message is first broken down into small packets before being sent, then they are

Explanation:

8 0
2 years ago
Other questions:
  • Why should spain go to Africa ​
    15·1 answer
  • Sam has installed a new CPU in a client’s computer, but nothing happens when he pushes the power button on the case. The LED on
    14·1 answer
  • What are the problems with security when working on a Web Page?
    13·2 answers
  • A cooler with heat pipes, which contain a small amount of liquid that becomes a vapor when heated, allowing heat to be drawn awa
    10·1 answer
  • A. Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter an hourly pay rate and
    8·1 answer
  • Assuming that we only support BEQ and ADD instructions, discuss how changes in the given latency of this resource affect the cyc
    7·1 answer
  • Facts and statistics collected together to be used for different purposes is
    14·1 answer
  • A computer is performing a binary search on the sorted list of 7 numbers below. What is the maximum number of iterations needed
    15·1 answer
  • Question 1
    8·1 answer
  • Bob has started a company and registered its name with the government as a private corporation. He tries to create a domain name
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!