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
What is imagined risk
lara31 [8.8K]
Hello there!

Imagined Risks are simply 'imaginary' risks that are created out of doubt/fear.

Hope This Helps You!
Good Luck :)
3 0
3 years ago
You are applying for a secretary position. You have many skills but which of the following would not be one to include on the ap
zepelin [54]

A. How many marathons you have run, because it doesn't relate to the job you're applying for.

6 0
3 years ago
Read 2 more answers
An author’s qualifications are important in determining whether a media source is...
geniusboy [140]

Answer:

An author's qualifications are important in determining whether a media source is;

Credible

Explanation:

In order to find out about the credibility of an author, the preface, forward, and or introduction including the book's back cover should be checked for the author's credentials, qualifications and areas where the author is an expert

The author's credential can also be checked by finding out about other books the author has written and also about the author's biography.

4 0
3 years ago
What tab on the Ribbon would you select to create a Photo Album ?
tiny-mole [99]

Answer:Go to photos and select albums, there you should see the plus sign on the top left and tap that and you should be able to create a video/photo album

Explanation:

You have to go to photos and select the blue plus sign

7 0
2 years ago
You are configuring a RAID drive for a Media Streaming Server. Your primary concern is the speed of delivery of the data. This s
babymother [125]

Answer:

Raid 0

Explanation:

Raid 0 is a configuration used for speed priority. Datas are stored differently on each disk

3 0
1 year ago
Other questions:
  • Human centered technology often recommends a0 to computer designers and manufacturers, telling them how to make systems and the
    12·2 answers
  • Unix/linux are ____ systems, which let many people simultaneously access and share the resources of a server computer.
    13·1 answer
  • How can you check an orthographic drawing to be sure there are no missing lines
    5·2 answers
  • In report design view, you can use commands on the align button of the _____ tab.​
    11·1 answer
  • Put the following five steps in the order in which you would perform them to use the Paste Special function. 1. Select and copy
    6·1 answer
  • Suppose you're currently completing an examination online. When you're finished, you click on Reset Exam. Why would you do this?
    8·1 answer
  • Write programs in python to display “Valid Voter”. (condition : age of person should be
    15·1 answer
  • Yall tryna play gta later? I play on ps4
    12·2 answers
  • Wap in java to complete the following (16*1) +(14*2) +(12*3) +(10*4) +(8*5) +(6*6) +(4*7)​
    13·1 answer
  • Leslie works in an SDLC team. When Leslie edits a file, it gets saved as an altered version. Later all the altered versions are
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!