Question 1 Sample Run Sav Write a program in C which first initializes $./question1 [Increasing] an integer variable to a random value Variable: 188 between 100 and 200. By using signal() Variable: 198 system call for SIGINT, alter the behaviour CTRL-C [Decreasing] of Ctrl-C such that whenever this variable: 188 combination is pressed, the program Variable: 178 Variable: 168 switches between adding or subtracting 10 CTRL-O from this variable in an endless loop with 1 [Increasing] Variable: 178 second delays. Your program must indicate Variable: 188 whether it is increasing or decreasing the variable: 198 variable and it must end if value of the Variable: 208 variable is below 100 or above 200. as well. Parent should display process ID's Question 2 Write a C program which creates a child of both child processes and terminate only process. This child process must write after both of them are terminated. 1.000.000 random integers to a text file, each seperated by one space character and Sample Run then terminate. Parent process must wait $ ./question2 for this child process to terminate, then tCHILD1] Wrote 1000000 integers to create an another child process. This new numbers.txt, terminating. child process must count how many of the !PARENT] Child process ÏD: 22679 numbers in the text file are even and how numbers: 317278, terminating. [PARENT] Child process ID: 22678 [CHILD2] Even numbers: 682722, odd many of them are odd and then terminate [PARENT] Terminating.
Question 1 Sample Run Sav Write a program in C which first initializes $./question1 [Increasing] an integer variable to a random value Variable: 188 between 100 and 200. By using signal() Variable: 198 system call for SIGINT, alter the behaviour CTRL-C [Decreasing] of Ctrl-C such that whenever this variable: 188 combination is pressed, the program Variable: 178 Variable: 168 switches between adding or subtracting 10 CTRL-O from this variable in an endless loop with 1 [Increasing] Variable: 178 second delays. Your program must indicate Variable: 188 whether it is increasing or decreasing the variable: 198 variable and it must end if value of the Variable: 208 variable is below 100 or above 200. as well. Parent should display process ID's Question 2 Write a C program which creates a child of both child processes and terminate only process. This child process must write after both of them are terminated. 1.000.000 random integers to a text file, each seperated by one space character and Sample Run then terminate. Parent process must wait $ ./question2 for this child process to terminate, then tCHILD1] Wrote 1000000 integers to create an another child process. This new numbers.txt, terminating. child process must count how many of the !PARENT] Child process ÏD: 22679 numbers in the text file are even and how numbers: 317278, terminating. [PARENT] Child process ID: 22678 [CHILD2] Even numbers: 682722, odd many of them are odd and then terminate [PARENT] Terminating.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
100%
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 2 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY