1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marrrta [24]
3 years ago
8

Using either a UNIX or a Linux system, write a C program that forks a child process that ultimately becomes a zombie process. Th

is zombie process must remain in the system for at least 10 seconds.
Computers and Technology
1 answer:
tankabanditka [31]3 years ago
5 0

Answer:

#include <stdlib.h>

#include <sys/types.h>

#include <unistd.h>

int main()

{

// Using fork() creates child process which is  identical to parent

int pid = fork();

 // Creating the Parent process

if (pid > 0)

 sleep(10);

// And then the Child process

else

{

 exit(0);

}

 

return 0;

}

Explanation:

Using a Text editor enter the code in the Answer section and save it as zombie.c. The created process will be able to run for 10 seconds.

Now open the Terminal and type $ cc zombie.c -o zombie to compile the program which is then saved as an executable file.

With a GNU compiler run the following command ./zombie which will give you an output of the parent process and child process to be used testing.

You might be interested in
Anyone help me with number 41.
Katarina [22]
It is te = t I yhink
8 0
3 years ago
Which of Blender's editors is used to edit an animation's F-Curves?
sp2606 [1]

Answer:

A.

The Graph Editor

Explanation:

7 0
3 years ago
Read 2 more answers
Mario was surprised that the box that was supposed to tell him how many words he used in his document did not appear after the s
Nookie1986 [14]

Answer:

Click the Display tab

Explanation:

Choose the Word count option to make it visible, within the Display tab dropdown

7 0
3 years ago
Read 2 more answers
Zachary is a member of Future Business Leaders of America at his school and is competing in the Impromptu Speaking competition.
Scrat [10]

Answer:

c start off with a story

Explanation:

I just took the test

4 0
3 years ago
Read 2 more answers
Which of the following sorting algorithms is described by this text? "Take the item at index 1 and see if it is in order compare
trasher [3.6K]

Answer:

b. selection sort

b. 8 11 17 30 20 25

Explanation:

The options above are the correct answers to the given questions.

Selection sort is a simple comparison-based sorting algorithm.

selection sort. (algorithm) Definition: A sort algorithm that repeatedly searches remaining items to find the least one and moves it to its final location. The run time is Θ(n²), where n is the number of elements. The number of swaps is O(n).

It is this sorting algorithm that will best ne suitable in the given event.

7 0
3 years ago
Other questions:
  • The term ________________ denotes data that is being stored on devices like a universal serial bus (USB) thumb drive, laptop, se
    9·2 answers
  • How to do this? ICT Excel there's a screenshot attached
    6·1 answer
  • Which type of operating system requires a keyboard in order to issue commands?
    13·1 answer
  • Each tab is divided into groups of related commands or buttons. T or F
    10·1 answer
  • The arrows in this question indicated the determination of two attributes. For example, the arrow that goes ProductID to Product
    11·1 answer
  • What are the two types of electronic components
    15·2 answers
  • You've just installed a new video card in a user's Windows workstation. When the system is powered on the screen is blank. You
    10·1 answer
  • How can you categorize computer on the basic of its brands.​
    10·1 answer
  • Topic: Drivers ed 100 points and brainliest!
    9·1 answer
  • True or False: At the Company level, users will only have access to view projects to which they have been specifically granted a
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!