Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Processes, Exceptions and Signals A parent process fork()ed a child process to create some large object. The child process wants to give the object

3. Processes, Exceptions and Signals

  1. A parent process fork()ed a child process to create some large object. The child process wants to give the object back to the parent. Can this easily be done by signals? If yes, say how:

    If no, say why not and give an alternative:

  2. A parent process fork()s a child process. The child continues running the same program as the parent (it does not do a execl() or similar system call). Is the best way that the parent can give a data structure created before the fork() to the child by writing it to a file and having the child read that file?

    If so, why? If not, why not?

  3. Let us say you write a program to measure how quick a person's fingers are by trapping SIGINT and then asking them to pressCtrl-C as rapidly as possible. The SIGINT signal handler increments a global counter every time Ctrl-C is typed. After a predefined time it stops and prints the global counter divided by the time used. What is a fundamental problem with this program?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

Are these written ground rules?

Answered: 1 week ago

Question

Have ground rules been established for the team?

Answered: 1 week ago

Question

a. How are members selected to join the team?

Answered: 1 week ago