Question

In: Computer Science

This is a multiple answer question. Meaning any number of the four could be true. This...

This is a multiple answer question. Meaning any number of the four could be true. This is from an O/S class

We discussed in class the ability to create new processes in a Linux environment by way of the fork() function. What is true about this function?

fork() takes a parameter which is the priority of the process that is going to be created

It spawns a new process that is a child of the calling process. The child process is its own, unique process and shares nothing with the parent. The two processes are seen as equal and have no interaction with each other.

The function has a return value.

-1 if the function failed to create a new process

0 if we are in the child process that was created

a positive integer if we are the in the parent. The positive integer reflects the process ID of the newly created process.

fork() allows you to create handlers for the new process during the creation

Solutions

Expert Solution

Answer:

False statements:

fork() takes a parameter which is the priority of the process that is going to be created.

(Because it takes no parameters and returns an integer value).

It spawns a new process that is a child of the calling process. The child process is its own, unique process and shares nothing with the parent. The two processes are seen as equal and have no interaction with each other.

(Separate address space for the child will be created with exact copy of all the memory segments from the parent process. Hence, if the child process want to know the process id of parent process then the parent process can store its id in a variable before forking a process. Hence both the processes can have process-ids of each other in case they want to interact with each other thru inter process communication.)

fork() allows you to create handlers for the new process during the creation.

(Because this is the work of clone() method.The function clone() creates a new child process which shares memory, file descriptors and signal handlers with the parent. It implements threads and thus launches a function as a child. )

True statements are as follows:

The function has a return value.-1 if the function failed to create a new process 0 if we are in the child process that was created a positive integer if we are the in the parent. The positive integer reflects the process ID of the newly created process.

Please give thumbsup, if you like it. Thanks.


Related Solutions

This is a multiple answer question, meaning any of the 4 statements could be true. From...
This is a multiple answer question, meaning any of the 4 statements could be true. From O/S class A semaphore, in its purest form (like the one we used in the Dining Philosopher's solution), is what A busy waiting lock. An atomic integer that has two functions it can use - one that increments it by 1 and one that decrements it by 1. A Monitor An atomic integer that can be changed to any value from any other value...
I do not understand this question could someone please answer and give meaning to this question....
I do not understand this question could someone please answer and give meaning to this question. MHC6305 Finanical Management. Compare and contrast cash accounting methodology and accrual accounting methodology in order to illustrate how each best works for different types of companies.
QUESTION 4 Multiple Answer Select the answers that are true A taxpayer who files an innocent...
QUESTION 4 Multiple Answer Select the answers that are true A taxpayer who files an innocent spouse claim has a right to bring a petition to the Tax Court. A CT taxpayer submits his/her petition to tax court at an address located in Hartford CT If a taxpayer qualifies for S case forum, he cannot choose the regular tax court forum. If a taxpayer contests a collection matter (example levy), it will be known as a CDP, collection due process...
Dear All, Could you please answer the below question and kindly if there are any further...
Dear All, Could you please answer the below question and kindly if there are any further links regarding the similar assignment, kindly send it and this assignment is 2500 word long, I will kindly appreciate a long answer. "Conduct a comprehensive evaluation of a recently reported corporate event relating to the change in the capital structure of companies Conduct a comprehensive evaluation of a recently reported corporate event relating to the change in the capital structure of companies" Thank you!
Answer the following question: a) Explain in details any four differences between perpetual and periodic inventory...
Answer the following question: a) Explain in details any four differences between perpetual and periodic inventory method. b) What are the challenges faced by store manager in doing physical inventory count? c) What are the problems faced in determining the ownership of inventory? How would solve such problem? b) How petty cash expenses are different from other expenses?
Answer the following statements as true or false, then select the correct multiple -choice answer:   1.   If...
Answer the following statements as true or false, then select the correct multiple -choice answer:   1.   If dividends are declared during the year the company would close the dividend account by debiting retained          earnings and crediting the dividend account.   2.   A company that forgets to recognize depreciation for the year understates its income and assets.   3.   Prepaid insurance expense will have a zero balance on the after closing trial balance.   4.   Retained earnings on an adjusted trial balance is the beginning retained earnings for...
The four types of language ‘meanings’ are semantic meaning, perceptual meaning, syntactic meaning, and pragmatic meaning....
The four types of language ‘meanings’ are semantic meaning, perceptual meaning, syntactic meaning, and pragmatic meaning. Define each and talk about how/why these 4 meanings are different. Minimum of 250 words. Be sure to use information from the textbook and at least 2 other Virtual Library resources to support or expand on your writing.
Which of the following statements about "meaning" is true? A) Group of answer choices B) Point...
Which of the following statements about "meaning" is true? A) Group of answer choices B) Point of view is synonymous with meaning. C) Setting and action are unrelated to meaning in a story ENglish 1302 D) The subject of a story states its meaning E) Meaning is made up of separate themes
Question 3 This question could have multiple correct answers, select all that apply. Which of the...
Question 3 This question could have multiple correct answers, select all that apply. Which of the following statements are true about a typical histogram. It is used in descriptive statistics. It is used to summarize variable distributions. It can be used for numerical, ordinal, and nominal data. Its shape will tell you about what summary statistics should be calculated.
A multiple -choice test question has four possible responses. The question is designed to be very...
A multiple -choice test question has four possible responses. The question is designed to be very difficult, with none of the four responses being obviously wrong, yet with only one correct answer. It first occurs on an exam taken by 400 stude nts. The designers test whether more people answer the question correctly than would be expected just due to chance (i.e., if everyone randomly guessed the correct answer). a) Set up the hypotheses for the test. b) Of the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT