Purchase Solution

Signals

Not what you're looking for?

Ask Custom Question

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.

Purchase this Solution

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.

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 ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.