The Process Manager (psmgmt) is designed to simulate an operating system's process scheduling and inter-process communication using shared memory. This simulation includes a "simulated system clock" and a process table consisting of Process Control Blocks (PCBs) for each process. The latest update introduces advanced resource management and deadlock detection mechanisms to psmgmt, enhancing its ability to simulate real-world operating system behaviors.
LOG_LEVEL is controlled in src/globals.c, but this will soon be commandline option.
Compile both the psmgmt
and worker
executables by running:
make
The psmgmt
program supports several command-line options to customize the simulation:
-n <total_processes>
: Set the total number of processes to spawn.-t <time_limit_for_children>
: Set the time limit (in seconds) for each child process's lifespan.-i <interval_in_ms_to_launch_children>
: Set the interval (in milliseconds) between launching child processes.-f <logfile>
: Specify the log file forpsmgmt
output.
Example Command:
To launch a simulation with the updated features:
./psmgmt -n 10 -t 7 -i 100 -f psmgmt_log.txt
To clean up and remove all compiled files, run:
make clean
For a complete list of changes, please refer to the Commit History on GitHub