Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a C program that launches and manages 3 parallel processes (tip: use fork(

ID: 655236 • Letter: W

Question

Write a C program that launches and manages 3 parallel processes (tip: use fork()), each to monitor one metric from your Unix machine. Namely:

(a) the most intense running process by CPU usage;

     (b) the most intense running process by memory usage; and

(c) the longest running process by time.

Each child process should report to a centralized log file (maintained by the main program) at a 20 second interval. Each log record should contain the metric being observed, the name of the process, its PID and user. Terminate the program if the log file reaches 5kbytes. Note that, since all 3 processes are writing to the same log file, you must avoid racing conditions that may occur if 2 processes try to write to the log file at the same time.

Explanation / Answer

worst answer i have seen

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote