General Grading Guidelines: The following deductions will apply to all programmi

General Grading Guidelines:
The following deductions will apply to all programming assignments.
1. Any program that does not compile will result in a zero for the assignment. No exceptions will be made for ‘accidental’ uploads, so check your code before submitting.
2. Poor Formatting and programming style will result in a 15% deduction. Please see the style guidelines to avoid this deduction.
3. The code will go through 2 steps of plagiarism detection. Zero tolerance for academic misconduct! If you commit any form of academic misconduct in this course, you WILL be reported to the FIU Student Conduct and Academic Affairs office.
Programming Style Guidelines:
The major purpose of programming style guidelines is to make programs easy to read and understand. Good programming style helps make it possible for a person knowledgeable in the application area to quickly read a program and understand how it works.
1. Your program should begin with a comment that briefly summarizes what it does. For this course, this comment should also include your Name and pantherID.
2. Use additional comments when needed in order for a reader to understand what is happening (see also, point 3).
3. Variable names and function names should be sufficiently descriptive so that a knowledgeable reader can easily understand what the variable means and what the function does. If this is not possible, comments should be added to make the meaning clear.
4. Use consistent indentation to emphasize block structure.
5. Use names of moderate length for variables. Most names should be between 2 and 12 letters long.
6. Use either underscores or capitalization (camelNaming) for compound names for variables. e.g: tot_vol, total_volumn, or totalVolumn.
Assignment description :
Task:
Write a C program that simulates a parallel task execution scenario using process forking. The program should create a specified number of child processes, each performing a unique task. The parent process should wait for all child processes to complete before displaying the final result.
Requirements:
Your program should take an integer input n from the user, where n represents the number of child processes to be created. n should be less than 5.
Each child process should perform a different task, such as computing the factorial of a number, finding prime numbers in a range, or any computationally intensive operation.
The parent process should display a message before creating (forking) the child processes.
Each child process should print its own identifier (PID) and the task it is performing.
After completing their tasks, each child process should print a completion message.
The parent process should wait for all child processes to finish before displaying a final message.
Additional Considerations:
Use the fork() system call to create child processes.
You may use other relevant system calls or functions as needed (e.g., wait() , exit() ).
Ensure proper error handling for system calls.
Design the code to guarantee the creation of exactly n children, ensuring that each child executes its intended task. Properly manage the process creation to avoid any unintended duplication or omission of child processes.
Submission Guidelines:
Submit the C source code along with a brief report explaining the design choices and the lessons learned during the implementation. Discuss any challenges encountered and how they were addressed.
Sample output:
$ ./parallel_execution
Enter the number of child processes to create: 3
Parent process (PID: 1234) is creating 3 child processes.
Child 1 (PID: 1235) is computing the factorial of 5.
Child 2 (PID: 1236) is finding prime numbers up to 20.
Child 3 (PID: 1237) is performing a custom task.
Child 1 (PID: 1235) completed its task. Result: 120
Child 2 (PID: 1236) completed its task. Result: 2 3 5 7 11 13 17 19
Child 3 (PID: 1237) completed its task. Result: Custom task completed.
All child processes have completed. Parent (PID: 1234) is displaying the final message.
Deliverables:
your C source code (e.g. myfirstlastname.c ) and PDf report.
Remember to include the following as a comment at the beginning of your program:
Your name
Your panther ID
GETTING STARTED:
you can use this to get started:
Ocelot Access:Your code will be tested on a Linux machine with gcc compiler. If you are not familiar with Linux here is some useful information:
pwd – tells you the directory you are in.
cd – changes directories.
mkdir – creates a new directory.
emacs and nano (and vi) – are available editors with nano easiest to use.
The compiler is gcc.
PA1
PA1
CriteriaRatingsPts
This criterion is linked to a Learning OutcomeProcess Creation
15 ptsFull Marks
Properly use the fork() system call to create n child processes.
0 ptsNo Marks
15 pts
This criterion is linked to a Learning OutcomeTask Execution
15 ptsFull Marks
Ensure that each child process executes its intended task correctly.
0 ptsNo Marks
15 pts
This criterion is linked to a Learning OutcomeSynchronization
10 ptsFull Marks
Use appropriate synchronization mechanisms to ensure the parent process waits for all child processes to complete.
0 ptsNo Marks
10 pts
This criterion is linked to a Learning OutcomeCommenting
5 ptsFull Marks
Adequate and meaningful comments throughout the code, explaining complex sections or logic.
0 ptsNo Marks
5 pts
This criterion is linked to a Learning OutcomeIndentation and Formatting
5 ptsFull Marks
Follow consistent indentation and formatting guidelines for improved code readability.
0 ptsNo Marks
5 pts
This criterion is linked to a Learning OutcomeVariable and Function Naming
5 ptsFull Marks
Use descriptive names for variables and functions, enhancing code clarity.
0 ptsNo Marks
5 pts
This criterion is linked to a Learning OutcomeCode Modularity
5 ptsFull Marks
Divide the code into well-defined functions to enhance reusability and maintainability.
0 ptsNo Marks
5 pts
This criterion is linked to a Learning OutcomeSystem Call Error Handling
10 ptsFull Marks
Properly handle errors that may occur during system calls (e.g., fork(), wait()).
0 ptsNo Marks
10 pts
This criterion is linked to a Learning OutcomeCommand Line Input Validation
5 ptsFull Marks
Validate command line input to ensure a positive integer less than 5 is provided.
0 ptsNo Marks
5 pts
This criterion is linked to a Learning OutcomeCorrect Output
10 ptsFull Marks
Ensure that the program produces the correct output, including child process identifiers, task execution, and final messages.
0 ptsNo Marks
10 pts
This criterion is linked to a Learning OutcomeOutput Formatting
5 ptsFull Marks
Ensure clear and readable output presentation.
0 ptsNo Marks
5 pts
This criterion is linked to a Learning OutcomeQuality of Report
5 ptsFull Marks
Submit a clear and concise report discussing design choices, challenges faced, and lessons learned during the implementation.
0 ptsNo Marks
5 pts
This criterion is linked to a Learning OutcomeReflection
5 ptsFull Marks
Reflect on the overall learning experience and improvements that could be made.
0 ptsNo Marks
5 pts
Total Points: 100

Posted in C++

Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount