Question: 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:

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!