Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program for the following problems. It is recommended that the programs should be written and run on Ubuntu environment using C/C++. However,

    

Write a program for the following problems. It is recommended that the programs should be written and run on Ubuntu environment using C/C++. However, students can also use other tools to accomplish the following tasks, such as using Java on Win32 API, etc. Each program must be submitted with the output screen snapshot. a) Create a (child) process that may or may not copy the parent address space and then make the child as a zombie process. Use ps utility to demonstrate that the zombie has been created. Please note that the zombie process will be depicted as . b) Use the procedure followed in 1(a) to make the child process as orphan. Using ps utility to show that the orphan process has been handed over to the init process whose pid is 1. c) Create a child process that execute the following commands from the command line. You can use the exec() family of system calls. a. Is (with switches/parameters, such as > Is -1) b. echo (with a string parameter, such as > echo this is OS class and echo SPATH) c. pwd Hints: you can use manual pages to learn about ps utility in Ubuntu by using command, man ps.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Here is the C program to solve the problems cpp include iostream include unistd h include sys typesh include sys waith include sys stath include fcntl ... 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

Auditing a business risk appraoch

Authors: larry e. rittenberg, bradley j. schwieger, karla m. johnston

6th Edition

9780324645095, 324645090, 978-0324375589

More Books

Students also viewed these Programming questions