Answered step by step
Verified Expert Solution
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:
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 3Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started