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
A design tool helps you plan, evaluate, and explain your ideas to create a product. Some examples of design tools are outlines,
Leni [432]
I might be true and might not which chances are 50%
8 0
3 years ago
Describe the five components of a computer
Anna [14]

Answer:

Input, Processing, Storage, Output and Communication devices.

Explanation:

Input devices of computer are like Keyboard, Mouse, Scanner. Output devices of a computer are printers, monitors, and headphones.

There are two storages of computer one of them is REM, which can be lost if computer shutdown/closes. Data stays written on the disk until it's erased or until the storage medium fails (more on that later). An example of a communication device is the microphone.

7 0
2 years ago
What are possible consequences for cyberbullying?
BaLLatris [955]

Answer:

Possible consequences for cyber bullying include depression, isolation and illness

Explanation:

The reason for this is when a person is hurt there body tends to go through things to make them feel a certain way about things.

3 0
3 years ago
Read 2 more answers
Reggie has hired you to design a home network. The home network will share a printer but will mainly be used to stream movies to
SIZIF [17.4K]

Answer:

i think the answer is a

Explanation:

3 0
3 years ago
Mikhail is working in an IDE and needs to test a program one step at a time to find and fix errors. What tool should he use?
FromTheMoon [43]

Answer:

c) De bug ger

Explanation:

Edge 2020

8 0
3 years ago
Other questions:
  • Identifying the problem is crucial when trying to solve a problem. There are several techniques that you can use to aide you in
    5·1 answer
  • How is steering different from turning ? Need help //:
    13·1 answer
  • The __________ is the continuity of control of evidence that makes it possible to account for all that has happened to evidence
    14·2 answers
  • You type. The word "weather" when you ment "whether" when will the writer or word flag this as a misspelling or a grammar proble
    13·1 answer
  • 9.6 Code Practice: Question 1
    9·1 answer
  • With a DUI charge on a driver’s record ______________.
    10·1 answer
  • What is the best way to prevent the most common cause of network failure?
    8·2 answers
  • What is ‘Software Quality Assurance’?
    10·1 answer
  • Which navigation icon would you click on to add a new Contact?
    14·2 answers
  • Give five example of a dedicated device ​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!