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
Importance of project risk management
kkurt [141]
You must spread your risks out like don’t put all your eggs in one basket... don’t rely on on thing because is it goes downhill you have no backup
5 0
4 years ago
Why would Network Systems employees be employed by the government?
Ghella [55]
Well knowing how the government is with security id go with A. as it makes a lot of sense unlike B and D and if they were looking for software the question would mention it
8 0
3 years ago
Read 2 more answers
Preliminaries
Ratling [72]

Answer:

okahsb

Explanation:

8 0
3 years ago
What is known as networking in the IT field?
Sidana [21]

Answer:

r u Kate tell me plz I love u baby tell me please

4 0
3 years ago
A good website design combines which of the following elements? (select all that apply) powerful web server hardware components
Anarel [89]

Sounds like it'd be all of the above.


7 0
3 years ago
Read 2 more answers
Other questions:
  • What is wearable technology? Provide at least one example
    13·2 answers
  • With network management software, a network manager can ____.
    6·1 answer
  • When powering off your computer is best down using?
    8·2 answers
  • The picture that graphically represents the items you use in Windows is called a/an <br> ___?
    14·1 answer
  • Fill in the blank with the correct response.
    5·2 answers
  • Explain mechanical computer ,electromechanical and electronic computer with example<br>​
    11·1 answer
  • Anybody wanna be friends?
    10·2 answers
  • In Tynker, it is not possible to create a/an __________.
    6·2 answers
  • 20 POINTS! Which music making software is better? Ableton Live or Logic Pro? Name the advantages and disadvantages of each one!
    7·2 answers
  • How does a security information and event management system (SIEM) in a SOC help the personnel fight against security threats
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!