CSC209H5 Lecture Notes - Lecture 7: Entry Point, Parent Process, Child Process

67 views3 pages

Document Summary

Csc209h5s - software programming and tools (winter 2018) 1 (or any negative value) if fork() fails. If your program fails to create another process (usually because the operating system doesn"t think you can create another process) Pid of a child for a parent process. Fork is a way for you to create a new job. Process are something that needs to be done on your os. We can"t keep reusing the same process, otherwise you would only be able to do one thing. If the jobs are runned separately and one fails, it will/shouldn"t affect the others. We won"t know which process is being executed/printed at any time. The os decides the process turns between the child process and the parent process. Consider the program below that runs without errors. In the table to the right, indicate how many times the name of each fruit is printed. int main() {

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents