Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Use Internet sources and give an overview of the command that is used in Windows for creating a process. 2. In a Unix environment,

1. Use Internet sources and give an overview of the command that is used in Windows for creating a process.

2. In a Unix environment, execute parent.c, child.c and orphan.c as follows:

Note: upload first the 3 files in your venus home directory.

child and parent:

- compile the child and parent:

gcc parent.c o parent

gcc child.c o child

- run the parent in the current directory (the parent after the fork will call the child)

Dont worry about warning messages.

./parent

orphan:

- compile and run the orphan:

gcc orphan.c o orphan

./orphan

Observe and understand the programs execution output.

Extensively comment the output of the programs by relating the theory discussed in class, the meaning of the covered commands and the program listings.

3. Write a very simple program that will show the possibility of having zombie processes.

Write a program named zombie.c

The main process will create a child.

The child prints something like: I am the child with pid .. and my parent has ppid .

Next, the child will sleep for 1 second.

Child exits.

The parent will print: I am the parent and my id is Next, the parent sleeps for 30 seconds.

Since the child ends first, and the parent didnt do wait( ), the child will be for a while in the zombie state. Run the parent in the background, so you can use the top command and identify the zombie, before the parent terminates.

Note: even if the parent terminates, the child is still a zombie. However the the init process reaps the zombies frequently.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions

Question

2. What potential barriers would you encourage Samuel to avoid?

Answered: 1 week ago