In the first project, we implemented a simple C program which can find summation, the least common, and the biggest prime number of four integers as user’s input. This program is now extended to mini math-oriented system program called mini-MoSP. The program enables to execute several mathematical commands developed in the first project as a separate process. The program should work a perfect system, in which user starts the program, enter commands, see the desired result, and finishes it if he or she wants to quit. In developing this program, we will use procedure that we learnt in the lectures, that is creation and execution of a child process. Also we will implement multithreading to run each process.
II. Introduction
mini-MoSP is a system program that can run on Linux machine (). It provides mathematical operation with parameters. The operations are 1) summation 2) least common multiple (LCM), and 3) biggest prime number of the parameters. When it completes,When user starts the program, it will show the prompt after user_account. Then he or she enters a command with parameters. The syntax of the command is following:
command(parameter1, parameter2, … )
For example, when user enters sum(4,6,7), the program returns the result 17 (= 4+6+7) in the next line. And then it will go to the next prompt user_account $> waiting for user’s next