Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Write a modular program by breaking it down into suitable functions. 2) Document your program by inserting appropriate comments. ITCS323: Operating Systems Lab #2:

image text in transcribed

1) Write a modular program by breaking it down into suitable functions.

2) Document your program by inserting appropriate comments.

ITCS323: Operating Systems Lab #2: Process System Calls Due: Nov 15, 2017 The objective of this assignment is to study and experiment with process system calls fork0, wait0, and exec0. Note exec0 has different forms. You are required to do the following: 1) Write a program "sort.cpp" that reads n integers from a file and stores them in an array. The program then sorts the array and prints the sorted array. 2) Write a second program that displays the following menu: 1) Run sort program as a child process 2) Run sort program replacing this program 3) Exit Enter your choice When you select option I, the process creates a child process that executes the "sort.cpp program. The parent process should wait for the child process to terminate and then the menu is displayed again by the parent process When you select option 2, the process executes the "sort.cpp" program by itself using execl0 (do not create a child process). To exit from the program, you enter 3

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

2. Why?

Answered: 1 week ago

Question

1. Where do these biases come from?

Answered: 1 week ago