Explore BrainMass
Share

Signals

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

When a child process is fork()ed, a parent may wait for the successful completion of the child via the wait() service (or one of its variants) so that the return result of that application can be read from the process descriptor block.

If the parent does not perform a wait() operation on the child process after it terminates, Unix will keep the process descriptor block active for this application in hopes that eventually the parent will wait() or that the parent will itself terminate.

If you perform the ps command in this scenario, you may find a number of "zombie" processes - these are processes marked with a Z in the output of ps that are children of a currently running parent that hasn't yet waited upon their completion. Normally, this isn't much of a problem, as eventually, the parent will terminate and cause the zombie tasks to be deallocated.

However, in a server application such as the email database server above, this becomes a problem, as the server generally never terminates, and as a result, the system list of process descriptor blocks becomes cluttered by zombies (processes that have properly terminated by haven't been waited upon by the parent).
To avoid this problem, Unix ensures that a terminating child application can send a signal to the parent indicating that it has terminated (SIG_CHILD). The parent should catch this signal, and issue a wait() or one of its variants to clean up the zombied process descriptor block.

For this question, describe the concept of a signal, and indicate how the parent application can be configured to act upon the SIG_CHILD signal from each child as they terminate to avoid the zombie issue.
In your answer, discuss the OS services that Unix provides to support signal processing.

© BrainMass Inc. brainmass.com October 24, 2018, 8:48 pm ad1c9bdddf
https://brainmass.com/computer-science/interrupts/concept-signal-108022

Solution Preview

1. Signals are various notifications sent to a process in order to notify it of various "important" events. By their nature, they interrupt whatever the process is doing at this minute, and force it to handle them immediately. Each signal has an integer number that represents it (1, 2 and so on), as well as a symbolic name that is usually defined in the file ...

Solution Summary

Describe the concept of a signal, and indicate how the parent application can be configured to act upon the SIG_CHILD signal from each child as they terminate to avoid the zombie issue.

$2.19
See Also This Related BrainMass Solution

Basic 1D signal presentation and plotting in MATLAB

Include answers for Problems and include MATLAB coding along with any output plots that support solutions

1. The input-output equation characterizing an amplifier that saturates once the input reaches certain values is:

(see attached file for equations)

Where x(t) is the input and y(t) the output.

a. Plot the relation between the input x(t) and the output y(t). Is this a linear system? For what range of input values is the system linear, if any?

b. Suppose the input is a sinusoid x(t) = 20 cos(2t)u(t), carefully plot x(t) and y(t) for t = -2 to 4.

2. The following op-amp circuit is used to measure the changes of temperature in a system. The output voltage is given by:

Suppose that the temperature in the system changes cyclically after t = 0, so that:

Let the input be Vi(t) = 1 volt.

a. If the switch closes at t0 = 0 msec., plot the output voltage V01(t) for 0≤t≤0.2 sec. in time-intervals of 0.01 sec.

b. If the switch closes at t0 = 50 msec., plot the output voltage V01(t) for 0≤t≤0.2 sec. in time-intervals of 0.01 sec.


3. A zener diode is such that the output corresponding to an input Vs(t) = cos(t) is a "clipped" sinusoid

(see attached file for equations)

Use MATLAB to generate the input and output signals and plot them in the same plot for 0≤t≤4 at time intervals of 0.001.

a. Is this system linear? Compare the output obtained from Vs(t) with that obtained from 0.3 Vs(t).

View Full Posting Details